elixir-phoenix-audit
Audit project health across architecture, security, performance, tests, and deps.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Audit project health across architecture, security, performance, tests, and deps.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Recommend the right `$elixir-phoenix-*` skill for the current task.
Elixir/Phoenix: Review lifecycle, state-machine, Oban, persistence, pause/resume, retry, and restart-sensitive changes before commit, push, or PR. Use for concurrency-sensitive runtime work to produce explicit blocking vs optional findings, require durability checks, and verify smoke plus restart resilience when applicable.
Capture a solved Phoenix problem as a reusable solution doc.
Audit LiveView assigns for memory bloat, dead assigns, and stream candidates.
Analyze Phoenix context boundaries and coupling with `mix xref`.
Brainstorm Phoenix features, tradeoffs, and requirements before planning.
| name | elixir-phoenix-audit |
| description | Audit project health across architecture, security, performance, tests, and deps. |
| metadata | {"short-description":"Audit Phoenix project health"} |
Comprehensive project-wide health assessment using 5 parallel specialist subagents.
`elixir-phoenix-audit` # Full audit (default)
`elixir-phoenix-audit` --quick # 2-3 minute pulse check
`elixir-phoenix-audit` --focus=security # Deep dive single area
`elixir-phoenix-audit` --focus=performance
`elixir-phoenix-audit` --since abc123 # Incremental audit since commit
`elixir-phoenix-audit` --since HEAD~10 # Audit last 10 commits
--quick first to catch compile/test failures before spending tokens on 5 parallel agentsSpawn 5 specialists in parallel using agent tools when explicitly requested by the user:
| Subagent | Focus | Output File |
|---|---|---|
| Architecture Reviewer | Structure quality, coupling, cohesion | arch-review.md |
| Performance Auditor | N+1, indexes, bottlenecks, scalability | perf-audit.md |
| Security Auditor | OWASP scan, auth patterns, secrets | security-audit.md |
| Test Health Auditor | Coverage, quality, flaky tests | test-audit.md |
| Dependency Auditor | Vulnerabilities, outdated, unused | deps-audit.md |
Create progress tasks for each audit area and mark them in progress as each auditor starts.
Authoritative behavior:
Agent prompts must be FOCUSED. Scope each prompt to the relevant directories and patterns. Do NOT give vague prompts like "analyze the codebase."
Output efficiency: Tell each agent: "Report ONLY issues found. Do NOT list clean checks, passing categories, or 'What's Good'. One summary line per clean area suffices."
Wait for ALL auditors to complete. Mark each auditor's task as
completed in the progress tracker as it finishes. NEVER proceed while
any auditor is still running.
Read reports from .codex/audit/reports/.
After all five auditors complete, run a consolidation pass to compress findings from
.codex/audit/reports/ into .codex/audit/summaries/, focusing on category scores,
critical findings only, cross-category correlations, and deduplicated issues.
Read .codex/audit/summaries/consolidated.md for synthesis.
Each category scores 0-100. See references/scoring-methodology.md.
Write to .codex/audit/summaries/project-health-{date}.md.
Report includes: Executive summary with health score (A-F, numeric/100), per-category score table (Architecture, Performance, Security, Tests, Dependencies), critical issues, top recommendations, and action plan (Immediate/Short-term/Long-term).
--quick)Only run essential checks (~2-3 minutes):
Run mix compile --warnings-as-errors, then mix hex.audit && mix deps.audit,
then mix xref graph --format stats, then mix test --trace 2>&1 | tail -20.
Skip: Full security scan, N+1 analysis, test quality metrics, architecture deep dive.
--focus=area)Deep dive single area with full specialist resources:
| Focus | Subagent | Extra Checks |
|---|---|---|
security | security-analyzer | Full OWASP, sobelow, manual patterns |
performance | (performance subagent) | Profile-level analysis, query explain |
architecture | (arch subagent) | Full xref, coupling matrix, cohesion |
tests | testing-reviewer | Coverage by context, quality metrics |
deps | (deps subagent) | License audit, maintenance status |
--since <commit>)Analyze only changes since a specific commit. Useful for pre-merge checks:
Run git diff --name-only <commit>...HEAD to identify changed files, then run targeted audits on changed files only (skips full project scan).
Combines with other flags: ``elixir-phoenix-audit --since HEAD~5 --focus=security
| Command | Scope | Frequency |
|---|---|---|
elixir-phoenix-review | Changed files (diff) | Every PR |
elixir-phoenix-audit | Entire project | Quarterly |
elixir-phoenix-boundaries | Context structure | On-demand |
elixir-phoenix-verify | Compile/test pass | Anytime |
references/scoring-methodology.md - How scores are calculatedreferences/architecture-checks.md - Detailed architecture criteria