Get the FREE Ultimate OpenClaw Setup Guide →

claude-consult

npx machina-cli add skill NickCrew/claude-cortex/claude-consult --openclaw
Files (1)
SKILL.md
9.3 KB

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 (test-review-request) 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

AgentUse when you need to...Skills loaded
search-specialistFind where something is defined or calledcodanna-codebase-intelligence
architect-reviewerEvaluate module boundaries and dependenciessystem-design, api-design-patterns
docs-architectUnderstand existing documentation structuredocumentation-production, code-explanation

Code Quality & Patterns

AgentUse when you need to...Skills loaded
code-reviewerCheck if code follows project conventionscode-quality-workflow, testing-anti-patterns, secure-coding-practices
refinerGet suggestions for improving code qualitycode-quality-workflow
rest-expertDesign or check REST API patternsapi-design-patterns

Security

AgentUse when you need to...Skills loaded
security-auditorFull security review of a code pathowasp-top-10, secure-coding-practices, vibe-security, security-testing-patterns
owasp-top10-expertCheck against OWASP Top 10 specificallyowasp-top-10, secure-coding-practices, vibe-security
penetration-testerIdentify exploitable vulnerabilitiessecurity-testing-patterns, owasp-top-10, threat-modeling-techniques
jwt-expertReview JWT/auth token handlingsecure-coding-practices
compliance-auditorCheck regulatory compliancesecure-coding-practices, owasp-top-10

Testing

AgentUse when you need to...Skills loaded
test-automatorPlan test strategy or check coverage approachtest-review, python-testing-patterns, testing-anti-patterns
vitest-expertVitest-specific test patternstesting-anti-patterns

Debugging

AgentUse when you need to...Skills loaded
debuggerInvestigate a test failure or errorsystematic-debugging, root-cause-tracing

Performance

AgentUse when you need to...Skills loaded
performance-engineerFind bottlenecks in code pathsworkflow-performance, python-performance-optimization, react-performance-optimization
frontend-optimizerOptimize frontend bundle/renderingreact-performance-optimization, design-system-architecture
performance-monitorSet up or check monitoring/observabilityworkflow-performance

Frontend & UI

AgentUse when you need to...Skills loaded
ui-ux-designerReview UI for usability and accessibilityux-review, accessibility-audit, design-system-architecture
component-architectDesign component APIs and compositiondesign-system-architecture, typescript-advanced-patterns
interaction-designerReview interaction patterns and statesux-review, accessibility-audit
state-architectChoose or review state management approachreact-performance-optimization, typescript-advanced-patterns
react-specialistReact-specific patterns and optimizationreact-performance-optimization, typescript-advanced-patterns, testing-anti-patterns
tailwind-expertTailwind styling and responsive designdesign-system-architecture, accessibility-audit

Language Specialists

AgentUse when you need to...Skills loaded
python-proPython idioms, async, decoratorsasync-python-patterns, python-testing-patterns, python-performance-optimization
rust-proOwnership, lifetimes, traitstest-driven-development
typescript-proAdvanced types and type safetytypescript-advanced-patterns, testing-anti-patterns
javascript-proJS/Node.js async and cross-runtimetesting-anti-patterns, typescript-advanced-patterns
sql-proQuery optimization and schema designdatabase-design-patterns

Infrastructure

AgentUse when you need to...Skills loaded
cloud-architectAWS/Azure/GCP architecture decisionsterraform-best-practices, kubernetes-deployment-patterns, gitops-workflows
kubernetes-architectK8s deployment and service meshkubernetes-deployment-patterns, kubernetes-security-policies, helm-chart-patterns, gitops-workflows
terraform-specialistIaC modules and state managementterraform-best-practices

Data

AgentUse when you need to...Skills loaded
database-adminDB operations, backup, replicationdatabase-design-patterns
database-optimizerSlow queries, indexing, N+1 problemsdatabase-design-patterns
postgres-expertPostgres-specific schemas and migrationsdatabase-design-patterns

Documentation

AgentUse when you need to...Skills loaded
mermaid-expertGenerate architecture/flow diagramsdocumentation-production
tutorial-engineerWrite tutorials and how-to guidesdocumentation-production, code-explanation
technical-writerWrite clear technical documentationdocumentation-production, code-explanation
reference-builderGenerate API/config reference docsdocumentation-production

Coordination & Meta

AgentUse when you need to...Skills loaded
orchestratorBreak down complex taskstask-orchestration, dispatching-parallel-agents
prompt-engineerCraft or improve prompts for AI featureswriting-skills
learning-guideUnderstand a concept or patterncode-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.

Source

git clone https://github.com/NickCrew/claude-cortex/blob/main/codex/skills/claude-consult/SKILL.mdView on GitHub

Overview

Get expert help from Claude specialist agents during implementation for codebase understanding, pattern checks, security review, and debugging. Use it when you're unsure about conventions, stuck on a failure, or need input before writing code. Note: it does not replace formal review gates in agent-loops.

How This Skill Works

Invoke Claude in headless mode with a targeted agent and your question using: claude -p --agent <agent-name> "<your question>". The agent reads the codebase, applies its loaded skills, and returns an answer to stdout which you can capture or pipe to a variable or file for further action.

When to Use It

  • unsure about codebase conventions
  • stuck on a test failure
  • need security or architecture guidance
  • before writing code in an unfamiliar area
  • Is this component accessible? — during UI work

Quick Start

  1. Step 1: Identify the area where you need guidance (code path, test, or design).
  2. Step 2: Pick an agent that matches the need (security-auditor, architect-reviewer, etc.).
  3. Step 3: Run the claude command with your question and use the output in your workflow.

Best Practices

  • Ask early and be specific about the code area or pattern you want to validate
  • Choose the right agent (e.g., security-auditor for security, architect-reviewer for architecture)
  • Frame questions around concrete code paths, tests, or design constraints
  • Validate outputs by running local checks or tests and cross-check with existing standards
  • Use headless mode and capture the answer for documentation or review

Example Use Cases

  • 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
  • Code conventions check: claude -p --agent code-reviewer "Does my new module follow the project's naming conventions?"
  • Pattern search: claude -p --agent search-specialist "Where is the function defined for user lookup?"

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers