Skip to content
/skills
/ghost-record

Ghost record

Describe an interaction in one sentence. The skill records a ghost-cursor demo, checks it and hands you the snippet.

npx skills add imuratalpay/skills
Your project also needs @imuratalpay/ghost-cursor and motion; the skill installs whatever is missing. It only runs when you type /ghost-record.
By Murat Alpay · Updated · Source
Nothing picked yet
0.0s

What it does

  • Finds the component from your sentence: an export with that name, then a file, then JSX text or an aria-label that matches.
  • Turns each verb into a step aimed at something stable: data-ghost-id first, then role and name, then text. Never a class name.
  • Runs one script that starts the dev server if needed and records with human-like mouse and keyboard input.
  • Replays the take and checks that the final DOM matches the live run. If it doesn’t, it records again, slower, up to three times.
  • Saves <component>.take.json next to the component, prints a <GhostReplay> snippet and cleans up. It doesn’t edit your pages.

When to use it

When you want a live demo of a React component in a post or a docs page, and you can say in one sentence what the cursor should do. It only stops to ask when no component matches.

It works in Next.js projects that use @imuratalpay/ghost-cursor. In other setups, point it at a page that already renders the component inside a <GhostReplay>.

What the skill changed

A real run on the ghost-cursor site, recording its filter list.

/ghost-record filter list: type "to", then pick Tooltip
npm run dev
# open http://localhost:3000/your-post?record
# press Record, then use the component
# press Stop, then Copy recording
# paste the JSON into sort-menu.json
By hand: open the page with ?record, do the interaction, then copy the JSON into a file.

Example prompts

Plain English works. Tap or click a card to copy it.