update-mascots
Installation
SKILL.md
update-mascots
This skill keeps the book-mascots gallery in sync with sibling book/course projects under $HOME/Documents/ws/. It is project-local and assumes it is being run from inside $HOME/Documents/ws/book-mascots.
What it does
- Lists existing mascots already in
docs/mascots/. - Walks every sibling project in
/Users/dan/Documents/ws/looking for a mascot directory (commonlydocs/img/mascot/,docs/mascots/, ordocs/img/mascots/) that has at least 3 standard pose PNGs and aneutral.png(or*neutral.png). - For each sibling not already in the gallery:
- Creates
docs/mascots/<slug>/ - Copies every
*.pngfrom the source mascot dir - Copies the source prompt file to
docs/mascots/<slug>/image-prompts.md(looking in priority order:image-prompts.md,mascot-prompts.md,mascot-descriptions.md,README.mdin the mascot dir;docs/prompts/*mascot*.md;docs/learning-graph/*mascot*guide*.md) - Generates
docs/mascots/<slug>/index.md(a Materialgrid cardsblock, one card per pose PNG, emitted in canonical pose order — see Pose ordering below) — the page initially has only the title, the boilerplate "All poses for the X mascot." line, and the gallery; the descriptive intro paragraph is added in step 4 below.
- Creates
- Author a detailed intro paragraph for each newly-imported mascot. This step is a manual follow-up the agent (Claude) performs after the script finishes — the script cannot produce it because it requires subject-domain judgment (species symbolism, name etymology, biology metaphors, pedagogical fit). For every slug returned by the import step, edit
docs/mascots/<slug>/index.mdand insert a 4–6 sentence paragraph immediately after the# Titleheading and before theAll poses for the **X** mascot.line. See the Intro paragraph pattern section below for the required structure. - Regenerates
docs/list-mascots.mdfrom scratch by scanningdocs/mascots/. Each card has the linked book title, the neutral image, and the mascot's character name (e.g. "Olli the Octopus") extracted from its prompt file. - Rewrites the
Mascots:section ofmkdocs.ymlso the nav lists every mascot alphabetically by display title. The rest of the file is left alone. - Prints a summary: how many new mascots were imported (with slugs), the new total count, and any sibling projects that had a mascot dir but were skipped (e.g. missing
neutral.png, fewer than 3 poses).