Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

page-mascot

БесплатноЗапускает вложенные скриптыНе проверен

Put a cursor-tracking mascot on a page -- a chibi character that turns its head toward the pointer and reacts when clicked. Picks one of the fifty-two drawn…

nilbuildот nilbuild★ 1 432 звезды на GitHub

Об этом скилле

Mascot

Turns "put a fox on my page" or "draw me a chibi otter" into a working <Mascot />.

Each character is two 3×3 sprite sheets: nine head directions, and nine expressions. The component swaps between them by moving background-position, so there is no per-frame JavaScript and no animation library. A character is its two files -- there is no registry and nothing has to know its name.

Which route

  • The user names a character, or would take one that exists -- Use one that is drawn. No Python, no API key, works in any React project. This is the common case.
  • The user wants something new, or their own likeness -- Draw a new one, then finish with Put it on the page.

Both routes end in Put it on the page. Do not stop at files and a snippet.

Use one that is drawn

  1. Pick. reference/characters.md lists the fifty-two. If the user did not name one, pick the one that fits the site, and say which you picked and why.

  2. Fetch the two sheets into wherever this project serves static files -- public/ for Next, Vite, CRA and Astro, static/ for SvelteKit -- or next to the component to import them:

    mkdir -p public/mascots
    curl -fsSL -o public/mascots/fox-directions.webp https://koboyo.com/page-mascot/mascots/fox-directions.webp
    curl -fsSL -o public/mascots/fox-reactions.webp  https://koboyo.com/page-mascot/mascots/fox-reactions.webp
    
  3. Put it on the page (below).

Put it on the page

Install the component. Use whichever package manager the lockfile points at: npm i page-mascot, pnpm add page-mascot, yarn add page-mascot, or bun add page-mascot. If this is not a package-managed React project, copy mascot.tsx from beside this SKILL.md into the project instead -- it is one file, needs only React, and uses inline styles.

Render it:

import { Mascot } from 'page-mascot'

<Mascot
  directions="/mascots/fox-directions.webp"
  reactions="/mascots/fox-reactions.webp"
/>

directions and reactions are the served paths of the two sheets, or imported images. Both required. The other props are size (default 140), label (what a screen reader calls it) and className.

Put it where the user asked. If they did not say, the top of the page -- the header or hero, above or beside the title, which is where a head that watches the cursor reads best. Edit the actual component; then tell the user what you changed and where.

Draw a new one

First, work out how you will draw

Two sheets have to be drawn per character, and agents differ in whether they can do that themselves. Check in this order:

  1. You have a built-in image generation tool (Codex does). Use it directly -- follow Drawing it yourself below. Find out first whether it can return a transparent background, because that decides which prompt you send: with the option, ask for transparency and set it; without one, draw on a solid key colour and remove it afterwards. Both are written out under Transparency.
  2. OPENAI_API_KEY is set. Use the API path, which needs no image tool at all -- follow Drawing through the API. This is the route for Claude Code, which has no image tool. generate.py asks for transparency through the API's background parameter and falls back to the key route on its own if no alpha comes back.
  3. Neither. Say plainly that drawing needs either an agent that can generate images or an OPENAI_API_KEY, and offer two alternatives: one of the fifty-two drawn characters (Use one that is drawn), or the manual route in reference/prompts.md, where the user pastes the prompts into a chat UI themselves. Do not try to drive a web UI in a browser to work around it: it depends on the page's markup, needs a logged-in session, and gets rate-limited part way through a set.

Either way, the build needs Python 3:

python3 -c "import PIL, numpy, scipy" 2>&1

If that fails: pip install -r <skill-dir>/scripts/requirements.txt. Stop and say so rather than working around it.

<skill-dir> everywhere below is the folder holding this SKILL.md -- the skill is usually installed outside the project, so use its full path. Run every command from the project root: the scripts read source sheets from characters/<name>/ and write the built atlases to public/mascots/ under the current directory. Pass --dest static/mascots (or wherever this project serves static files) when public/ is not it.

Drawing through the API

One command generates, screens, builds, verifies and retries:

python3 <skill-dir>/scripts/mascot.py fox --describe "a chibi fox with warm orange fur, a cream muzzle and dark ear tips"

Add --style riso for a different look, or --reference ~/photo.jpg to redraw someone. --only reactions redraws just the expressions sheet and keeps the directions sheet. If the model returns no alpha channel, it redraws that sheet on a solid key colour and r

Полный SKILL.md на GitHub

Установить page-mascot в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

mascot.tsxreference/characters.mdreference/design-rules.mdreference/prompts.mdscripts/build.pyscripts/generate.pyscripts/key.pyscripts/mascot.pyscripts/requirements.txtscripts/screen.pyscripts/verify.py

FAQ

Что делает скилл page-mascot?

Put a cursor-tracking mascot on a page -- a chibi character that turns its head toward the pointer and reacts when clicked. Picks one of the fifty-two drawn characters and wires up the React component, or draws a new one (with your own image tool, the OpenAI images API, or from a photo of the user), builds its two sprite sheets into aligned atlases and verifies they do not jump. Use when the user asks for a mascot, a character that watches the cursor, a portfolio head, wants one of the existing characters on their page, or wants a new character drawn.

Как установить скилл page-mascot?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл page-mascot запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить page-mascot с