Tools · English edition
How to build and test a Skill: start from the smallest runnable version
Do not start with a large, all-purpose Skill. Build the smallest version that runs, then test failure branches with real tasks.
Step 1: choose a real, repeated, checkable task
The task needs a clear input and output: “extract a PDF invoice into JSON”, “generate the weekly report from a fixed template”, “run a checklist on a PR”. Do not choose “analyse this” with no acceptance criterion. Do it by hand once and record steps, tools, judgment points and rework; that is the skeleton of SKILL.md.
Step 2: write the minimum
One main flow, no branches; one script, not a pile of templates. Make it run on three real samples before expanding. The minimum includes a trigger, input, steps, output, one failure message and one acceptance check.
Step 3: test failure branches
Test at least missing input, wrong format, file too large, network failure, insufficient permission and empty output. Every branch needs a readable error and a next step. Do not test only the happy path; most production failures come from dirty input or missing permission.
Step 4: version and regress
Every change to SKILL.md or a script gets a version, a change note and a reason. Keep a fixed sample set for regression and rerun it. If the Skill writes to a repository or sends messages, run it in dry-run first; grant write permission only after checking the output.