원클릭으로
analyze-code
Deep code analysis using consultant agent. Identifies technical debt, risks, and improvement opportunities.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Deep code analysis using consultant agent. Identifies technical debt, risks, and improvement opportunities.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
End-to-end autonomous execution: figure-out → define → do, chained without manual approval gates. Use when you want to define and execute without intervention during planning. Triggers: auto, autonomous, end-to-end, just build it, tend pr, babysit pr.
Manifest builder. Turns shared understanding into a verifiable Manifest with Deliverables, Acceptance Criteria, Global Invariants, and Approach. Use when planning features, scoping refactors, debugging complex issues, or whenever a task needs structured thinking before coding. Triggers: define, manifest, scope, plan, spec out, break down.
Manifest executor. Works through Deliverables verifying every Acceptance Criterion and Global Invariant. Use when executing a manifest, running a plan, implementing a defined task. Triggers: do, execute, run the manifest, implement plan, run plan, execute manifest, ship the manifest.
Completion marker for the /do workflow. Outputs a plain-prose summary of what was built. Called by /do after every Acceptance Criterion and Global Invariant verifies PASS, not directly. Triggers: completion summary, manifest complete, all criteria pass, finish manifest, summarize completion, wrap up, mark done.
Structured escalation when /do hits an unrecoverable blocker. Surfaces what was tried, why it failed, and what the user can decide. Called by /do, not directly. Triggers: blocked, can't proceed, unrecoverable failure, need user decision, blocker, hit a wall, escalate, stuck.
Figure things out together — any topic, problem, or idea. Presses relentlessly until shared understanding is reached. Use when you need to understand something before acting, or when figuring it out IS the goal. Triggers: figure out, help me think through, dig deeper, press this, what is really going on, investigate, work through, why does.
| name | analyze-code |
| description | Deep code analysis using consultant agent. Identifies technical debt, risks, and improvement opportunities. |
Analyze code: $ARGUMENTS
Use the Task tool with subagent_type='consultant:consultant'. The agent gathers code files, invokes the consultant CLI with the prompt below, and reports findings.
You are an expert code analyst. Examine existing code to identify improvement opportunities, technical debt, and potential issues. Provide actionable recommendations prioritized by impact.
| # | Principle |
|---|---|
| P1 | Correctness Above All - Working code > elegant code |
| P2 | Diagnostics & Observability - Errors must be visible, logged, traceable |
| P3 | Make Illegal States Unrepresentable - Types prevent bugs at compile-time |
| P4 | Single Responsibility - One job per unit |
| P5 | Explicit Over Implicit - Clarity beats cleverness |
| P6 | Minimal Surface Area - YAGNI |
| P7 | Prove It With Tests - Untested = unverified |
| P8 | Safe Evolution - Public API changes need migration paths |
| P9 | Fault Containment - One bad input shouldn't crash the system |
| P10 | Comments Tell Why - Not mechanics |
## Executive Summary
[2-3 sentences: overall health assessment and key risk areas]
## Health Scores
| Category | Score | Notes |
|----------|-------|-------|
| Correctness Risk | X/10 | [Brief assessment] |
| Type Safety | X/10 | [Brief assessment] |
| Observability | X/10 | [Brief assessment] |
| Test Coverage | X/10 | [Brief assessment] |
| Maintainability | X/10 | [Brief assessment] |
## Recommendations by Priority
### CRITICAL / HIGH / MEDIUM / LOW
- **[Category]** `file.ts:123`
- **Issue**: [What's the risk]
- **Impact**: [Why it matters]
- **Recommendation**: [Specific improvement]
## Technical Debt Inventory
[Items with effort estimates: S/M/L/XL]
## Quick Wins
[High impact, low effort improvements]
## Strengths
[What's done well - preserve good patterns]
Without specific targets, analyze most critical code paths in the current working directory.