Skip to content

Commit 022ba77

Browse files
committed
require gstack for AI-assisted work
1 parent 02862cb commit 022ba77

4 files changed

Lines changed: 106 additions & 0 deletions

File tree

‎.claude/hooks/check-gstack.sh‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/bash
2+
# Block skill usage when gstack is not installed globally.
3+
4+
if [ ! -d "$HOME/.claude/skills/gstack/bin" ]; then
5+
cat >&2 <<'MSG'
6+
BLOCKED: gstack is not installed globally.
7+
8+
gstack is required for AI-assisted work in this repo.
9+
10+
Install it:
11+
git clone --depth 1 https://github.com/garrytan/gstack.git ~/.claude/skills/gstack
12+
cd ~/.claude/skills/gstack && ./setup --team
13+
14+
Then restart your AI coding tool.
15+
MSG
16+
echo '{"permissionDecision":"deny","message":"gstack is required but not installed. See stderr for install instructions."}'
17+
exit 0
18+
fi
19+
20+
echo '{}'

‎.claude/settings.json‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"hooks": {
3+
"PreToolUse": [
4+
{
5+
"matcher": "Skill",
6+
"hooks": [
7+
{
8+
"type": "command",
9+
"command": "\"$CLAUDE_PROJECT_DIR/.claude/hooks/check-gstack.sh\""
10+
}
11+
]
12+
}
13+
]
14+
}
15+
}

‎.claude/settings.local.json‎

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"permissions": {
3+
"allow": [
4+
"Bash(golangci-lint run:*)",
5+
"Bash(go tool cover:*)",
6+
"Bash(go test:*)",
7+
"Bash(git add:*)",
8+
"Bash(gh pr list:*)",
9+
"Bash(gh pr view:*)",
10+
"Bash(gh api:*)",
11+
"Bash(git reset:*)",
12+
"Bash(git commit:*)",
13+
"Bash(gh pr checks:*)",
14+
"Bash(gh run view:*)",
15+
"Bash(gofmt:*)",
16+
"Bash(git push:*)",
17+
"Bash(while true)",
18+
"Bash(do gh pr view 783 --json state,merged --jq '{state, merged}')",
19+
"Bash(done)",
20+
"Bash(gh pr:*)",
21+
"Bash(git fetch:*)",
22+
"Bash(git checkout:*)",
23+
"Bash(git pull:*)",
24+
"Bash(grep:*)",
25+
"Bash(ls:*)",
26+
"Bash(go build:*)",
27+
"WebSearch",
28+
"Bash(git:*)"
29+
]
30+
},
31+
"hooks": {
32+
"PostToolUse": [
33+
{
34+
"matcher": "Edit|Write",
35+
"hooks": [
36+
{
37+
"type": "command",
38+
"command": "bash \"$CLAUDE_PROJECT_DIR/.claude/hooks/lint-on-change.sh\"",
39+
"timeout": 120
40+
}
41+
]
42+
}
43+
]
44+
},
45+
"enabledPlugins": {
46+
"everything-claude-code@everything-claude-code": true
47+
}
48+
}

‎CLAUDE.md‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
## gstack (REQUIRED — global install)
2+
3+
**Before doing ANY work, verify gstack is installed:**
4+
5+
```bash
6+
test -d ~/.claude/skills/gstack/bin && echo "GSTACK_OK" || echo "GSTACK_MISSING"
7+
```
8+
9+
If GSTACK_MISSING: STOP. Do not proceed. Tell the user:
10+
11+
> gstack is required for all AI-assisted work in this repo.
12+
> Install it:
13+
> ```bash
14+
> git clone --depth 1 https://github.com/garrytan/gstack.git ~/.claude/skills/gstack
15+
> cd ~/.claude/skills/gstack && ./setup --team
16+
> ```
17+
> Then restart your AI coding tool.
18+
19+
Do not skip skills, ignore gstack errors, or work around missing gstack.
20+
21+
Using gstack skills: After install, skills like /qa, /ship, /review, /investigate,
22+
and /browse are available. Use /browse for all web browsing.
23+
Use ~/.claude/skills/gstack/... for gstack file paths (the global path).

0 commit comments

Comments
 (0)
⌂ 换网址