grove-init
4
总安装量
4
周安装量
#53783
全站排名
安装命令
npx skills add https://github.com/chrisbanes/grove --skill grove-init
Agent 安装分布
opencode
4
antigravity
4
github-copilot
4
codex
4
kimi-cli
4
gemini-cli
4
Skill 文档
I’m using the grove-init skill to set up Grove for this project.
Workflow
Step 1: Verify git repo
git rev-parse --show-toplevel
If the command fails, stop. Grove requires a git repository.
Step 2: Check if already initialized
test -f .grove/config.json
If .grove/config.json exists, report that Grove is already initialized and ask the user whether they want to re-initialize. Stop unless they confirm.
Step 3: Detect build system
Scan for marker files in the following priority order. Use the first match. If multiple top-level markers exist, ask the user which is the primary build system.
| Build System | Marker File(s) | Warmup Command | Post-Clone Hook |
|---|---|---|---|
| Gradle | build.gradle.kts or build.gradle |
./gradlew assemble |
Clean lock files, configuration-cache |
| Node.js | package.json |
npm run build |
Clean node_modules/.cache |
| Rust | Cargo.toml |
cargo build |
Clean target/debug/incremental |
| Go | go.mod |
go build ./... |
Minimal â Go handles relocatable caches well |
| Python | pyproject.toml or requirements.txt |
poetry install or pip install -e . |
Clean __pycache__ dirs |
| C/C++ | Makefile or CMakeLists.txt |
make or cmake --build build |
Project-specific |
If no marker is found, ask the user to provide a warmup command.
Step 4: Present proposed config for confirmation
Show the user:
- Warmup command
- Workspace directory (default: system temp under a grove subdirectory)
- Post-clone hook content
Ask for confirmation before proceeding.
Step 5: Run grove init
grove init --warmup-command "<cmd>"
Step 6: Write post-clone hook
Write the post-clone hook script to .grove/hooks/post-clone and make it executable:
chmod +x .grove/hooks/post-clone
Step 7: Suggest git add
Tell the user to commit the Grove configuration:
git add .grove/config.json .grove/hooks/
git commit -m "chore: add Grove configuration"
Quick Reference
| Command | Purpose |
|---|---|
grove init --warmup-command "<cmd>" |
Initialize Grove |
grove update |
Refresh golden copy build state |
Common Mistakes
- Running
grove initoutside a git repo â Grove requires git; always verify first. - Skipping the post-clone hook â without it, workspaces inherit stale lock files or cache artifacts.
- Not committing
.grove/â commit so collaborators and CI get the same warmup behavior.
Red Flags
grove initfails with a permissions error â checkgroveis installed and the user has write access.- Warmup command exits non-zero during
grove initâ fix unresolved dependencies before initializing. - Multiple
package.jsonandbuild.gradleat the root â polyglot monorepo; ask which is primary.
Integration
- Standalone â not called by other skills automatically
- Suggested by:
grove:using-grovewhen.grove/config.jsonis not found - Invoked via:
/grove-initslash command