Claude Consult
Get expert help from Claude specialist agents during implementation. Each agent
has domain-specific skills pre-loaded and tools scoped to its role.
This is NOT a replacement for the review gates. The agent-loops skill
defines formal code review (specialist-review) and test audit
(diff-test-audit) gates that run after implementation. This skill is for
asking questions during implementation — before you've written code, while
you're writing it, or when you're stuck.
When to Use
- "How does this module work?" — before implementing
- "Does my approach match existing conventions?" — while implementing
- "Is this pattern secure?" — before committing to a design
- "Why is this test failing?" — when stuck
- "What do the testing standards say about X?" — before writing tests
- "Is this component accessible?" — during UI work
How to Invoke
claude -p --agent <agent-name> "<your question>"
All agents run headless (-p / print mode). They read the codebase, apply their
loaded skills, and return an answer to stdout. Capture or pipe as needed:
# Direct invocation
claude -p --agent debugger "Why is test_auth_flow failing in src/auth/tests.py?"
# Capture to variable
ANSWER=$(claude -p --agent security-auditor "Is the input validation in src/api/handler.py safe?")
# Save to file
claude -p --agent architect-reviewer "Does adding a cache layer between api and db match the existing architecture?" > /tmp/arch-advice.md
Agent Roster
Codebase Understanding
| Agent |
Use when you need to... |
Skills loaded |
search-specialist |
Find where something is defined or called |
codanna-codebase-intelligence |
architect-reviewer |
Evaluate module boundaries and dependencies |
system-design, api-design-patterns |
docs-architect |
Understand existing documentation structure |
documentation-production, code-explanation |
Code Quality & Patterns
| Agent |
Use when you need to... |
Skills loaded |
code-reviewer |
Check if code follows project conventions |
code-quality-workflow, testing-anti-patterns, secure-coding-practices |
refiner |
Get suggestions for improving code quality |
code-quality-workflow |
rest-expert |
Design or check REST API patterns |
api-design-patterns |
Security
| Agent |
Use when you need to... |
Skills loaded |
security-auditor |
Full security review of a code path |
owasp-top-10, secure-coding-practices, vibe-security, security-testing-patterns |
owasp-top10-expert |
Check against OWASP Top 10 specifically |
owasp-top-10, secure-coding-practices, vibe-security |
penetration-tester |
Identify exploitable vulnerabilities |
security-testing-patterns, owasp-top-10, threat-modeling-techniques |
jwt-expert |
Review JWT/auth token handling |
secure-coding-practices |
compliance-auditor |
Check regulatory compliance |
secure-coding-practices, owasp-top-10 |
Testing
| Agent |
Use when you need to... |
Skills loaded |
test-automator |
Plan test strategy or check coverage approach |
test-review, python-testing-patterns, testing-anti-patterns |
vitest-expert |
Vitest-specific test patterns |
testing-anti-patterns |
Debugging
| Agent |
Use when you need to... |
Skills loaded |
debugger |
Investigate a test failure or error |
systematic-debugging, root-cause-tracing |
Performance
| Agent |
Use when you need to... |
Skills loaded |
performance-engineer |
Find bottlenecks in code paths |
workflow-performance, python-performance-optimization, react-performance-optimization |
frontend-optimizer |
Optimize frontend bundle/rendering |
react-performance-optimization, design-system-architecture |
performance-monitor |
Set up or check monitoring/observability |
workflow-performance |
Frontend & UI
| Agent |
Use when you need to... |
Skills loaded |
ui-ux-designer |
Review UI for usability and accessibility |
ux-review, accessibility-audit, design-system-architecture |
component-architect |
Design component APIs and composition |
design-system-architecture, typescript-advanced-patterns |
interaction-designer |
Review interaction patterns and states |
ux-review, accessibility-audit |
state-architect |
Choose or review state management approach |
react-performance-optimization, typescript-advanced-patterns |
react-specialist |
React-specific patterns and optimization |
react-performance-optimization, typescript-advanced-patterns, testing-anti-patterns |
tailwind-expert |
Tailwind styling and responsive design |
design-system-architecture, accessibility-audit |
Language Specialists
| Agent |
Use when you need to... |
Skills loaded |
python-pro |
Python idioms, async, decorators |
async-python-patterns, python-testing-patterns, python-performance-optimization |
rust-pro |
Ownership, lifetimes, traits |
test-driven-development |
typescript-pro |
Advanced types and type safety |
typescript-advanced-patterns, testing-anti-patterns |
javascript-pro |
JS/Node.js async and cross-runtime |
testing-anti-patterns, typescript-advanced-patterns |
sql-pro |
Query optimization and schema design |
database-design-patterns |
Infrastructure
| Agent |
Use when you need to... |
Skills loaded |
cloud-architect |
AWS/Azure/GCP architecture decisions |
terraform-best-practices, kubernetes-deployment-patterns, gitops-workflows |
kubernetes-architect |
K8s deployment and service mesh |
kubernetes-deployment-patterns, kubernetes-security-policies, helm-chart-patterns, gitops-workflows |
terraform-specialist |
IaC modules and state management |
terraform-best-practices |
Data
| Agent |
Use when you need to... |
Skills loaded |
database-admin |
DB operations, backup, replication |
database-design-patterns |
database-optimizer |
Slow queries, indexing, N+1 problems |
database-design-patterns |
postgres-expert |
Postgres-specific schemas and migrations |
database-design-patterns |
Documentation
| Agent |
Use when you need to... |
Skills loaded |
mermaid-expert |
Generate architecture/flow diagrams |
documentation-production |
tutorial-engineer |
Write tutorials and how-to guides |
documentation-production, code-explanation |
technical-writer |
Write clear technical documentation |
documentation-production, code-explanation |
reference-builder |
Generate API/config reference docs |
documentation-production |
Coordination & Meta
| Agent |
Use when you need to... |
Skills loaded |
orchestrator |
Break down complex tasks |
task-orchestration, dispatching-parallel-agents |
prompt-engineer |
Craft or improve prompts for AI features |
writing-skills |
learning-guide |
Understand a concept or pattern |
code-explanation |
Operating Rules
1. Consult, don't delegate implementation
These agents advise — they don't write your code. Read the answer, apply it
yourself. The agent may suggest approaches, but you implement them.
2. Scope your questions
Bad: "Review everything in src/"
Good: "Is the input validation in src/api/handler.py:45-60 safe against injection?"
Narrow questions get better answers and use fewer tokens.
3. Don't replace review gates
Consulting security-auditor during implementation doesn't skip the formal
specialist-review gate afterward. The review gates exist for independent
verification — consulting during implementation is for getting guidance early.
4. Use the cheapest agent that works
For factual lookups (where is X, what does the standard say), prefer
search-specialist or the language-specific agents. Reserve
security-auditor, debugger, and performance-engineer for questions
that need deeper analysis.
5. One question per invocation
Each claude -p --agent call is a cold start. Don't try to batch multiple
unrelated questions in one call — they'll get shallow treatment. Ask one
focused question per invocation.
Relationship to agent-loops
agent-loops claude-consult
───────────── ──────────────
Formal review gates Mid-implementation help
Runs AFTER implementation Runs DURING implementation
Produces reports with P0-P3 Answers questions directly
Required before merge Optional, use as needed
specialist-review + test-review Any agent from the roster
Both skills are designed to work together. Consult agents while implementing
to prevent issues, then run the formal review gates to verify nothing was missed.
1---
2name: claude-consult
3description: Consult Claude specialist agents during implementation for codebase understanding, pattern checking, security review, debugging help, and more. Use this skill whenever you're unsure about conventions, stuck on a failure, or need expert input before writing code. Does not replace the formal review gates in agent-loops — this is for mid-implementation consultation.
4keywords:
5 - consultation
6 - claude agent
7 - specialist
8 - expert help
9triggers:
10 - unsure about codebase conventions
11 - stuck on a test failure
12 - need security or architecture guidance
13 - before writing code in an unfamiliar area
14---
15
16# Claude Consult
17
18Get expert help from Claude specialist agents during implementation. Each agent
19has domain-specific skills pre-loaded and tools scoped to its role.
20
21**This is NOT a replacement for the review gates.** The `agent-loops` skill
22defines formal code review (`specialist-review`) and test audit
23(`diff-test-audit`) gates that run after implementation. This skill is for
24asking questions **during** implementation — before you've written code, while
25you're writing it, or when you're stuck.
26
27## When to Use
28
29- "How does this module work?" — before implementing
30- "Does my approach match existing conventions?" — while implementing
31- "Is this pattern secure?" — before committing to a design
32- "Why is this test failing?" — when stuck
33- "What do the testing standards say about X?" — before writing tests
34- "Is this component accessible?" — during UI work
35
36## How to Invoke
37
38```bash
39claude -p --agent <agent-name> "<your question>"
40```
41
42All agents run headless (`-p` / print mode). They read the codebase, apply their
43loaded skills, and return an answer to stdout. Capture or pipe as needed:
44
45```bash
46# Direct invocation
47claude -p --agent debugger "Why is test_auth_flow failing in src/auth/tests.py?"
48
49# Capture to variable
50ANSWER=$(claude -p --agent security-auditor "Is the input validation in src/api/handler.py safe?")
51
52# Save to file
53claude -p --agent architect-reviewer "Does adding a cache layer between api and db match the existing architecture?" > /tmp/arch-advice.md
54```
55
56## Agent Roster
57
58### Codebase Understanding
59
60| Agent | Use when you need to... | Skills loaded |
61|---|---|---|
62| `search-specialist` | Find where something is defined or called | codanna-codebase-intelligence |
63| `architect-reviewer` | Evaluate module boundaries and dependencies | system-design, api-design-patterns |
64| `docs-architect` | Understand existing documentation structure | documentation-production, code-explanation |
65
66### Code Quality & Patterns
67
68| Agent | Use when you need to... | Skills loaded |
69|---|---|---|
70| `code-reviewer` | Check if code follows project conventions | code-quality-workflow, testing-anti-patterns, secure-coding-practices |
71| `refiner` | Get suggestions for improving code quality | code-quality-workflow |
72| `rest-expert` | Design or check REST API patterns | api-design-patterns |
73
74### Security
75
76| Agent | Use when you need to... | Skills loaded |
77|---|---|---|
78| `security-auditor` | Full security review of a code path | owasp-top-10, secure-coding-practices, vibe-security, security-testing-patterns |
79| `owasp-top10-expert` | Check against OWASP Top 10 specifically | owasp-top-10, secure-coding-practices, vibe-security |
80| `penetration-tester` | Identify exploitable vulnerabilities | security-testing-patterns, owasp-top-10, threat-modeling-techniques |
81| `jwt-expert` | Review JWT/auth token handling | secure-coding-practices |
82| `compliance-auditor` | Check regulatory compliance | secure-coding-practices, owasp-top-10 |
83
84### Testing
85
86| Agent | Use when you need to... | Skills loaded |
87|---|---|---|
88| `test-automator` | Plan test strategy or check coverage approach | test-review, python-testing-patterns, testing-anti-patterns |
89| `vitest-expert` | Vitest-specific test patterns | testing-anti-patterns |
90
91### Debugging
92
93| Agent | Use when you need to... | Skills loaded |
94|---|---|---|
95| `debugger` | Investigate a test failure or error | systematic-debugging, root-cause-tracing |
96
97### Performance
98
99| Agent | Use when you need to... | Skills loaded |
100|---|---|---|
101| `performance-engineer` | Find bottlenecks in code paths | workflow-performance, python-performance-optimization, react-performance-optimization |
102| `frontend-optimizer` | Optimize frontend bundle/rendering | react-performance-optimization, design-system-architecture |
103| `performance-monitor` | Set up or check monitoring/observability | workflow-performance |
104
105### Frontend & UI
106
107| Agent | Use when you need to... | Skills loaded |
108|---|---|---|
109| `ui-ux-designer` | Review UI for usability and accessibility | ux-review, accessibility-audit, design-system-architecture |
110| `component-architect` | Design component APIs and composition | design-system-architecture, typescript-advanced-patterns |
111| `interaction-designer` | Review interaction patterns and states | ux-review, accessibility-audit |
112| `state-architect` | Choose or review state management approach | react-performance-optimization, typescript-advanced-patterns |
113| `react-specialist` | React-specific patterns and optimization | react-performance-optimization, typescript-advanced-patterns, testing-anti-patterns |
114| `tailwind-expert` | Tailwind styling and responsive design | design-system-architecture, accessibility-audit |
115
116### Language Specialists
117
118| Agent | Use when you need to... | Skills loaded |
119|---|---|---|
120| `python-pro` | Python idioms, async, decorators | async-python-patterns, python-testing-patterns, python-performance-optimization |
121| `rust-pro` | Ownership, lifetimes, traits | test-driven-development |
122| `typescript-pro` | Advanced types and type safety | typescript-advanced-patterns, testing-anti-patterns |
123| `javascript-pro` | JS/Node.js async and cross-runtime | testing-anti-patterns, typescript-advanced-patterns |
124| `sql-pro` | Query optimization and schema design | database-design-patterns |
125
126### Infrastructure
127
128| Agent | Use when you need to... | Skills loaded |
129|---|---|---|
130| `cloud-architect` | AWS/Azure/GCP architecture decisions | terraform-best-practices, kubernetes-deployment-patterns, gitops-workflows |
131| `kubernetes-architect` | K8s deployment and service mesh | kubernetes-deployment-patterns, kubernetes-security-policies, helm-chart-patterns, gitops-workflows |
132| `terraform-specialist` | IaC modules and state management | terraform-best-practices |
133
134### Data
135
136| Agent | Use when you need to... | Skills loaded |
137|---|---|---|
138| `database-admin` | DB operations, backup, replication | database-design-patterns |
139| `database-optimizer` | Slow queries, indexing, N+1 problems | database-design-patterns |
140| `postgres-expert` | Postgres-specific schemas and migrations | database-design-patterns |
141
142### Documentation
143
144| Agent | Use when you need to... | Skills loaded |
145|---|---|---|
146| `mermaid-expert` | Generate architecture/flow diagrams | documentation-production |
147| `tutorial-engineer` | Write tutorials and how-to guides | documentation-production, code-explanation |
148| `technical-writer` | Write clear technical documentation | documentation-production, code-explanation |
149| `reference-builder` | Generate API/config reference docs | documentation-production |
150
151### Coordination & Meta
152
153| Agent | Use when you need to... | Skills loaded |
154|---|---|---|
155| `orchestrator` | Break down complex tasks | task-orchestration, dispatching-parallel-agents |
156| `prompt-engineer` | Craft or improve prompts for AI features | writing-skills |
157| `learning-guide` | Understand a concept or pattern | code-explanation |
158
159## Operating Rules
160
161### 1. Consult, don't delegate implementation
162
163These agents advise — they don't write your code. Read the answer, apply it
164yourself. The agent may suggest approaches, but **you** implement them.
165
166### 2. Scope your questions
167
168Bad: `"Review everything in src/"`
169Good: `"Is the input validation in src/api/handler.py:45-60 safe against injection?"`
170
171Narrow questions get better answers and use fewer tokens.
172
173### 3. Don't replace review gates
174
175Consulting `security-auditor` during implementation doesn't skip the formal
176`specialist-review` gate afterward. The review gates exist for independent
177verification — consulting during implementation is for getting guidance early.
178
179### 4. Use the cheapest agent that works
180
181For factual lookups (where is X, what does the standard say), prefer
182`search-specialist` or the language-specific agents. Reserve
183`security-auditor`, `debugger`, and `performance-engineer` for questions
184that need deeper analysis.
185
186### 5. One question per invocation
187
188Each `claude -p --agent` call is a cold start. Don't try to batch multiple
189unrelated questions in one call — they'll get shallow treatment. Ask one
190focused question per invocation.
191
192## Relationship to agent-loops
193
194```
195agent-loops claude-consult
196───────────── ──────────────
197Formal review gates Mid-implementation help
198Runs AFTER implementation Runs DURING implementation
199Produces reports with P0-P3 Answers questions directly
200Required before merge Optional, use as needed
201specialist-review + test-review Any agent from the roster
202```
203
204Both skills are designed to work together. Consult agents while implementing
205to prevent issues, then run the formal review gates to verify nothing was missed.