refine-canvas-strokes
Design, implement, review, or troubleshoot safe refinement of editable 2D canvas strokes. Use for handwriting smoothing, automatic text layout cleanup, optional font-guided handwriting normalization, freehand cleanup, geometric shape snapping, diagram cleanup, stroke-style normalization, semantic stroke replacement, and previewable or undoable refinement pipelines in whiteboards, note apps, drawing tools, annotation systems, and pen-input SDKs. Do not use for general raster image editing, prose rewriting, or renderer bugs unrelated to stroke transformation.
npx skills add machaomc/refine-canvas-strokes --skill refine-canvas-strokes --agent codex
Same command for any agent — swap --agent for claude-code, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Refine Canvas Strokes ## Objective Preserve the user's visual intent while improving editable stroke geometry. Prefer deterministic geometry for coordinate generation, use AI for classification or semantic interpretation, and emit a validated patch instead of mutating source data directly. ## Capability Levels - **Bundled executable capability:** validate canonical input and patches, measure strokes, run conservative corner-aware cleanup, and normalize grouped handwriting in automatic or optional font-guided mode. - **Host integration guidance:** connect selection, native preview, same-ID replacement, history, rollback, persistence, caches, collaboration, and renderer-specific data through an adapter. - **Design guidance requiring a host engine or model:** primitive fitting beyond the bundled baseline, flow or diagram reconstruction, OCR/grouping, semantic classification, and raster redraw. Do not describe this skill as a drop-in drawing SDK or a trained refinement model. The bundled scripts are reference implementations; production quality depends on the host adapter, renderer, evaluation corpus, and any optional domain engine. ## Non-Negotiable Rules - Keep the original strokes
- Objective
- Capability Levels
- Non-Negotiable Rules
- Workflow
- 1. Establish the Task Contract
- 2. Choose a Refinement Mode
- 3. Adapt to the Canonical Contract
- 4. Select the Execution Tier
- 5. Emit a Patch
- 6. Validate Before Preview and Commit
- 7. Integrate Safely
- Delivery Requirements
- Boundaries
- Resources
python3 scripts/validate_contract.py input path/to/strokes.json python3 scripts/stroke_metrics.py path/to/strokes.json python3 scripts/refine_strokes.py input.json --output refinement-patch.json python3 scripts/handwriting_refine.py input.json --strength 0.45 --output handwriting-patch.json python3 scripts/handwriting_refine.py input.json --font-profile font-profile.json --strength 0.6 --output handwriting-patch.json python3 scripts/validate_contract.py patch refinement-patch.json --input input.json python3 scripts/compare_stroke_patch.py input.json refinement-patch.json --fail-on-violation
What does the refine-canvas-strokes skill do?
Design, implement, review, or troubleshoot safe refinement of editable 2D canvas strokes. Use for handwriting smoothing, automatic text layout cleanup, optional font-guided handwriting normalization, freehand cleanup, geometric shape snapping, diagram cleanup, stroke-style normalization, semantic stroke replacement, and previewable or undoable refinement pipelines in whiteboards, note apps, drawing tools, annotation systems, and pen-input SDKs. Do not use for general raster image editing, prose rewriting, or renderer bugs unrelated to stroke transformation.
How do I install it?
Run `npx skills add machaomc/refine-canvas-strokes --skill refine-canvas-strokes --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From machaomc/refine-canvas-strokes, a repository with 50 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
