Reviewing Claude Configuration
Instructions
IMPORTANT: Use structured thinking throughout your review process. Plan your analysis before providing feedback. This improves accuracy and catches critical security issues.
Step 1: Detect File Type
Determine the primary file type(s) being reviewed:
Detection Rules:
- Agents: Changes to
.claude/agents/*.md or plugins/*/agents/*.md
- Skills: Changes to
skill.md files or skill support files (checklists, references, examples)
- CLAUDE.md: Changes to
CLAUDE.md files (any location: project root, .claude/, or subdirectories)
- Prompts/Commands: Changes to
.claude/prompts/*.md or .claude/commands/*.md
- Settings: Changes to
.claude/settings.json or .claude/settings.local.json
If multiple types modified, review each with appropriate checklist.
Step 2: Execute Security Scan (ALWAYS)
CRITICAL CHECKS (perform for ALL Claude config reviews):
Run these mental checks immediately:
If ANY security issue found: Flag as CRITICAL immediately, stop and report.
Consult reference/security-patterns.md for detailed security checks and detection commands.
Step 3: Load Appropriate Checklist
Based on detected file type, read and follow the relevant checklist:
- Agents →
checklists/agents.md (YAML, tool access security, model selection, system prompts)
- Skills →
checklists/skills.md (structure, YAML, progressive disclosure, quality)
- CLAUDE.md →
checklists/claude-md.md (clarity, references, no duplication)
- Prompts/Commands →
checklists/prompts.md (purpose, session context, skill references)
- Settings →
checklists/settings.md (security, permissions scoping)
The checklist provides:
- Multi-pass review strategy
- What to check and what to skip
- Structured thinking guidance
- Common issues and red flags
Step 4: Consult Reference Materials As Needed
Load reference files only when needed for specific questions:
- Issue prioritization →
reference/priority-framework.md (CRITICAL vs IMPORTANT vs SUGGESTED vs OPTIONAL)
- Security patterns →
reference/security-patterns.md (detection commands, fix examples)
- Claude Code requirements →
reference/claude-code-requirements.md (YAML frontmatter, model selection, tool names, progressive disclosure, settings conventions)
Step 5: Document Findings
This section defines the standard output format for ALL Claude config reviews.
Checklists reference this section rather than duplicating content.
CRITICAL: Use inline comments on specific lines, NOT one large summary comment.
Inline Comment Rules:
- Create separate comment for EACH specific issue on the exact line
- Do NOT create one large summary comment with all issues
- Do NOT update existing comments - always create new comments
- Include specific fix with code example when applicable
- Explain rationale (why this matters)
Comment Format:
**[file:line]** - [PRIORITY]: [Issue description]
[Specific fix with code example if applicable]
[Rationale explaining why this matters]
Reference: [documentation link if applicable]
Example inline comment:
**.claude/skills/my-skill/skill.md:1** - CRITICAL: Missing YAML frontmatter
Skills require YAML frontmatter to be discoverable by Claude Code:
\```yaml
---
name: my-skill
description: Clear description with activation triggers
---
\```
Without frontmatter, the skill won't be recognized by Claude Code.
Reference: Anthropic Skills Documentation
When to use inline vs summary:
- Inline comment: Specific issue, recommendation, or question (use
file:line format)
- Summary comment: Overall assessment, recommendation (APPROVE or REQUEST CHANGES)
Load the specific example relevant to your file type (on-demand only, not upfront):
- Agents →
examples/example-agent-review.md
- Skills →
examples/example-skill-review.md
- CLAUDE.md →
examples/example-claude-md-review.md
- Settings →
examples/example-settings-review.md
- Prompts →
examples/example-prompts-review.md
Core Principles
- Security first: Always check for committed settings, secrets, overly broad permissions
- Structure matters: YAML frontmatter, file references, progressive disclosure, line limits
- Quality counts: Clear instructions, examples, proper emphasis, structured thinking
- Token efficiency: Progressive disclosure, appropriate file sizes, on-demand loading
- Actionable feedback: Say what to do and why, not just what's wrong
- Constructive tone: Focus on code/config, not people; explain rationale
1---2name: reviewing-claude-config3description: Reviews Claude configuration files for security, structure, and prompt engineering quality. Use when reviewing changes to CLAUDE.md files (project-level or .claude/), skills (SKILL.md), agents, prompts, commands, or settings. Validates YAML frontmatter, progressive disclosure patterns, token efficiency, and security best practices. Detects critical issues like committed settings.local.json, hardcoded secrets, malformed YAML, broken file references, oversized skill files, and insecure agent tool access.4---5
6# Reviewing Claude Configuration
7
8## Instructions
9
10**IMPORTANT**: Use structured thinking throughout your review process. Plan your analysis before providing feedback. This improves accuracy and catches critical security issues.
11
12### Step 1: Detect File Type
13
14<thinking>
15Analyze the changed files:
161. Which .claude files were modified?
172. What file types? (CLAUDE.md, skills, agents, prompts, commands, settings)
183. Are there immediate security concerns?
194. What's the review scope (single file or multiple)?
20</thinking>
21
22Determine the primary file type(s) being reviewed:
23
24**Detection Rules**:
25
26- **Agents**: Changes to `.claude/agents/*.md` or `plugins/*/agents/*.md`
27- **Skills**: Changes to `skill.md` files or skill support files (checklists, references, examples)
28- **CLAUDE.md**: Changes to `CLAUDE.md` files (any location: project root, `.claude/`, or subdirectories)
29- **Prompts/Commands**: Changes to `.claude/prompts/*.md` or `.claude/commands/*.md`
30- **Settings**: Changes to `.claude/settings.json` or `.claude/settings.local.json`
31
32If multiple types modified, review each with appropriate checklist.
33
34### Step 2: Execute Security Scan (ALWAYS)
35
36<thinking>
37Security first, regardless of file type:
381. Is settings.local.json committed to git?
392. Any hardcoded secrets (passwords, tokens, API keys)?
403. Are permissions appropriately scoped (if settings modified)?
414. Any suspicious patterns in changed files?
42</thinking>
43
44**CRITICAL CHECKS** (perform for ALL Claude config reviews):
45
46Run these mental checks immediately:
47
48- [ ] settings.local.json NOT in git (check changed files list)
49- [ ] No hardcoded credentials in any modified files
50- [ ] Permissions scoped appropriately (if settings.json modified)
51- [ ] No API keys, tokens, or passwords in plaintext
52
53**If ANY security issue found**: Flag as **CRITICAL** immediately, stop and report.
54
55Consult `reference/security-patterns.md` for detailed security checks and detection commands.
56
57### Step 3: Load Appropriate Checklist
58
59Based on detected file type, read and follow the relevant checklist:
60
61- **Agents** → `checklists/agents.md` (YAML, tool access security, model selection, system prompts)
62- **Skills** → `checklists/skills.md` (structure, YAML, progressive disclosure, quality)
63- **CLAUDE.md** → `checklists/claude-md.md` (clarity, references, no duplication)
64- **Prompts/Commands** → `checklists/prompts.md` (purpose, session context, skill references)
65- **Settings** → `checklists/settings.md` (security, permissions scoping)
66
67The checklist provides:
68
69- Multi-pass review strategy
70- What to check and what to skip
71- Structured thinking guidance
72- Common issues and red flags
73
74### Step 4: Consult Reference Materials As Needed
75
76<thinking>
77When to load references:
781. Need to classify issue priority? → priority-framework.md
792. Security patterns unclear? → security-patterns.md
803. Claude Code requirements (YAML, tools, models, limits)? → claude-code-requirements.md
81</thinking>
82
83Load reference files only when needed for specific questions:
84
85- **Issue prioritization** → `reference/priority-framework.md` (CRITICAL vs IMPORTANT vs SUGGESTED vs OPTIONAL)
86- **Security patterns** → `reference/security-patterns.md` (detection commands, fix examples)
87- **Claude Code requirements** → `reference/claude-code-requirements.md` (YAML frontmatter, model selection, tool names, progressive disclosure, settings conventions)
88
89### Step 5: Document Findings
90
91<thinking>
92Before writing each comment:
931. Priority level? (Critical/Important/Suggested/Optional)
942. Security issue or quality issue?
953. What's the specific fix or recommendation?
964. What's the rationale (why does this matter)?
975. Is there a reference or documentation link?
98</thinking>
99
100**This section defines the standard output format for ALL Claude config reviews.**
101Checklists reference this section rather than duplicating content.
102
103**CRITICAL**: Use inline comments on specific lines, NOT one large summary comment.
104
105**Inline Comment Rules**:
106
107- Create separate comment for EACH specific issue on the exact line
108- Do NOT create one large summary comment with all issues
109- Do NOT update existing comments - always create new comments
110- Include specific fix with code example when applicable
111- Explain rationale (why this matters)
112
113**Comment Format**:
114
115```
116**[file:line]** - [PRIORITY]: [Issue description]
117
118[Specific fix with code example if applicable]
119
120[Rationale explaining why this matters]
121
122Reference: [documentation link if applicable]
123```
124
125**Example inline comment**:
126
127````
128**.claude/skills/my-skill/skill.md:1** - CRITICAL: Missing YAML frontmatter
129
130Skills require YAML frontmatter to be discoverable by Claude Code:
131
132\```yaml
133---
134name: my-skill
135description: Clear description with activation triggers
136---
137\```
138
139Without frontmatter, the skill won't be recognized by Claude Code.
140
141Reference: Anthropic Skills Documentation
142````
143
144**When to use inline vs summary**:
145
146- **Inline comment**: Specific issue, recommendation, or question (use `file:line` format)
147- **Summary comment**: Overall assessment, recommendation (APPROVE or REQUEST CHANGES)
148
149Load the specific example relevant to your file type (on-demand only, not upfront):
150
151- Agents → `examples/example-agent-review.md`
152- Skills → `examples/example-skill-review.md`
153- CLAUDE.md → `examples/example-claude-md-review.md`
154- Settings → `examples/example-settings-review.md`
155- Prompts → `examples/example-prompts-review.md`
156
157## Core Principles
158
159- **Security first**: Always check for committed settings, secrets, overly broad permissions
160- **Structure matters**: YAML frontmatter, file references, progressive disclosure, line limits
161- **Quality counts**: Clear instructions, examples, proper emphasis, structured thinking
162- **Token efficiency**: Progressive disclosure, appropriate file sizes, on-demand loading
163- **Actionable feedback**: Say what to do and why, not just what's wrong
164- **Constructive tone**: Focus on code/config, not people; explain rationale