跳到主要内容
知仓学习社ZHICANG

phx-audit

Project health audit and health check — architecture, performance, tests,

不碰外部(只输出文字)无严重或高危命中oliver-kriska/claude-elixir-phoenix

它会碰到什么

扫了多少3 个文本文件,13 KB
它会碰到什么不碰外部(只输出文字)
命中总数0 处
命中统计严重 0 · 高 0 · 中 0 · 低 0

这一栏是扫描器报的事实,不是结论。命中多不等于有毒(安全工具、规则库、示例脚本本来就会包含危险写法),命中少也不等于干净。它和你手上的凭据、文件、网络有什么关系,需要你自己看。

技能内容

Project Health Audit

Comprehensive project-wide health assessment across five independent concern tracks.

Usage

/skill:phx-audit              # Full audit (default)
/skill:phx-audit --quick      # 2-3 minute pulse check
/skill:phx-audit --focus=security   # Deep dive single area
/skill:phx-audit --focus=performance
/skill:phx-audit --since abc123   # Incremental audit since commit
/skill:phx-audit --since HEAD~10  # Audit last 10 commits

When to Use

  • Quarterly health checks
  • Before major releases
  • After large refactors
  • New team member onboarding (understand codebase health)

Iron Laws

  1. Complete every selected track before synthesizing — partial results make

cross-category scores misleading

  1. Scope each track to concrete directories and checks — vague project-wide

analysis produces generic findings

  1. Never compare scores across projects — track trends only within the same

codebase

  1. Run quick mode before full mode — catch basic failures before expensive

analysis

Portable Audit Workflow

  1. Create .claude/audit/reports/ and .claude/audit/summaries/.
  2. Run the quick checks below. Stop and report a blocker when the project cannot

compile or its test command cannot start.

  1. Complete five tracks: architecture, performance, security, tests, and

dependencies. Native generic workers may run independent tracks in parallel

when the runtime provides them; otherwise run every track sequentially in

this session. Never require named custom agents.

  1. Write one evidence-focused report per track under .claude/audit/reports/.

Report issues only, cite paths and lines, and use one summary line for a

clean area.

  1. After all selected reports exist, deduplicate findings, identify

cross-category correlations, calculate scores using

references/scoring-methodology.md, and write

.claude/audit/summaries/project-health-{date}.md.

If two or more optional workers fail or hit limits, finish the missing tracks

sequentially. Never present an incomplete track as audited.

Output Format

Report an executive health score, per-category scores for Architecture,

Performance, Security, Tests, and Dependencies, critical issues, top

recommendations, and an Immediate/Short-term/Long-term action plan.

Quick Mode (--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 Mode (--focus=area)

Run only the selected concern track with its deeper checks:

| Focus | Extra checks |

|-------|--------------|

| security | Full OWASP review, Sobelow, manual authorization patterns |

| performance | Query plans, N+1 inventory, profiling evidence |

| architecture | Full xref graph, coupling matrix, cohesion |

| tests | Coverage by context, isolation, flaky-test indicators |

| deps | Vulnerabilities, licenses, maintenance status |

Incremental Mode (--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: /skill:phx-audit --since HEAD~5 --focus=security

Relationship to Other Commands

| Command | Scope | Frequency |

|---------|-------|-----------|

| /skill:phx-review | Changed files (diff) | Every PR |

| /skill:phx-audit | Entire project | Quarterly |

| /skill:phx-boundaries | Context structure | On-demand |

| /skill:phx-verify | Compile/test pass | Anytime |

References

  • references/scoring-methodology.md - How scores are calculated
  • references/architecture-checks.md - Detailed architecture criteria

想直接用这个技能?

本站把开放许可(MIT / Apache 等)的技能按仓库打包整理到网盘,点一下转存到你自己的网盘,不用一个个从 GitHub 拉。许可未声明的技能只给原始仓库链接,不打包。

它属于哪个仓库

星标★ 553
本站分层T2
该仓技能数322
原文件路径targets/pi/skills/phx-audit/SKILL.md

同一个仓库里的其他技能

看这个仓库的全部 322 个技能

同名技能的其他版本

有 5 个不同仓库或目录里都有叫 phx-audit 的技能。它们内容并不相同,别混用: