复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-content-audit-933e2465bc43 ,按照其中的说明把「content-audit」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
!bash "${CLAUDE_SKILL_DIR}/../../hooks/yaml-helper.sh" resolve_config --keys workflow,automation
Automation mode: Resolve modes.automation (project.local.yaml →
project.yaml → default collaborative). Every AskUserQuestion call and
every file write follows .claude/docs/automation-modes.md
(collaborative asks always · guided major-only · autonomous logs and proceeds;
automation_always_ask categories always prompt).
Resolved above — use as-is. No block → defaults in .claude/docs/config-resolution.md.
This skill declares tier-dependent behaviour ("audit only specs in the required sections"), which is unreachable unless the tier is actually resolved — without it the skill applies whatever tier it assumed. Resolve
modes.workflowbefore auditing, and when a required input such asdesign/gdd/systems-index.mdis absent, reportNOT ASSESSED — NO DATArather than computing a gap percentage (which divides by zero when nothing is specified).
When this skill is invoked:
Parse the argument:
[system-name] → audit that single system only--summary → summary table only, no file writeworkflow (see .claude/docs/workflow-modes.md):
full — full content-count audit against all GDD specs.standard — audit only specs in the required sections.minimal — cannot run (no systems index exists).If the inputs this skill needs do not exist, the answer is "could not run" — not a filled-in report. Check first, and stop if the check fails.
FOUND or ABSENT — not "assumed present".NOT ASSESSED — NO DATA. Do not estimate it, do not infer it from an
adjacent artifact, and do not leave a mandated cell to be filled by whoever
reads the template next.NOT ASSESSED — NO DATA as the whole verdict, naming what was missing and
which skill produces it.A verdict of NOT ASSESSED is a success. It is the correct, useful answer to
"what does the data say?" when there is no data. The failure mode this prevents is
specific and has been observed in practice: report templates whose verdict
enum had no "could not run" state produced false clean passes — an asset audit
returning COMPLIANT on a project with no assets and no standards, and a
performance profile reporting ">99% headroom against a 16.67ms budget" with zero
profiler data and no budget ever set.
Absence of evidence is never evidence of absence. A scan that finds no matches because there are no files to scan has not verified anything. Say which of the two happened — a reader cannot tell from a green result.
Read design/gdd/systems-index.md for the full list of systems, their
categories, and MVP/priority tier.
Registry-first count: If design/registry/entities.yaml exists, read it
first. Its entities and items sections are the cross-GDD named content
the audit is counting, already distilled with a source: GDD per entry:
Grep pattern="^ - name:" path="design/registry/entities.yaml" output_mode="content" -A 2
- name: appears in all four registry sections; keep only the names whose
-A 2 context shows they sit under entities: or items: (the named
content this audit counts — not formulas:/constants:). Use those as the
planned named-content set without full-reading the GDDs that own them.
If design/registry/entities.yaml does not exist or has no entries (it
ships as an empty stub until /design-system populates it), skip this step
and rely on the GDD scan below — behaviour is unchanged, only more expensive.
L0 pre-scan: Before full-reading any GDDs, run two greps — they answer different questions and must not share a pattern:
a. Which GDDs carry a Summary (the denominator / fail-open check):
Grep pattern="^## Summary" glob="design/gdd/*.md" output_mode="files_with_matches"
b. Which GDDs actually declare content counts (the narrowing step):
Grep pattern="[0-9]+[[:space:]]+(enemies|enemy types|levels|areas|maps|stages|items|weapons|equipment|abilities|skills|spells|cutscenes|conversations|dialogue scenes|bosses|quests)|(enemy|item|weapon|ability|level) types:" glob="design/gdd/*.md" output_mode="files_with_matches"
These were one grep, and it narrowed nothing. The old pattern was
(## Summary|N enemies|N levels|N items|N abilities|enemy types|item types).N enemiesand friends are un-substituted placeholders copied from the template — no real GDD contains the literal letterNas a count — while## Summarymatches every compliant GDD. So the union returned all GDDs and step 3's whole purpose (read-avoidance) saved zero tokens. Pattern (b) matches digits followed by the content nouns step 5 actually extracts.
Fail open on a missing Summary. Establish the denominator: glob
design/gdd/*.md and count . matching fewer than N means
those GDDs predate — never treat an absent Summary as a system
out of scope; a zero-match (a) means "no GDD carries a Summary yet", not "no
auditable content". Full-read the unmatched in-scope GDDs.
For each content type found in Phase 1, scan the relevant directories to count what has been implemented. Use Glob and Grep to locate files.
Levels / Areas / Maps:
assets/**/*.tscn, assets/**/*.unity, assets/**/*.umap*.tscn (Godot), *.unity (Unity), *.umap (Unreal). Resolve the root per .claude/docs/code-root-resolution.md. If the code root is unresolved, report NOT ASSESSED — code root unresolved rather than zero hits.levels/, areas/, maps/,
worlds/, stages/Enemies / Characters / NPCs:
assets/data/**/enemies/**, assets/data/**/characters/**<code root>/**/enemies/**, <code root>/**/characters/**.json, .tres, .asset, .yaml data files defining entity statsItems / Equipment / Loot:
assets/data/**/items/**, assets/data/**/equipment/**,
assets/data/**/loot/**.json, .tres, .asset data filesAbilities / Skills / Spells:
assets/data/**/abilities/**, assets/data/**/skills/**,
assets/data/**/spells/**.json, .tres, .asset data filesDialogue / Conversations / Cutscenes:
assets/**/*.dialogue, assets/**/*.csv, assets/**/*.inkassets/data/Quests / Missions:
assets/data/**/quests/**, assets/data/**/missions/**.json, .yaml definition filesEngine-specific notes (acknowledge in the report):
Produce the gap table:
| System | Content Type | Specified | Found | Gap | Status |
|--------|-------------|-----------|-------|-----|--------|
Status categories:
COMPLETE — Found ≥ Specified (100%+)IN PROGRESS — Found is 50–99% of SpecifiedEARLY — Found is 1–49% of SpecifiedNOT STARTED — Found is 0Priority flags:
Flag a system as HIGH PRIORITY in the report if:
NOT STARTED or EARLY, ANDSummary line:
(Specified - Found) / Specified * 100Present the gap table and summary to the user. Ask: "May I write the full report to docs/content-audit-[YYYY-MM-DD].md?"
If yes, write the file:
# Content Audit — [Date]
## Summary
- **Total specified**: [N] content items across [M] systems
- **Total found**: [N]
- **Gap**: [N] items ([X%] unimplemented)
- **Scope**: [Full audit | System: name]
> Note: Counts are approximations based on file scanning.
> The audit cannot distinguish shipped content from editor/test assets.
> Manual verification is recommended for any HIGH PRIORITY gaps.
## Gap Table
| System | Content Type | Specified | Found | Gap | Status |
|--------|-------------|-----------|-------|-----|--------|
## HIGH PRIORITY Gaps
[List systems flagged HIGH PRIORITY with rationale]
## Per-System Breakdown
### [System Name]
- **GDD**: `design/gdd/[file].md`
- **Content types audited**: [list]
- **Notes**: [any caveats about scan accuracy for this system]
## Recommendation
Focus implementation effort on:
1. [Highest-gap HIGH PRIORITY system]
2. [Second system]
3. [Third system]
## Unspecified Content Counts
The following GDDs describe content without giving explicit counts.
Consider adding counts to improve auditability:
[List of GDDs and content types with "Unspecified"]
After writing the report, ask:
"Would you like to create backlog stories for any of the content gaps?"
If yes: for each system the user selects, suggest a story title and point them
to /create-stories [epic-slug] or /quick-design depending on the size of the gap.
Print the Gap Table and Summary directly to conversation. Do not write a file.
End with: "Run /content-audit without --summary to write the full report."
After the audit, recommend the highest-value follow-up actions:
NOT STARTED and MVP-tagged → "Run /design-system [name] to
add missing content counts to the GDD before implementation begins."/sprint-plan to allocate content work across upcoming sprints."/create-stories [epic-slug] for each HIGH PRIORITY gap."--summary was used → "Run /content-audit (no flag) to write the full report to docs/."Verdict: COMPLETE — content audit finished.
## SummaryFor a single-system audit: skip this step and go straight to full-read. For a full audit: full-read only the GDDs that scan (b) matched and are not already fully covered by the registry entries from step 2. GDDs with no content-count language (pure mechanics GDDs) are noted as "No auditable content counts" without a full read.
Full-read in-scope GDD files (or the single system GDD if a system name was given).
For each GDD, extract explicit content counts or lists. Look for patterns like:
Build a content inventory table from the extracted data:
| System | Content Type | Specified Count/List | Source GDD |
|---|
Note: If a GDD describes content qualitatively but gives no count, record "Unspecified" and flag it — unspecified counts are a design gap worth noting.