myscript/iinkts/example-development
Claude Code and agent skill by myscript/iinkts
- community
Checking that the SKILL.md file is still in the repository.
Guide for creating, modifying, and debugging example pages. Use when adding new examples, fixing example issues, or understanding how to integrate iinkTS in different scenarios.
Install
npx vskill@latest install myscript/iinkts/example-developmentSKILL.md
Example Development Guide
Example Structure
All examples follow a consistent pattern in examples/ directory.
Directory Organization
Matching E2E specs live in test/examples/{same-subdir}/*.test.js (real extension is .test.js, not .spec.ts).
Example Categories
Interactive Canvas Examples (interactive-canvas/ — 19 files, pattern interactive_canvas_{feature}.html)
Real-time recognition using WebSocket protocol (InteractiveInkCanvas): interactive_canvas_get_started.html, _connection_status, _create_symbols, _default_options, _gestures, _keyboard_shortcuts, _live_monitor, _math_computation_modes, _math_context_menu, _math_dependencies, _math_variables, _menu_config, _minimap, _override_menu, _selection, _showcase, _stroke_playback, _style, _zoom_pan.
Interactive Canvas SSR Examples (interactive-canvas-ssr/ — 28 files)
Server-side-rendered WebSocket variant (InteractiveInkSSRCanvas).
Canvas (HTTP) Examples (canvas/ — 16 files)
Batch recognition using HTTP API:
- v2 (current, `InkCanvas`):
canvas_v2_text.html,_math,_shape,_raw_content,_text_vertical_japanese,_multi_canvas_exam,_multi_canvas_grading - v1 (deprecated, `InkCanvasDeprecated`):
canvas_v1_text.html,_math,_diagram,_diagram_import,_text_styling,_raw_content,_no_ui,_custom_client,_custom_grabber
Non-Specific Examples (non-specific/ — 2 files)
change_configuration.html, professionalSupport.html.
Custom Rendering (custom-rendering/)
tldraw-websocket-client/index.html — third-party integration with the tldraw canvas library.
Example Template
Both templates below are trimmed from real, current examples — verify against the source files if you need the full version.
Basic Interactive Canvas (WebSocket) Example
Trimmed from examples/interactive-canvas/interactive_canvas_get_started.html:
The full InteractiveInkCanvas variant ships its own built-in toolbar (write/erase/select/undo/redo/convert/export) — most examples don't hand-wire nav buttons at all; they only add extra UI for the feature being demonstrated.
Basic Canvas (HTTP) Example
Trimmed from examples/canvas/canvas_v2_text.html — the ESM build is used here too (the UMD iink.min.js build is only used by examples/dev/index.html):
Note canUndo/canRedo/canClear arrive on the changed event's detail, not as direct properties read at arbitrary times — there's no public canvas.canUndo getter to poll.
Common Patterns
Loading Canvas with Different Types
Real TCanvasType values (src/canvas/AbstractCanvas.ts):
Configuration Modal Integration
The modal allows runtime configuration changes (server URL, API keys). Real class name is ModalCanvasOptions, file examples/components/modal/modalCanvasOptions.js.
Export Handling
Or the typed wrapper: canvas.event.addExportedListener((exports) => { ... }).
Import Content
There is no generic import(jiix, mimeType) on InteractiveInkCanvas/InkCanvas. Real options:
canvas.importPointEvents(strokes: TPartialDeep<TStroke>[])— replays raw point/stroke data (seeexamples/canvas/canvas_v1_diagram_import.html).InteractiveInkSSRCanvas.import(data: Blob | string | TJIIXExport, mimeType?: string)— JIIX/content import, unique to the SSR variant.
Custom Styling
See examples/canvas/canvas_v1_text_styling.html for a full example. canvas.penStyle = { ... } can also be set after load to restyle at runtime.
Tool Switching
Gesture Handling
Gestures are automatic on InteractiveInkCanvas (WebSocket) — no manual wiring needed to detect them; the built-in toolbar/canvas handles recognition. Gesture reference images live in examples/assets/img/gestures/.
Custom Resources
Development Workflow
1. Create New Example
2. Add to Example Index
Edit examples/index.html and add a card linking to the new page (see existing cards for the expected markup).
3. Test Example
Debugging Examples
Browser DevTools
- Open example in browser
- Open DevTools (F12)
- Check Console for errors
- Network tab for WebSocket/HTTP traffic
- Sources tab for debugging (sources under webpack://)
Common Issues
Issue: Canvas not loading Cause: Invalid configuration, missing credentials Fix: Check console errors, verify server config
Issue: No recognition results Cause: WebSocket not connected, invalid strokes Fix: Check Network tab for WebSocket connection, verify stroke data
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/example-development/SKILL.md
Popularity
- Repository stars
- 97
- Repository forks
- 16
- 7-day trend score
- 23
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/myscript/iinkts/example-development)