Agent skill Web motion
Create Canvas
Make interface behavior and feedback feel clear and intentional.
Install the skill
Run the command from your project root with Node.js and npm.
npx skills@latest add ibelick/skills --skill create-canvas --agent claude-code --yesCheck this file in your project.claude/skills/create-canvas/SKILL.md
Other ways to install
Choose an assistant interactively
npx skills@latest add ibelick/skills --skill create-canvasSelect your assistant and choose the project installation scope.
Official instructions
The tested Skills CLI 1.10.0 requires Node.js 22.20 or later. Open the app project and identify a private preview route, reusable components, and inert fixture data. A browser is useful for checking canvas gestures and live interaction.
View operation manualWhat this skill helps with
- Make interface behavior and feedback feel clear and intentional.
Good for
- Interaction and feedback
- Inputs
- The project’s components, themes, access control, and safe preview fixtures.
- Registry
- Source-defined items with stable IDs, readable names, real dimensions, and independent state.
- Interaction
- Separate the camera and move handles from live preview input.
- Output
- An isolated workspace or one comparable variant in an existing canvas.
- Skill name
create-canvas- Repository
ibelick/skills
Keep preview interaction inside the preview
Drag anywhere
Make the whole preview card draggable and save everything in the browser.
Dragging the preview body can steal normal typing, selection, and clicking. Persisting content can hide the registry-defined entries.
Separate controls and source
- Use the existing preview route or choose a private one.
- Give each item a distinct label and move handle.
- Save layout and camera while keeping the registry in source.
Create Canvas operation manual
Set up a private live preview canvas or add one comparison variant to an existing workspace. Replace the bracketed details with your own project paths.
Start with one inert component preview, then add camera controls and layout persistence.
Find a safe route and preview fixture
Locate an existing canvas or an appropriate local route before mounting a live component.
Prompt · Step 1Use create-canvas to plan a private workspace for [component preview and project]. Inspect repository rules, existing preview routes, components, themes, and access controls. Reuse an existing canvas when present. Identify a local or protected route and one inert fixture that keeps normal UI behavior while avoiding real account, network, payment, and persistence side effects. Explain the mounting boundary, component dimensions, and how the preview will open. Ask before exposing a route or adding dependencies.Build the isolated live preview
Add one real component and keep handles, camera controls, and preview input independent.
Prompt · Step 2Use create-canvas to implement [approved private route and preview]. Find the agreed scope and fixture before editing. Mount the actual component inside its existing provider boundary with safe test data. Define its stable ID, readable name and intended dimensions in a typed source registry. Use a separate name control to copy the exact label and a separate keyboard-operable handle to move the item. Add the requested pan, zoom, fit and reset controls. Keep interactive input and portal behavior inside the preview. Persist camera and item positions only, with a safe fallback when saved data is malformed. Apply the existing project theme if supported.Test gestures inside and outside the item
Check that the camera moves reliably while the component keeps its normal input behavior.
- Camera or move-handle gestures leave normal preview controls usable.
- Reload restores layout while preserving source-defined membership.
Prompt · Step 3Use create-canvas to verify [local canvas route]. In a browser at two viewport sizes, try anchored Ctrl or Meta wheel zoom, zoom controls, empty-space pan, and move-handle drag at more than one zoom. Use the separate keyboard controls and check the exact name is copied only on activation. Inside the preview, test clicking, typing, selecting text, nested scrolling, and any dialog it already exposes. Reload and verify the changed camera and item placement, then confirm the same source registry still mounts. Report device-specific gestures you could not test and any observed stutter with its conditions.
Find the relevant canvas contract
Point the assistant to the problem and the affected preview or control.
A new variant overwrites the originalRegistry
- Command or reference
SKILL.md · Keep content in source- Examples
- Assign a new ID and named registry entry, then verify both after reload.
Dragging interferes with normal clicking and typingGestures
- Command or reference
SKILL.md · Keep gestures separate from preview input- Examples
- Check the move handle, camera pan, and scroll behavior inside the live item separately.
Reload changes what items existPersistence
- Command or reference
SKILL.md · Save layout, not content- Examples
- Keep membership in source and store the camera and positions under stable IDs.
Create Canvas troubleshooting
Does the skill install a canvas dependency?
Skills CLI installs instructions. Build the canvas in the existing app and reuse the components and theme already there.
What if the preview can save real data?
Use safe fixtures and an isolated provider boundary for actions. If safe isolation is unclear, get the needed setup before mounting it.
Why can I move the handle but not drag the whole component?
The separate handle lets users move the item while preserving native selection, typing, clicking, and scrolling in the preview.