/mechanism-draft:mechanism-draftfrom mechanism-draft
Generates dimensioned engineering SVG drawings of flat mechanical parts (plates, brackets, flanges, PCB outlines, gaskets, panels) from declared 2D parametric geometry at true 1:1 scale. Also produces section-view drafting sheets and technical-drawing films.
Ships in mechanism-draft. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Engineering drawings of flat parts and drafting-sheet films, where every number says where it comes from and a gate says what was checked. A standalone part of Mechanism: the evidence gate, the 2D geometry, the SVG exporter and the Paper engine, without the 3D Studio film or the Workflow engine.
Run every command from this skill's own folder (installed as a Claude Code plugin it lives in the plugin cache, e.g. ~/.claude/plugins/cache/mechanism/mechanism-draft/<version>/; copied as a plain skill, ~/.claude/skills/mechanism-draft). Work in the user's project, never inside this folder: specs, SVGs and renders go in a work folder such as ./mechanism-work.
Needs Node 22+. The SVG export and the gate need nothing else; Paper stills and films need Edge or Chrome, films also ffmpeg. No install step, no network, no API key.
Check the install: node scripts/skill-doctor.mjs.
Read references/scenes.md (section "Declared 2D geometry") and look at examples/demo-plate/spec.js (synthetic) and examples/rpi4-board/spec.js (a real part from a datasheet).
Write the spec in <work>/<name>/spec.js: a part of kind: 'drawing' whose p declares the geometry in mm (outline rect / circle / polygon, holes with ids, patterns, centre lines, an optional section), paperScene: { kind: 'geometry' }, and in params each dimension you were given, tied to the claim that states it. Where each number comes from decides its class:
{ id: 'request', kind: 'user', title: 'The request of <who>', received: '<date>', note: '<their words>' } (no url; never invent one) and claims of conf: 'user';url and fetched date, claims of conf: 'spec' that quote the number;conf: 'derived' with a cross check;conf: 'measured' with error, method and uncertainty (an extraction uncertainty, never a tolerance);conf: 'estimated' with why.
A minimal spec, numbers given by the person who asked (this exact file passes the gate):(function () {
window.SPEC = {
id: 'bracket', title: 'Mounting plate 120 x 80',
research: {
// the request is the source: kind 'user', no url (never invent one)
sources: [{ id: 'request', kind: 'user', title: 'The request of the person who asked', received: '2026-10-20', note: 'plate 120 x 80 mm, R4 corners' }],
// a claim cites its sources with src: an ARRAY of source ids (not "source"); conf 'user' for the user's numbers; the text states each number
claims: [
{ id: 'size', conf: 'user', src: ['request'], text: 'The plate is 120 mm wide and 80 mm high.' },
{ id: 'corner', conf: 'user', src: ['request'], text: 'Corner radius 4 mm.' },
],
},
parts: [{
id: 'plate', name: 'Mounting plate', kind: 'drawing', conf: 'user', claims: ['size', 'corner'],
p: { unit: 'mm', outline: { type: 'rect', w: 120, h: 80, r: 4 } },
// params ties each named dimension to the claim that states it: value, unit, conf (the claim's class), claim (its id)
params: {
'outline.w': { value: 120, unit: 'mm', conf: 'user', claim: 'size' },
'outline.h': { value: 80, unit: 'mm', conf: 'user', claim: 'size' },
'outline.r': { value: 4, unit: 'mm', conf: 'user', claim: 'corner' },
},
}],
paperScene: { kind: 'geometry' },
};
})();
The gate says: dimensions: 0 checked against a document, 0 derived, 0 measured (with uncertainty), 3 declared by the user, 0 estimated; 0 independently verified and verdict: CONSISTENT. For a datasheet number use a source with url and fetched, conf: 'spec' in the claim and in params; holes, patterns and their dimension names (<hole>.d, <hole>.x, ...) are in references/scenes.md.
Gate it, before exporting: node scripts/check-spec.mjs <work>/<name>/spec.js. Fix every error (the export refuses a spec that does not pass). Read the dimensions:, provenance: and verdict: lines.
Export: node scripts/export-svg.mjs <work>/<name>/spec.js --mode geometry-1to1 --out <work>/svg (true size; also --mode sheet-fit for an A4 sheet). One SVG per drawing part.
Optionally a Paper still: node scripts/render.mjs <work>/<name>/index.html --length short --still 12 --out <work>/<name>.mp4 (copy index.html and run.js from an example).
VERIFIED only when at least one check compares the model with a figure from a source independent of its inputs (a value the model computes, compared with a figure from another source). A drawing whose numbers all come from one datasheet, or from the user, is at most CONSISTENT: the file reproduces those numbers exactly, nothing more. A drawn dimension in params is only ever compared with the figure it was drawn from, so it never makes a drawing VERIFIED.NOTHING CHECKED: nothing was compared (every number estimated or only declared). The full contract: references/checks.md.Say this plainly in the report. Never call a user's numbers "verified".
paperScene: { kind: 'pin-section', ... } is drawn as an animated section from the spec's own numbers (see examples/lock).skill-doctor says whether it is installed.node scripts/check-spec.mjs examples/lock/spec.js, node scripts/preflight.mjs examples/lock/index.html --method paper --length short --aspect 9:16, then node scripts/render.mjs examples/lock/index.html --method paper --background ivory --length short --aspect 9:16 --still 9 --out <work>/lock.mp4 (a PNG still) and the same without --still (the film).node scripts/new.mjs <name> --dir <work> --title "..." --fig "Fig N" starts a mechanism spec that fails the gate until every TODO is replaced by researched, tagged numbers.Options: --background ivory|porcelain|graphite|blueprint, --aspect 9:16|4:5|1:1, --length short|normal|extended (30, 60, 90 s), --fps, --still <t> (PNG), --encoder jpeg|browser.
The gate checks that the numbers agree with what their claims state and that the geometry is valid (closed contours, holes inside the material, no overlap, net area). It does not know whether a source is right, and it never makes a drawing fit for manufacture: there are no tolerances, fits, surface finish or material specification, and every SVG says "NOT A MANUFACTURING DRAWING". The 1:1 SVG is at true size in a viewer; a printer may scale it (check with a rule). A flat part is never given an invented side view or 3D model. The preflight checks text and layout frame by frame; with a vector scene the mesh area check is reported NOT RUN GEOMETRY_AREA with its reason, which is not a pass. Details: references/checks.md.
End with: what was drawn and from which sources (say which numbers the user gave); the gate's verdict and why (independent, same source, user-declared, transcriptions); what is ESTIMATED or MEASURED and how; what was left out (and why); the files made with their paths; what was not checked. Never present a CONSISTENT drawing, or the user's own numbers, as verified.
LICENSE (opens in a new tab)README.md (opens in a new tab)THIRD_PARTY.md (opens in a new tab)examples/demo-flange/index.html (opens in a new tab)examples/demo-flange/run.js (opens in a new tab)examples/demo-flange/spec.js (opens in a new tab)examples/demo-plate/index.html (opens in a new tab)examples/demo-plate/run.js (opens in a new tab)examples/demo-plate/spec.js (opens in a new tab)examples/demo-section/index.html (opens in a new tab)examples/demo-section/run.js (opens in a new tab)examples/demo-section/spec.js (opens in a new tab)examples/lock/index.html (opens in a new tab)examples/lock/run.js (opens in a new tab)examples/lock/spec.js (opens in a new tab)examples/rpi4-board/index.html (opens in a new tab)examples/rpi4-board/run.js (opens in a new tab)examples/rpi4-board/spec.js (opens in a new tab)files.json (opens in a new tab)kit/boot.js (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub diegolopez0208/mechanism --plugin mechanism-draftOther plugins' skills for the same job