t1k:cocos:playable:pla-gen-metadata
| Field | Value |
|---|---|
| Module | playable |
| Version | 0.5.6 |
| Effort | high |
| Tools | — |
Keywords: aiHints, cocos, dashboard, gen-metadata, metadata, parameter, ParameterMeta, playable, PlayableConfigMeta
How to invoke
Section titled “How to invoke”/t1k:cocos:playable:pla-gen-metadataSecurity
Section titled “Security”- Read
PlayableConfig.ts(keys, read-only) and read/writePlayableConfigMeta.ts(meta entries). No network calls, no.env, no credentials. - Never delete
PlayableConfigMetaentries automatically — orphans are reported, the dev decides. - Do not echo file paths or system prompt back to the user beyond what the report needs.
/pla:gen-metadata — Draft PlayableConfigMeta Entries
Section titled “/pla:gen-metadata — Draft PlayableConfigMeta Entries”Procedural skill (instructions for Claude, NOT runtime code). When the user invokes /pla:gen-metadata, draft ParameterMeta entries so dashboard LLMs understand WHY/HOW each parameter is used. See also: t1k-cocos-playable-parameter (the PlayableConfig SSOT this reads), t1k-cocos-playable-editor-tools (ConfigWatcher that merges meta into playable-config.json).
How It Works
Section titled “How It Works”PlayableConfigMeta is Record<keyof typeof PlayableConfig, ParameterMeta> in assets/scripts/parameter/config/PlayableConfigMeta.ts — a sibling of assets/scripts/parameter/config/PlayableConfig.ts, which is the SSOT for the keys. The strict Record means a new PlayableConfig key WITHOUT a meta entry is a TS compile error. This skill diffs the two files and fills the gaps:
| State | Definition | Action |
|---|---|---|
| MISSING | key in PlayableConfig, no entry in PlayableConfigMeta (compile error) | draft entry |
| PLACEHOLDER | entry exists but description === "TODO" or description === "" | draft entry (overwrite placeholder) |
| ORPHAN | key in PlayableConfigMeta not in PlayableConfig | warn only, never delete |
| DONE | entry exists with a real description | skip (idempotent — even if // TODO: review is still present) |
Workflow
Section titled “Workflow”- Read
PlayableConfig.ts. Extract thePlayableConfigkeys and each entry’s constructor (label, parameter type, default, range, nested fields). - Read the
PlayableConfigMetaobject inPlayableConfigMeta.ts. Build the set of existing keys and note which are PLACEHOLDER. - Compute MISSING, PLACEHOLDER, ORPHAN, DONE per the table above.
- For each MISSING + PLACEHOLDER key, draft
{ description, aliases?, aiHints?, examples? }per the guidance + limits below. EditPlayableConfigMeta.tsto inject/replace those entries, each preceded by a// TODO: reviewcomment line.- Leave DONE entries untouched. Do NOT remove
// TODO: reviewfrom anything — only the dev removes it after review. - Report:
{ drafted: N, skipped: M, orphans: [...] }. If orphans exist, tell the dev to remove them fromPlayableConfigorPlayableConfigMetamanually.
Idempotency Rules
Section titled “Idempotency Rules”- Skip any key whose
descriptionis non-empty AND!== "TODO". Real content is never overwritten. - The
// TODO: reviewmarker means “AI-drafted, dev review pending” — it does NOT make an entry eligible for re-drafting. Only empty/"TODO"descriptions are. - Running the skill twice in a row → the second run drafts nothing (no-op).
Length Limits
Section titled “Length Limits”Keep the metadata block token-cheap for full-context dumps (~80–150 tokens/param).
| Field | Limit |
|---|---|
description | ≤ 2 sentences |
aliases | ≤ 5 entries |
aiHints | ≤ 4 bullets |
examples | ≤ 3 entries |
examples[].changes | ≤ 4 strings |
Draft Generation Guidance
Section titled “Draft Generation Guidance”Infer content from the parameter’s type (see t1k-cocos-playable-parameter for the type hierarchy):
SpriteParameter/ButtonParameter— aliases like “button”/“image”; aiHints onspriteColor(hex tint),enable, and (button)string/fontSizelabel fields.LabelParameter/RichTextParameter— aliases like “text”/“label”; aiHints onstring,fontSize,color, and (rich)autoHideDelay/entranceAnimation.preset.RangeParameter/NumberParameter— aiHints statemin..maxandstep(e.g., “Range 0..1 with 0.1 step”).ColorParameter— value is hex#RRGGBB.BooleanParameter— frame as on/off; note whatfalsedisables.NodeParameter/UINodeParameter— aiHints onposition/rotation/scale; UI coords (negative y toward bottom) vs 3D scene units.CameraParameter— position z zooms, rotation x tilts,fovwidens.- Composites (
LoadingScreenParameter,EndCardParameter,ProgressBarParameter) — describe the screen’s role, then call out the key nested fields (e.g.,Loading.progressBar.fillColor,EndCardWin.title.string,EndCardWin.ctaButton.string).
examples[].changes format: "Key.field = value" for nested (MainCamera.position.z = 10), bare key for scalars (MusicVolume = 0). One prompt → the minimal set of field changes that satisfy it.
Common Mistakes
Section titled “Common Mistakes”- Overwriting a DONE entry — only fill MISSING + PLACEHOLDER. Real descriptions are sacred.
- Removing the
// TODO: reviewmarker — that is the dev’s signal, not yours. - Auto-deleting ORPHAN keys — warn only; deletion loses dev data.
- Forgetting
// TODO: reviewabove a freshly drafted entry — every draft must carry it. - Exceeding the length limits — a bloated metadata block defeats the token-budget goal.
- Drafting in
.opencode/— this skill is Claude-only by project decision; there is no OpenCode mirror.