myscript/iinkts/canvas-drawing-patterns

Claude Code and agent skill by myscript/iinkts

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

Canvas/ink-editor architecture checklist (manager lifecycle, API design, geometry perf) adapted for iinkTS from tldraw/excalidraw conventions. Invoke when adding or reviewing managers, renderer code, or hit-testing/geometry logic.

Install

npx vskill@latest install myscript/iinkts/canvas-drawing-patterns

SKILL.md

Canvas/Drawing-App Patterns

Manager lifecycle

A manager that adds an event listener or holds a resource (timer, subscription) MUST implement destroy() and get called on editor teardown.

Verify before adding a new listener: grep -rl "addEventListener\|addListener" src/manager then confirm each hit overrides destroy() from IIAbstractManager. Managers currently holding listeners: IIOverlayManager, IDebugSVGManager, IIKeyboardManager, IISelectionManager — check their cleanup coverage before extending them.

API design

Avoid boolean or ambiguous positional params on new public methods — use a named options object. A bare true/false at a call site forces the reader to check the signature to know what it means.

typescript
// bad
resize(el, true, false)
// good
resize(el, { preserveAspectRatio: true, animate: false })

Geometry / perf

  • Use computeDistanceSquared (no sqrt), not computeDistance, when only comparing against a threshold — already in src/utils/geometry.ts.
  • Cache bounding boxes when queried repeatedly per frame/gesture instead of recomputing from raw points each time.

Per-symbol-type encapsulation

Keep type-specific logic in the matching *Ops object (StrokeOps, TextOps, MathOps, ShapeOps, EdgeOps, DecoratorOps — co-located with the type in src/symbol/{type}/), and rendering/registry glue in the matching *Util adapter (src/symbol-utils/{type}/), dispatched via symbolRegistry.getUtil(symbol.type). Don't branch on SymbolType inline in managers or renderers. src/symbol/SymbolHelpers.ts is unrelated (just cloneSymbol()), not a dispatcher.

Testing

Prefer asserting whole objects (toEqual(fullObject)) over field-by-field checks when it gives a clearer failure diff.

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

Popularity

Repository stars
99
Repository forks
16
7-day trend score
0

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
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/myscript/iinkts/canvas-drawing-patterns/badge)](https://verified-skill.com/skills/myscript/iinkts/canvas-drawing-patterns)

Something wrong with this skill or its page? Tell us.