Review Claude Code
Review the Claude Code setup for alignment with current official best practices, optimal developer experience (DX), and AI collaboration quality on this large pnpm/Turborepo monorepo. Your reply must be a plan of suggested changes: concise, actionable, structured - not only prose.
Invocation
Text after the slash command is additional scope/focus (e.g. "permissions only", "hooks") - narrow the review accordingly.
Ground truth (mandatory)
Your pre-trained knowledge of Claude Code may be outdated. Do not draft suggestions from memory alone.
- Resolve "Claude Code" via the Context7 MCP (
resolve-library-id → query-docs) for settings keys, permission rule syntax, hooks events, subagent frontmatter, and worktree behavior.
- For anything Context7 lacks, use Firecrawl search/scrape restricted to the official docs domain(s) (
code.claude.com, docs.anthropic.com) - settings reference, permissions, IAM, hooks, sandboxing, worktrees, output styles, best-practices guidance for large codebases.
- Check version currency: compare installed CLI (
claude --version) against the latest stable release notes (official changelog). Flag deprecated settings keys or hook events still present in config.
- Cite the retrieved source next to every finding; label anything you could not verify as Unverified.
Scope artifacts
- .claude/settings.json - permissions, hooks wiring, model/env
- .claude/rules/ - path-scoped rules,
core/guardrails always-on surface
- .claude/agents/ -
verifier, bundle-analyzer, docs-researcher (tools least privilege)
- .claude/skills/ - symlinks into
.agents/skills/; broken or stale links
- CLAUDE.md + nested per-app/package guides - duplication vs pointer discipline
.claude/worktrees/, .claude/status-line.sh, .mcp.json server list
- Sync parity with the Cursor tree (see
/review-cursor for that side's depth)
Analysis axes
- Settings & permissions: allowlist shape (read-only defaults, explicit write paths); no overly broad
Bash(*) grants; deny rules for secrets/.dev.vars; sandboxing options where supported; env/model keys current (not deprecated).
- Context hygiene: root
CLAUDE.md stays a map with pointers, not duplicated detail; path-scoped rules actually scoped (no accidental always-on beyond guardrails); no stale rules referencing removed files; skill descriptions tight so unused skills are not preloaded.
- Hooks: PreToolUse/PostToolUse wiring matches
hooks/AGENTS.md; deterministic, fast, fail-closed where intended; logs not polluting transcripts.
- Subagents: each agent declares minimal
tools; prompts restate binding constraints (Explore/Plan do not load CLAUDE.md); no author/reviewer conflict for review agents.
- Worktrees & large-repo behavior: worktree usage aligned with official large-codebase practices; agent worktrees provision isolated credentials (no real env files copied).
- Version currency: settings schema drift vs installed CLI version; new features worth adopting (e.g. newer permission or sandbox capabilities) noted under Improvements/Optional.
DX & AI-agentic workflow
Verify the setup maximizes agentic effectiveness: machine-readable outputs (pnpm lint:agent, knip --reporter symbols) reachable without noise; MCP servers project-scoped (Context7, cloudflare-docs) without duplicate registration; clean worktree (generated dist/, worker-configuration.d.ts handled per repo policy).
Steps
- Collect ground truth (docs above) before reading config.
- Read every scope artifact end-to-end.
- Walk each analysis axis; note findings or an explicit one-line "no issues".
- Compose the plan grouped Critical / Improvements / Optional; each item states what, where, why, and its source citation.
Output format
- Critical - broken, insecure, or deprecated-and-failing configuration.
- Improvements - worthwhile alignment with current best practice.
- Optional - nice-to-haves; prefix pure polish with Nit:.
Read-only review: produce the plan only; implement nothing unless explicitly asked afterwards.
1---2name: review-claude-code3description: Claude Code setup review (settings.json, permissions, rules, hooks, agents, memory, worktrees) against current official best practices. USE WHEN: user runs /review-claude-code or explicitly asks for this review. DO NOT USE WHEN: reviewing app code, other dev dependencies, or implementing features.4---56# Review Claude Code78Review the Claude Code setup for alignment with current official best practices, optimal developer experience (DX), and AI collaboration quality on this large pnpm/Turborepo monorepo. Your reply must be a **plan of suggested changes**: concise, actionable, structured - not only prose.910## Invocation1112Text after the slash command is additional scope/focus (e.g. "permissions only", "hooks") - narrow the review accordingly.1314## Ground truth (mandatory)1516Your pre-trained knowledge of Claude Code may be outdated. **Do not draft suggestions from memory alone.**17181. Resolve "Claude Code" via the **Context7 MCP** (`resolve-library-id` → `query-docs`) for settings keys, permission rule syntax, hooks events, subagent frontmatter, and worktree behavior.192. For anything Context7 lacks, use **Firecrawl search/scrape restricted to the official docs domain(s)** (`code.claude.com`, `docs.anthropic.com`) - settings reference, permissions, IAM, hooks, sandboxing, worktrees, output styles, best-practices guidance for large codebases.203. Check version currency: compare installed CLI (`claude --version`) against the latest stable release notes (official changelog). Flag deprecated settings keys or hook events still present in config.214. Cite the retrieved source next to every finding; label anything you could not verify as **Unverified**.2223## Scope artifacts2425- [.claude/settings.json](../../../.claude/settings.json) - permissions, hooks wiring, model/env26- [.claude/rules/](../../../.claude/rules/) - path-scoped rules, `core/guardrails` always-on surface27- [.claude/agents/](../../../.claude/agents/) - `verifier`, `bundle-analyzer`, `docs-researcher` (`tools` least privilege)28- [.claude/skills/](../../../.claude/skills/) - symlinks into `.agents/skills/`; broken or stale links29- [CLAUDE.md](../../../CLAUDE.md) + nested per-app/package guides - duplication vs pointer discipline30- `.claude/worktrees/`, `.claude/status-line.sh`, `.mcp.json` server list31- Sync parity with the Cursor tree (see `/review-cursor` for that side's depth)3233## Analysis axes3435- **Settings & permissions**: allowlist shape (read-only defaults, explicit write paths); no overly broad `Bash(*)` grants; deny rules for secrets/`.dev.vars`; sandboxing options where supported; env/model keys current (not deprecated).36- **Context hygiene**: root `CLAUDE.md` stays a map with pointers, not duplicated detail; path-scoped rules actually scoped (no accidental always-on beyond `guardrails`); no stale rules referencing removed files; skill descriptions tight so unused skills are not preloaded.37- **Hooks**: PreToolUse/PostToolUse wiring matches `hooks/AGENTS.md`; deterministic, fast, fail-closed where intended; logs not polluting transcripts.38- **Subagents**: each agent declares minimal `tools`; prompts restate binding constraints (Explore/Plan do not load `CLAUDE.md`); no author/reviewer conflict for review agents.39- **Worktrees & large-repo behavior**: worktree usage aligned with official large-codebase practices; agent worktrees provision isolated credentials (no real env files copied).40- **Version currency**: settings schema drift vs installed CLI version; new features worth adopting (e.g. newer permission or sandbox capabilities) noted under Improvements/Optional.4142## DX & AI-agentic workflow4344Verify the setup maximizes agentic effectiveness: machine-readable outputs (`pnpm lint:agent`, `knip --reporter symbols`) reachable without noise; MCP servers project-scoped (Context7, cloudflare-docs) without duplicate registration; clean worktree (generated `dist/`, `worker-configuration.d.ts` handled per repo policy).4546## Steps47481. Collect ground truth (docs above) before reading config.492. Read every scope artifact end-to-end.503. Walk each analysis axis; note findings or an explicit one-line "no issues".514. Compose the plan grouped Critical / Improvements / Optional; each item states **what**, **where**, **why**, and its source citation.5253## Output format54551. **Critical** - broken, insecure, or deprecated-and-failing configuration.562. **Improvements** - worthwhile alignment with current best practice.573. **Optional** - nice-to-haves; prefix pure polish with **Nit:**.5859Read-only review: produce the plan only; implement nothing unless explicitly asked afterwards.