Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .claude/settings-minimax.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@
"Bash(tmux capture-pane:*)",
"Bash(tmux list-sessions:*)",
"Bash(tmux list-windows:*)",
"Bash(tmux has-session:*)",
"Bash(tmux new-session:*)",
"Bash(gh pr list:*)",
"Bash(gh pr view:*)",
"Bash(gh pr diff:*)",
Expand All @@ -61,16 +63,34 @@
"Bash(git log:*)",
"Bash(git fetch --prune:*)",
"Bash(git worktree list:*)",
"Bash(git show:*)",
"Bash(uv run ruff:*)",
"Bash(python --version:*)",
"Bash(python -c:*)",
"Bash(python3 -c:*)",
"Bash(python -m json.tool:*)",
"Bash(sleep:*)",
"Bash(source .venv/bin/activate:*)",
"Bash(mkdir -p:*)",
"WebSearch",
"WebFetch(domain:openai.com)",
"WebFetch(domain:anthropic.com)",
"WebFetch(domain:docs.anthropic.com)",
"WebFetch(domain:ai.google.dev)",
"WebFetch(domain:github.com)",
"WebFetch(domain:gradio.app)",
"WebFetch(domain:arxiv.org)",
"WebFetch(domain:dl.acm.org)",
"WebFetch(domain:openaccess.thecvf.com)",
"WebFetch(domain:www.semanticscholar.org)",
"WebFetch(domain:openreview.net)",
"WebFetch(domain:doi.org)",
"WebFetch(domain:link.springer.com)",
"WebFetch(domain:pypi.org)",
"WebFetch(domain:docs.ultralytics.com)",
"WebFetch(domain:sli.dev)",
"WebFetch(domain:docs.vllm.ai)",
"WebFetch(domain:developer.themoviedb.org)",
"mcp__tavily__tavily_extract",
"mcp__tavily__tavily_search",
"mcp__context7__resolve-library-id",
Expand All @@ -88,6 +108,19 @@
"mcp__github__search_code"
]
},
"hooks": {
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "bash -c 'CMD=$(jq -r \".tool_input.command\"); if ! echo \"$CMD\" | rg -qP \"(\\brm\\s+-|\\brm\\s+/|\\brmdir\\b|shutil\\.rmtree|os\\.remove|os\\.unlink|\\bsubprocess\\b|os\\.system|\\bopen\\(.*[\\x27\\\"]w|\\bcurl\\s|\\bwget\\s|\\bpip\\s+install|\\bkill\\s|\\bpkill\\b|\\bchmod\\b|\\bchown\\b|\\bmv\\s+|\\bcp\\s+|\\bdd\\s|\\bmkfs\\b|\\bgit\\s+push|\\bgit\\s+reset|\\bgit\\s+checkout\\s+\\.|\\bapt\\s|\\byum\\s|\\bbrew\\s+install|\\bnpm\\s+install|>\\s+/|>>\\s+/)\"; then printf \"{\\\"hookSpecificOutput\\\":{\\\"hookEventName\\\":\\\"PreToolUse\\\",\\\"permissionDecision\\\":\\\"allow\\\"}}\"; else printf \"{\\\"hookSpecificOutput\\\":{\\\"hookEventName\\\":\\\"PreToolUse\\\",\\\"permissionDecision\\\":\\\"ask\\\",\\\"permissionDecisionReason\\\":\\\"contains destructive operation, review carefully\\\"}}\"; fi'"
}
]
}
]
},
"outputStyle": "Explanatory",
"model": "opus",
"extraKnownMarketplaces": {
Expand Down
22 changes: 22 additions & 0 deletions .claude/settings-zai.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
"Bash(tmux capture-pane:*)",
"Bash(tmux list-sessions:*)",
"Bash(tmux list-windows:*)",
"Bash(tmux has-session:*)",
"Bash(tmux new-session:*)",
"Bash(gh pr list:*)",
"Bash(gh pr view:*)",
"Bash(gh pr diff:*)",
Expand All @@ -66,8 +68,15 @@
"Bash(git -C :* log:*)",
"Bash(git fetch --prune:*)",
"Bash(git worktree list:*)",
"Bash(git show:*)",
"Bash(uv run ruff:*)",
"Bash(python --version:*)",
"Bash(python -c:*)",
"Bash(python3 -c:*)",
"Bash(python -m json.tool:*)",
"Bash(sleep:*)",
"Bash(source .venv/bin/activate:*)",
"Bash(mkdir -p:*)",
"WebSearch",
"WebFetch(domain:openai.com)",
"WebFetch(domain:anthropic.com)",
Expand Down Expand Up @@ -119,6 +128,19 @@
"mcp__gcloud-observability__list_log_entries"
]
},
"hooks": {
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "bash -c 'CMD=$(jq -r \".tool_input.command\"); if ! echo \"$CMD\" | rg -qP \"(\\brm\\s+-|\\brm\\s+/|\\brmdir\\b|shutil\\.rmtree|os\\.remove|os\\.unlink|\\bsubprocess\\b|os\\.system|\\bopen\\(.*[\\x27\\\"]w|\\bcurl\\s|\\bwget\\s|\\bpip\\s+install|\\bkill\\s|\\bpkill\\b|\\bchmod\\b|\\bchown\\b|\\bmv\\s+|\\bcp\\s+|\\bdd\\s|\\bmkfs\\b|\\bgit\\s+push|\\bgit\\s+reset|\\bgit\\s+checkout\\s+\\.|\\bapt\\s|\\byum\\s|\\bbrew\\s+install|\\bnpm\\s+install|>\\s+/|>>\\s+/)\"; then printf \"{\\\"hookSpecificOutput\\\":{\\\"hookEventName\\\":\\\"PreToolUse\\\",\\\"permissionDecision\\\":\\\"allow\\\"}}\"; else printf \"{\\\"hookSpecificOutput\\\":{\\\"hookEventName\\\":\\\"PreToolUse\\\",\\\"permissionDecision\\\":\\\"ask\\\",\\\"permissionDecisionReason\\\":\\\"contains destructive operation, review carefully\\\"}}\"; fi'"
}
]
}
]
},
"outputStyle": "Explanatory",
"model": "opus",
"extraKnownMarketplaces": {
Expand Down
22 changes: 22 additions & 0 deletions .claude/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@
"Bash(tmux capture-pane:*)",
"Bash(tmux list-sessions:*)",
"Bash(tmux list-windows:*)",
"Bash(tmux has-session:*)",
"Bash(tmux new-session:*)",
"Bash(gh pr list:*)",
"Bash(gh pr view:*)",
"Bash(gh pr diff:*)",
Expand All @@ -63,8 +65,15 @@
"Bash(git -C :* log:*)",
"Bash(git fetch --prune:*)",
"Bash(git worktree list:*)",
"Bash(git show:*)",
"Bash(uv run ruff:*)",
"Bash(python --version:*)",
"Bash(python -c:*)",
"Bash(python3 -c:*)",
"Bash(python -m json.tool:*)",
"Bash(sleep:*)",
"Bash(source .venv/bin/activate:*)",
"Bash(mkdir -p:*)",
"WebSearch",
"WebFetch(domain:openai.com)",
"WebFetch(domain:anthropic.com)",
Expand Down Expand Up @@ -116,6 +125,19 @@
"mcp__gcloud-observability__list_log_entries"
]
},
"hooks": {
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "bash -c 'CMD=$(jq -r \".tool_input.command\"); if ! echo \"$CMD\" | rg -qP \"(\\brm\\s+-|\\brm\\s+/|\\brmdir\\b|shutil\\.rmtree|os\\.remove|os\\.unlink|\\bsubprocess\\b|os\\.system|\\bopen\\(.*[\\x27\\\"]w|\\bcurl\\s|\\bwget\\s|\\bpip\\s+install|\\bkill\\s|\\bpkill\\b|\\bchmod\\b|\\bchown\\b|\\bmv\\s+|\\bcp\\s+|\\bdd\\s|\\bmkfs\\b|\\bgit\\s+push|\\bgit\\s+reset|\\bgit\\s+checkout\\s+\\.|\\bapt\\s|\\byum\\s|\\bbrew\\s+install|\\bnpm\\s+install|>\\s+/|>>\\s+/)\"; then printf \"{\\\"hookSpecificOutput\\\":{\\\"hookEventName\\\":\\\"PreToolUse\\\",\\\"permissionDecision\\\":\\\"allow\\\"}}\"; else printf \"{\\\"hookSpecificOutput\\\":{\\\"hookEventName\\\":\\\"PreToolUse\\\",\\\"permissionDecision\\\":\\\"ask\\\",\\\"permissionDecisionReason\\\":\\\"contains destructive operation, review carefully\\\"}}\"; fi'"
}
]
}
]
},
"outputStyle": "Explanatory",
"model": "opus[1m]",
"extraKnownMarketplaces": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ prefix_rule(pattern=["tmux", "list-sessions"], decision="allow")
prefix_rule(pattern=["tmux", "ls"], decision="allow")
prefix_rule(pattern=["tmux", "capture-pane"], decision="allow")
prefix_rule(pattern=["tmux", "list-windows"], decision="allow")
prefix_rule(pattern=["tmux", "has-session"], decision="allow")
prefix_rule(pattern=["tmux", "new-session"], decision="allow")
prefix_rule(pattern=["ps"], decision="allow")
prefix_rule(pattern=["gh", "pr", "list"], decision="allow")
prefix_rule(pattern=["gh", "pr", "view"], decision="allow")
Expand All @@ -30,6 +32,13 @@ prefix_rule(pattern=["git", "rev-parse"], decision="allow")
prefix_rule(pattern=["git", "log"], decision="allow")
prefix_rule(pattern=["git", "fetch", "--prune"], decision="allow")
prefix_rule(pattern=["git", "worktree", "list"], decision="allow")
prefix_rule(pattern=["git", "show"], decision="allow")
prefix_rule(pattern=["ruff"], decision="allow")
prefix_rule(pattern=["uv", "run", "ruff"], decision="allow")
prefix_rule(pattern=["python", "--version"], decision="allow")
prefix_rule(pattern=["python", "-c"], decision="allow")
prefix_rule(pattern=["python3", "-c"], decision="allow")
prefix_rule(pattern=["python", "-m", "json.tool"], decision="allow")
prefix_rule(pattern=["sleep"], decision="allow")
prefix_rule(pattern=["source", ".venv/bin/activate"], decision="allow")
prefix_rule(pattern=["mkdir", "-p"], decision="allow")
9 changes: 9 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,15 @@ When writing README or docs content for this repo:
- Installation instructions must be copy-paste ready
- Plan for future before/after GIFs or demos per plugin to show value visually

## Commit and PR Writing Style

This repo contains config files (JSON settings, allowlist rules, hooks) rather than application code. Commit messages and PR descriptions should be written in plain language that anyone can understand, not just Claude Code plugin developers.

- Describe WHAT changed and WHY in everyday terms: "add a safety hook that flags dangerous shell commands for review" not "add PreToolUse command hook with regex matcher on Bash tool"
- Avoid internal jargon: say "allowlist" not "permissions allowlist entries", say "settings files" not "settings.json/settings-minimax.json/settings-zai.json"
- When listing affected files, group by purpose: "all 3 settings files" instead of naming each one
- Keep PR bodies short: 2-3 bullet points explaining the user-visible behavior change

## Maintenance Scripts

Scripts in `.github/scripts/` for repo maintenance. Run from repo root.
Expand Down
Loading