Per-asset visual specs plus AI generation prompts from GDDs and character profiles. After the art bible.
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-asset-spec-00e80351af3f ,按照其中的说明把「asset-spec」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
!bash "${CLAUDE_SKILL_DIR}/../../hooks/yaml-helper.sh" resolve_config --keys review_mode,automation
If no argument is provided, check whether design/assets/entity-inventory.md exists:
AskUserQuestion:
[A] Yes — spec [name] / [B] Pick a different item / [C] Stop heredesign/assets/asset-manifest.md. If manifest exists, same flow above but reading from manifest.Every AskUserQuestion call follows .claude/docs/automation-modes.md
(collaborative asks always · guided major-only · autonomous logs and proceeds;
automation_always_ask categories always prompt). Note: actually invoking an external image
generator (calling an image API) always prompts regardless of
modes.automation — it is an irreversible external action guarded
unconditionally, independent of whether external_calls is listed in
automation_always_ask. (Today this skill only emits generation-prompt
text; the guard applies if live generation is ever wired in.)
This flow produces design/assets/entity-inventory.md — the master list of everything
the game needs visually. Run once before asset spec work begins.
Read all available source material in parallel:
design/gdd/systems-index.md — extract every system listedGrep pattern="## (Visual/Audio Requirements|UI Requirements)" glob="design/gdd/*.md" output_mode="content" -A 25
For named entities (characters, enemies, buildings, items), read
design/registry/entities.yaml (entities/items) if it exists and has
entries; otherwise grep the GDDs for named content. Full-read a GDD only when
its Visual/Audio section is missing or reads [To be designed] (Phase 1 already
handles that case). VFX events surface in the Visual/Audio grep context.design/art/art-bible.md — extract: any named visual categories, asset type expectationsdesign/narrative/ — scan for any character or world entity documents if they exist (optional — not required)Organize everything found into categories:
Characters / Protagonists
Enemies / Creatures
Buildings / Structures
Environment / Terrain
Items / Props
VFX / Particles
UI Screens (list each screen by name)
HUD Elements
Audio (SFX, music — descriptions only, no generation prompts)
Other
For each item, note the source doc it was found in.
Present the full proposed inventory to the user in conversation. Then use AskUserQuestion:
[A] Looks good — save this inventory[B] Add items I'll describe[C] Remove items that don't apply[D] Both add and remove — let me editIf [B] or [D]: ask the user to describe additional items. Accept brief descriptions ("a medieval keep, used as a level background") or detailed ones — either works. Work through them collaboratively until the user is satisfied.
If [C] or [D]: ask which items to remove and why. Remove them from the list.
After user approval, ask: "May I write the entity inventory to design/assets/entity-inventory.md?"
Write the file:
# Visual Entity & Screen Inventory
> Generated: [date]
> Sources: [list of source docs read]
## Entities
| # | Name | Type | Description | Source | Status |
|---|------|------|-------------|--------|--------|
| 1 | [name] | Character / Enemy / Building / Environment / Item / Other | [brief description] | [source doc] | Needed |
## UI Screens
| # | Screen Name | Description | Source | Status |
|---|-------------|-------------|--------|--------|
| 1 | Main Menu | [description] | [source] | Needed |
## HUD Elements
| # | Element | Description | Source | Status |
|---|---------|-------------|--------|--------|
## Audio
| # | Name | Type (SFX / Music / Ambient) | Description | Source | Status |
|---|------|------------------------------|-------------|--------|--------|
After writing, tell the user:
"Entity inventory saved. Next steps:
- Run
/ux-design [screen name]for each UI screen in the inventory- Run
/asset-spec entity:[name]to spec each visual entity- Or run
/asset-specagain to work through the inventory one item at a time"
Extract:
system, level, or character--review [full|lean|solo] if presentThe effective mode is the one already resolved at the top of this skill via
resolve_config --keys review_mode, which applies the full chain and
defaults to lean — not full. A --review argument overrides it for this
run only.
Mode behavior:
full: spawn both art-director and technical-artist in parallellean: spawn art-director only — faster, skips technical constraint passsolo: no agent spawning — main session writes specs from art bible rules alone. Use for simple asset categories or when speed matters more than depth.Read all source material before asking the user anything.
Art bible: Read design/art/art-bible.md — fail if missing:
"No art bible found. Run
/art-biblefirst — asset specs are anchored to the art bible's visual rules and asset standards." Extract: Visual Identity Statement, Color System (semantic colors), Shape Language, Asset Standards (art bible Section 8 — dimensions, formats, polycount budgets, texture resolution tiers).
Project config: Read performance.* and naming.* from project.yaml; for any key absent or empty (including when project.yaml has no performance or naming block), fall back to .claude/docs/technical-preferences.md. Extract performance budgets and naming conventions.
design/gdd/[target-name].md. Extract the Visual/Audio Requirements section. If it doesn't exist or reads [To be designed]:
"The Visual/Audio section of
design/gdd/[target-name].mdis empty. Either run/design-system [target-name]to complete the GDD, or describe the visual needs manually." UseAskUserQuestion:[A] Describe needs manually/[B] Stop — complete the GDD first
design/levels/[target-name].md. Extract art requirements, asset list, VFX needs, and the art-director's production concept specs from Step 4.design/narrative/characters/[target-name].md or search design/narrative/ and design/assets/entity-inventory.md for a matching entry. Extract visual description, role, and any specified distinguishing features.
AskUserQuestion:
[A] Describe it now / [B] Skip this entity / [C] Stop heredesign/assets/asset-manifest.md if it exists — extract already-specced assets for this target to avoid duplicates.design/assets/specs/*.md — scan for assets that could be shared (e.g., a common UI element specced for one system might apply here too).Asset Spec: [Target Type] — [Target Name]
- Source doc: [path] — [N] asset types identified
- Art bible: found — Asset Standards at Section 8
- Existing specs for this target: [N already specced / none]
- Shared assets found in other specs: [list or "none"]
From the source doc, extract every asset type mentioned — explicit and implied.
For systems: look for VFX events, sprite references, UI elements, audio triggers, particle effects, icon needs, and any "visual feedback" language.
For levels: look for unique environment props, atmospheric VFX, lighting setups, ambient audio, skybox/background, and any area-specific materials.
For characters: look for sprite sheets (idle, walk, attack, death), portrait/avatar, VFX attached to abilities, UI representation (icon, health bar skin).
Group assets into categories:
Present the full identified list to the user. Use AskUserQuestion:
[A] Proceed — spec all of these / [B] Remove some assets / [C] Add assets I didn't catch / [D] Adjust categoriesDo NOT proceed to Phase 3 without user confirmation of the asset list.
Spawn specialist agents based on review mode. Issue all Agent calls simultaneously — do not wait for one before starting the next.
art-director via Agent:
technical-artist via Agent:
performance.* from project.yaml, else technical-preferences.md), engine name and versionnaming.* from project.yaml, else technical-preferences.md); (4) any engine-specific constraints this asset type must respect; (5) LOD requirements if applicable. Flag any asset type where the art bible's preferred standard conflicts with the engine's constraints."Collect both responses before Phase 4. If any conflict exists between art-director and technical-artist (e.g., art-director specifies 4K textures but technical-artist flags the engine budget requires 512px), surface it explicitly — do NOT silently resolve.
Combine the agent outputs into a draft spec per asset. Present all specs in conversation text using this format:
## ASSET-[NNN] — [Asset Name]
| Field | Value |
|-------|-------|
| Category | [Sprite / VFX / Environment / UI / Audio / 3D] |
| Dimensions | [e.g. 256×256px, 4-frame sprite sheet] |
| Format | [PNG / SVG / WAV / etc.] |
| Naming | [e.g. vfx_frost_hit_01.png] |
| Polycount | [if 3D — e.g. <800 tris] |
| Texture Res | [e.g. 512px — matches Art Bible §8 Tier 2] |
**Visual Description:**
[2–3 sentences. Specific enough for two artists to produce consistent results.]
**Art Bible Anchors:**
- §3 Shape Language: [relevant rule applied]
- §4 Color System: [color role — e.g. "uses Threat Blue per semantic color rules"]
**Generation Prompt:**
[Ready-to-use prompt. Include: style keywords, composition notes, color palette anchors, lighting direction, negative prompts.]
**Status:** Needed
After presenting all specs, use AskUserQuestion:
[A] Approve all — write to file / [B] Revise a specific asset / [C] Regenerate with different directionIf [B]: ask which asset and what to change. Revise inline and re-present. Do NOT re-spawn agents for minor text revisions — only re-spawn if the visual direction itself needs to change.
If [C]: ask what direction to change. Re-spawn the relevant agent with the updated brief.
After approval, ask: "May I write the spec to design/assets/specs/[target-name]-assets.md?"
Write the file with:
# Asset Specs — [Target Type]: [Target Name]
> **Source**: [path to source GDD/level/character doc]
> **Art Bible**: design/art/art-bible.md
> **Generated**: [date]
> **Status**: [N] assets specced / [N] approved / [N] in production / [N] done
[all asset specs in ASSET-NNN format]
Then update design/assets/asset-manifest.md. If it doesn't exist, create it:
# Asset Manifest
> Last updated: [date]
## Progress Summary
| Total | Needed | In Progress | Done | Approved |
|-------|--------|-------------|------|----------|
| [N] | [N] | [N] | [N] | [N] |
## Assets by Context
### [Target Type]: [Target Name]
| Asset ID | Name | Category | Status | Spec File |
|----------|------|----------|--------|-----------|
| ASSET-001 | [name] | [category] | Needed | design/assets/specs/[target]-assets.md |
If the manifest already exists, append the new context block and update the Progress Summary counts.
Ask: "May I update design/assets/asset-manifest.md?"
Use AskUserQuestion:
[A] Spec another system — /asset-spec system:[next-system][B] Spec a level — /asset-spec level:[level-name][C] Spec a character — /asset-spec character:[character-name][D] Run /asset-audit — validate delivered assets against specs[E] Stop hereAsset IDs are assigned sequentially across the entire project — not per-context. Read the manifest before assigning IDs to find the current highest number:
Grep pattern="ASSET-" path="design/assets/asset-manifest.md"
Start new assets from ASSET-[highest + 1]. This ensures IDs are stable and unique across the whole project.
If no manifest exists yet, start from ASSET-001.
Before speccing an asset, check if an equivalent already exists in another context's spec:
If a match is found: reference the existing ASSET-ID rather than creating a duplicate. Note the shared usage in the manifest's referenced-by column.
"ASSET-012 (Generic Hit Spark) already specced for Combat system. Reusing for Tower Defense — adding tower-defense to referenced-by."
If any spawned agent returns BLOCKED or cannot complete:
lean mode or if technical-artist blocks: proceed with art-director output only — note that technical constraints were not validatedsolo mode or if art-director blocks: derive descriptions from art bible rules — flag as "Art director not consulted — verify against art bible before production"Applies in collaborative mode (the default). For guided and
autonomous modes, see .claude/docs/automation-modes.md — the rules below
describe what collaborative mode requires, not universal behavior.
Every phase follows: Identify → Confirm → Generate → Review → Approve → Write
/asset-spec [next-context] to continue speccing remaining systems, levels, or characters/asset-audit to validate delivered assets against the written specs and identify gaps or mismatches