Unified quality gate: auto-detects target type and runs skill diagnostics (C1–C18 structural checks on SKILL.md files) and/or code convention audit (naming, formatting, import order) in a single pass, merging all findings into one priority-ranked report. Trigger when: unified quality audit, quality gate, check skill and code, audit everything, 統一品質審查, 檢查 skill 跟 code, 全面品質掃描, quality scan, full audit. Do not trigger for skill-only scan (use skill-diagnostics), code-only check (use code-convention-auditor), or security scan (use security-audit).
單一指令掃描專案中的 skill 檔案與源碼,自動判斷目標類型,合併輸出優先級報告。
Auto-detect whether the target path contains SKILL.md files, source code, or both — then apply C1–C18 skill diagnostics and/or code convention checks — and merge all findings into one unified priority-ranked report with source labels.
Apply when user requests:
Do NOT trigger for:
skill-diagnosticscode-convention-auditorsecurity-auditskill-auditALL specified by the userDetect target type — scan the target path and classify files:
SKILL.md files found → queue skill check.ts, .tsx, .py, .go, .js) found → queue code checkRun skill diagnostics (if skill files queued) — apply the full C1–C18 checklist exactly as defined in skill-diagnostics:
ref/ref/ linksformat: github-imported skillsRun code convention audit (if source files queued) — apply rules from code-convention-auditor:
CLAUDE.md → linter config → language defaultsany; Python: type hints; Go: no ignored errors)Merge and label findings — combine all results; prefix each finding with [SKILL] or [CODE]; sort CRITICAL → HIGH → MEDIUM → LOW within each group
Output unified report — present the combined report; wait for user confirmation before applying any code fixes
## Unified Quality Report: <target>
Scanned: <N> SKILL.md files · <N> source files
Languages: <TypeScript | Python | Go | —>
### CRITICAL
| # | Source | File | Check | Evidence | Fix |
|---|--------|------|-------|----------|-----|
| 1 | [SKILL] | skill-name/SKILL.md | C14 broken ref | [guide.md](ref/guide.md) not found | Create ref/guide.md or fix path |
(無問題時:✓ 無 CRITICAL)
### HIGH
| # | Source | File | Check | Evidence | Fix |
### MEDIUM
| # | Source | File | Check | Evidence | Fix |
### LOW
(略)
### 總結
SKILL: CRITICAL N · HIGH N · MEDIUM N
CODE: HIGH N · MEDIUM N · LOW N
### 判定
[ ] PASS — 無 CRITICAL / HIGH
[x] FAIL — 修正後重新執行
[SKILL] or [CODE] so the user knows which checker flagged itskill-diagnostics — do not invent new skill checkscode-convention-auditor — respect project-level overridesUser: "幫我 audit 整個 dev/quality 目錄"
## Unified Quality Report: dev/quality
Scanned: 10 SKILL.md files · 0 source files
Languages: —
### CRITICAL
✓ 無 CRITICAL
### HIGH
| # | Source | File | Check | Evidence | Fix |
|---|--------|------|-------|----------|-----|
| 1 | [SKILL] | code-convention-auditor/SKILL.md | C6 no Do NOT | Trigger section missing exclusion clause | Add "Do NOT trigger for:" |
### MEDIUM
✓ 無 MEDIUM
### 總結
SKILL: CRITICAL 0 · HIGH 1 · MEDIUM 0
### 判定
[x] FAIL — 修正後重新執行
User: "幫我 audit dev/quality 目錄"
Claude only checks source code files and ignores the SKILL.md files present in the directory.
Why this is bad: The target contains both SKILL.md files and source code. Running only one check violates the Must rule "run both checks when both file types are present". Half the findings are silently dropped.