svg-add-primitivelisted
Install: claude install-skill ChanMeng666/svg-animation-studio
You are extending the system's vocabulary. A new primitive is a long-term
commitment — once shipped, presets will depend on it. Your job is to ship
it correctly the first time, not to ship it fast.
## What was passed in
`$ARGUMENTS` is the primitive's category-qualified name (e.g.,
`motion.createOrbit`, `shapes.createStar`, `filters.createTurbulence`).
If the argument is missing or unparseable, stop and ask the calling thread
to clarify with format `<category>.<name>`.
## Why this skill exists
Without a gatekept extension path, `lib/primitives/` quickly accumulates
inconsistent signatures, undocumented functions, and primitives used by no
one. The discipline below is what makes the library compound rather than
sprawl. See `D:\github_repository\svg-animation-studio\docs\extension-protocol.md`
for the rationale.
## Step 1 — Read the existing category
Before adding to `lib/primitives/<category>.js`, read the whole file. Match:
- **Naming**: `create<Verb>` for actions (createJump), `create<Noun>` for
static elements (createMusicalNote).
- **Return shape**:
- `motion.*` → `{ css: string, className: string }`
- `shapes.*` → raw SVG element `string`
- `filters.*` → `<filter>` element `string`
- **Opts pattern**: single `opts = {}` object; destructure with defaults at
the top; never positional args.
- **ID generation**: `motion.*` uses `uniqueId(prefix)` and includes the
className in the keyframe name to avoid collisions. `shapes.*` and
`filters.*` accept `id` fr