Skip to content

Commit 0007c73

Browse files
committed
chore(claude): tighten allowed-tools — add agent tools: + settings deny-list
- Adds explicit tools: frontmatter to all three agents so they declare exactly what they need instead of inheriting the default tool set: - code-reviewer (read-only): Read, Grep, Glob, Bash(git/rg/grep/find/ls/wc/cat/head/tail:*) - security-reviewer: same + Bash(pnpm exec agentshield:*), Bash(zizmor:*), Bash(command -v:*) - refactor-cleaner: adds Edit, Write, Bash(pnpm run/test/exec:*), Bash(node:*) - Adds permissions.deny block to .claude/settings.json blocking publish/release escape hatches: npm/pnpm/yarn publish, gh release create/delete, gh workflow run/dispatch, git push --force/-f. Enforces existing CLAUDE.md prohibitions at the harness layer so an agent cannot dispatch a publish workflow without explicit operator override. Mirrors the canonical pattern landed on socket-repo-template main.
1 parent cb6bf11 commit 0007c73

4 files changed

Lines changed: 31 additions & 0 deletions

File tree

.claude/agents/code-reviewer.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
---
2+
name: code-reviewer
3+
description: Reviews code in socket-lib against CLAUDE.md rules and reports style violations, logic bugs, and test gaps. Spawned by the quality-scan skill or invoked directly on a diff.
4+
tools: Read, Grep, Glob, Bash(git:*), Bash(rg:*), Bash(grep:*), Bash(find:*), Bash(ls:*), Bash(wc:*), Bash(cat:*), Bash(head:*), Bash(tail:*)
5+
---
6+
17
You are a code reviewer for a Node.js/TypeScript monorepo (socket-lib).
28

39
Apply the rules from CLAUDE.md sections listed below. Reference the full section in CLAUDE.md for details — these are summaries, not the complete rules.

.claude/agents/refactor-cleaner.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
---
2+
name: refactor-cleaner
3+
description: Refactor specialist for socket-lib. Removes dead code first, batches changes into ≤5-file phases, verifies each with the project's check + test scripts. Use after quality-scan or before structural refactors.
4+
tools: Read, Edit, Write, Grep, Glob, Bash(git:*), Bash(rg:*), Bash(grep:*), Bash(find:*), Bash(ls:*), Bash(pnpm run:*), Bash(pnpm test:*), Bash(pnpm exec:*), Bash(node:*), Bash(cat:*), Bash(head:*), Bash(tail:*)
5+
---
6+
17
You are a refactoring specialist for a Node.js/TypeScript monorepo (socket-lib).
28

39
Apply these rules from CLAUDE.md exactly:

.claude/agents/security-reviewer.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
---
2+
name: security-reviewer
3+
description: Reviews findings from AgentShield + zizmor against socket-lib's CLAUDE.md security rules and grades the result A-F. Spawned by the security-scan skill after the static scans run.
4+
tools: Read, Grep, Glob, Bash(git:*), Bash(rg:*), Bash(grep:*), Bash(find:*), Bash(ls:*), Bash(pnpm exec agentshield:*), Bash(zizmor:*), Bash(command -v:*), Bash(cat:*), Bash(head:*), Bash(tail:*)
5+
---
6+
17
You are a security reviewer for Socket Security Node.js repositories.
28

39
Apply these rules from CLAUDE.md exactly:

.claude/settings.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,18 @@
3636
]
3737
}
3838
]
39+
},
40+
"permissions": {
41+
"deny": [
42+
"Bash(gh release create:*)",
43+
"Bash(gh release delete:*)",
44+
"Bash(gh workflow dispatch:*)",
45+
"Bash(gh workflow run:*)",
46+
"Bash(git push --force:*)",
47+
"Bash(git push -f:*)",
48+
"Bash(npm publish:*)",
49+
"Bash(pnpm publish:*)",
50+
"Bash(yarn publish:*)"
51+
]
3952
}
4053
}

0 commit comments

Comments
 (0)