Agent skill · Code Review & Quality

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.

machaomcgithub.com/machaomcGitHub ↗
codexships scriptsApache-2.0
Install
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.

Facts
Files in the skill folder: 43
SKILL.md size: 14 KB
Bundled scripts: yes
Version: 0.1.0
Declared author: machaomc
Requires: Python 3.10+; FontTools optional for font extraction; core tools require no network access
Path: plugins/refine-canvas-strokes/skills/refine-canvas-strokes/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 50
Language: Python

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# 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

What's inside
Steps it walks through
  1. Objective
  2. Capability Levels
  3. Non-Negotiable Rules
  4. Workflow
  5. 1. Establish the Task Contract
  6. 2. Choose a Refinement Mode
  7. 3. Adapt to the Canonical Contract
  8. 4. Select the Execution Tier
  9. 5. Emit a Patch
  10. 6. Validate Before Preview and Commit
  11. 7. Integrate Safely
  12. Delivery Requirements
  13. Boundaries
  14. Resources
Ships with 24 files
  • agents/openai.yaml
  • assets/brand/icon.svg
  • assets/brand/logo.svg
  • assets/examples/00-refine-canvas-strokes-overview.png
  • assets/examples/01-stroke-cleanup-before-after.png
  • assets/examples/01-stroke-cleanup-before-after.svg
  • assets/examples/02-geometry-snapping-before-after.png
  • assets/examples/02-geometry-snapping-before-after.svg
  • assets/examples/03-diagram-reconstruction-before-after.png
  • assets/examples/03-diagram-reconstruction-before-after.svg
  • assets/examples/04-style-normalization-before-after.png
  • assets/examples/04-style-normalization-before-after.svg
  • assets/examples/05-handwriting-auto-before-after.png
  • assets/examples/05-handwriting-auto-before-after.svg
  • assets/examples/06-handwriting-font-guided-before-after.png
  • assets/examples/06-handwriting-font-guided-before-after.svg
  • assets/examples/07-handwriting-outline-before-after.png
  • assets/examples/07-handwriting-outline-before-after.svg
  • assets/examples/08-handwriting-modes-overview.png
  • assets/examples/08-handwriting-modes-overview.svg
  • assets/examples/manifest.json
  • references/example-font-profile.json
  • references/example-handwriting-input.json
  • references/example-input.json
first 24 of 43
Commands it runs
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
About this skill
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.

Keep going