myscript/iinkts/iinkts-reference
Claude Code and agent skill by myscript/iinkts
- community
Checking that the SKILL.md file is still in the repository.
iinkTS directory map, naming conventions, symbol hierarchy, manager sub-systems, and utility reference. Invoke for "where is X", "how is Y structured", or architecture lookup questions.
Install
npx vskill@latest install myscript/iinkts/iinkts-referenceSKILL.md
iinkTS Reference
Directory structure
See SETUP.md for prefix conventions (T/I/II).
Naming conventions
Prefixes (see SETUP.md "Prefix Helper"):
T{Name}→ TypeScript type/interface (e.g.,TSymbol,TPoint,TExport)I{Name}→ Ink variant, usesHTTPClientV2(e.g.,IModel,IWriterManager)II{Name}→ InteractiveInk variant, usesWebSocketClient(e.g.,IIModel,IIStroke)
Classes:
{Name}Manager→ Business logic orchestrator{Name}Renderer→ Rendering implementation{Name}Configuration→ Configuration with defaultsAbstract{Name}→ Base class for inheritance
Files: PascalCase matching primary export → InteractiveInkCanvas.ts exports InteractiveInkCanvas
Configuration pattern
Every major component uses partial configuration merging:
Never assume all config properties exist → always merge with defaults.
Async patterns
- DeferredPromise: Custom promise wrapper for tracking pending operations (src/utils/DeferredPromise.ts).
WebSocketClientuses maps of deferred promises for concurrent requests. - Dual async model: Operations return Promises + emit Events
``typescript await client.addStrokes(strokes) // Operation promise client.event.addContentChangedListener(cb) // Notification event ``
- Initialization: Stateful clients (
WebSocketClient,WebSocketSSRClient) exposeinitialized: DeferredPromise<void>— alwaysawait canvas.client.initialized.promisebefore interacting.HTTPClientV2/HTTPClientV1are stateless, no init step.
Symbol hierarchy
Base type: TSymbol — shared properties (id, type, creationTime, style)
Symbol types (SymbolType enum): Stroke (raw ink), Group, Shape (Circle/Ellipse/Polygon), Edge (Line/Arc/PolyLine), Text/Math/Typeset (recognized/typeset content)
Root types (src/symbol/Symbol.ts):
Two layers of per-type logic — don't confuse them:
- `*Ops` (
StrokeOps,TextOps,MathOps,DecoratorOps,EraserOps,BoxOps,ShapeOps,EdgeOps) — pure functions/objects co-located with the type insrc/symbol/{type}/{Type}.ts. This is where actual create/update/overlap logic lives. Type guards (isStroke,isText,isMath,isDecorator) live here too. - `*Util` (
StrokeUtil,TextUtil,MathUtil,ShapeUtil,EdgeUtil,DecoratorUtilinsrc/symbol-utils/{type}/) — thin adapter classes extending abstractSymbolUtil, mostly delegating to the matching*Ops, plus SVG-specificgetSVGElement(). All 6 register intosymbolRegistryviaregisterBuiltinSymbolUtils().
SVGRenderer dispatches rendering with symbolRegistry.getUtil(symbol.type).getSVGElement(symbol) — don't branch on SymbolType inline, extend the matching *Ops/*Util pair instead.
Model distinctions:
Model(basic):Stroke[]— InkCanvasDeprecated (v1)IModel(intermediate):TStroke[]— InkCanvas (v2)IIModel(advanced):TSymbol[]with Map caching — InteractiveInkCanvas
Manager sub-system patterns
Transform (manager/interactive/transform/): AbstractTransformManager<TParams> Template Method base, extended by IITranslateManager, IIRotationManager, IIResizeManager, orchestrated by IITransformManager.
Math (manager/interactive/math/): IIMathVariableSubManager (variable state), IIMathComputationSubManager (computation), IIMathFunctionEvaluationSubManager (function evaluation), orchestrated by IIMathManager.
Gestures (manager/interactive/gestures/): GestureHandler + handlers/ per-gesture, IIGestureAnnotationProcessor for annotation logic, orchestrated by IIGestureManager.
Typeset (IITypesetManager): handles both text and math typeset bounds via SVG getBBox, replaced former IITextManager.
Key utilities
Always check src/utils/ before writing a new utility function.
Examples
- `interactive-canvas/` (19 files) →
InteractiveInkCanvas(WebSocket), pattern:interactive_canvas_{feature}.html - `interactive-canvas-ssr/` (28 files) →
InteractiveInkSSRCanvas(WebSocket SSR) - `canvas/` (16 files) →
InkCanvas/InkCanvasDeprecated(HTTP), pattern:canvas_v2_{feature}.html(current) /canvas_v1_{feature}.html(deprecated) - `non-specific/` → Configuration demos
- `custom-rendering/` → Third-party integrations (
tldraw-websocket-client/)
Most examples: <div id="rootEl"> → Canvas.load(element, type, options) → event listeners. Shared assets in examples/assets/ and examples/components/. Matching E2E specs live in test/examples/{same-subdir}/*.test.js.
Build system
Rollup-based: config/rollup.config.{build,dev,mjs}. Outputs: dist/iink.min.js (UMD), dist/iink.esm.js (ESM), dist/iink.d.ts. CSS imported as strings in TS, injected dynamically at runtime.
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 reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/iinkts-reference/SKILL.md
Popularity
- 7-day trend score
- 0
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/iinkts-reference)