Skip to content
Back to search

page-mascot

A mascot that watches the cursor and blinks when you poke it

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/nilbuild--page-mascot/badge.svg)](/listings/nilbuild--page-mascot)

HTML

<a href="/listings/nilbuild--page-mascot"><img src="/api/listings/nilbuild--page-mascot/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

npm i page-mascot

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 97 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. <img src=".github/fox.png" width="160" alt="">
  2. # page-mascot
  3. An interactive character that watches the cursor and blinks when you poke it.
  4. **[See the fifty-two &rarr;](https://koboyo.com/page-mascot)**
  5. ## Install
  6. ```bash
  7. npm i page-mascot
  8. ```
  9. ## Use existing mascots
  10. Pick a character on the [demo page](https://koboyo.com/page-mascot) and download its two
  11. sheets into `public/mascots`, then point the component at them:
  12. ```tsx
  13. import { Mascot } from 'page-mascot'
  14. <Mascot
  15. directions="/mascots/fox-directions.webp"
  16. reactions="/mascots/fox-reactions.webp"
  17. />
  18. ```
  19. The paths are whatever your app serves, so imported images work too.
  20. Or let an agent do it, once the skill below is installed:
  21. ```
  22. /page-mascot put the fox on my page
  23. ```
  24. ## Draw your own
  25. Install the skill:
  26. ```bash
  27. npx skills add nilbuild/page-mascot --skill page-mascot --global --yes
  28. ```
  29. Then ask your agent:
  30. ```
  31. /page-mascot a chibi otter with chocolate-brown fur
  32. /page-mascot make one that looks like me [attach a photo]
  33. /page-mascot a chibi fox, in the riso style
  34. ```
  35. It draws the nine directions and nine expressions, builds them into two aligned sheets,
  36. checks the character does not jump between them, and puts the component on your page, with
  37. the same two props as above.
  38. Drawing needs an image tool. Codex has its own; Claude Code goes through the OpenAI images
  39. API:
  40. ```bash
  41. export OPENAI_API_KEY=sk-...
  42. ```
  43. Or take the [prompts](skills/page-mascot/reference/prompts.md) and use them in any chat
  44. UI.
  45. ## Props
  46. | prop | default | |
  47. | --- | --- | --- |
  48. | `directions` | none | path to the directions sheet |
  49. | `reactions` | none | path to the reactions sheet |
  50. | `size` | `140` | px, square |
  51. | `label` | `'mascot'` | what a screen reader calls it |
  52. | `className` | | |
  53. Tracking switches off without a fine pointer, and the click squash honours
  54. `prefers-reduced-motion`.
  55. ## How it works
  56. Each character is two 3×3 sprite sheets: nine head directions, and nine expressions.
  57. ![the two sheets that make up one character](.github/sheets.png)
  58. The pointer's angle picks a cell on the directions sheet, with a dead zone so the head
  59. settles when the cursor is close. A click shows a cell from the reactions sheet for half a
  60. second.
  61. The same character can be drawn in six styles: colour, ink, sketch, riso, paper and pixel.
  62. Only the rendering changes, so the alignment holds.
  63. ![the same fox drawn in six styles](.github/styles.png)
  64. ## License
  65. MIT © [Kamran Ahmed](https://kamran.fyi)

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.