sw-forge
Skill1 starsChanged 39 days agoMITView on GitHub
Builds a new skill (or small script or tool) when sw-scout finds nothing good enough, tests it on real cases, and installs it so Stillwright can reuse it. Also turns a hard task that just succeeded into a reusable skill. Use when no existing tool fits a need, when the same multi-step work has been done twice, or when the user says "make a skill/tool for this".
In this repository9 other files it gives its agents.
- stillwrightSkill
- sw-context-dietSkill
- sw-deep-searchSkill
- sw-launchSkill
- sw-onboardSkill
- sw-radarSkill
- sw-scoutSkill
- sw-verifySkill
- sw-workerSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 1 is distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 42
Write 2-3 realistic prompts, including one edge case, into evals/evals.json inside the skill folder (the skill-creator format: prompt plus …
- Very specific: line 44
Run each prompt twice in fresh subagents: once with the new skill, once with the baseline (no skill for a new one.
- Very specific: line 58
Add a review card, at most 5 lines: the skill's name, what it does, the trigger that produced it, the old-vs-new numbers, and the install …
- Very specific: line 72
Every later use logs tool=<name> with the step's result.
- Distinctive: line 80
Only on one of three logged triggers, so skills come from evidence rather than enthusiasm:
- Very specific: line 87
Every forged skill carries references/evidence.md: the run slug, the steps, and the failing-then-passing check output that justified it.
- Very specific: line 90
Keep SKILL.md itself free of the incident story: one procedure, the pitfalls as rules, under 200 lines.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Forge
sw below is the Stillwright binary. If sw is not on PATH, follow the install note in the stillwright skill (ask the user first; never install unattended).
Build the smallest thing that passes the need's check. A forged skill is code we vouch for, so it's held to the same proof rules as everything else.
1. Confirm the gap
Scout's report shows nothing that passes, or the need is specific to this user. If a candidate almost fits, prefer a thin wrapper around it over a rewrite.
2. Write it to the Agent Skills standard
Folder <name>/ with SKILL.md (frontmatter: name matching the folder, lowercase-hyphen,
max 64 chars; description max 1024 chars, saying what it does and when to use it),
plus scripts/ for anything deterministic. The body explains why as well as what, stays
under ~200 lines, and moves detail into references/. Only the standard library or
dependencies already installed, unless the user approves more.
Build it in the run folder first, never straight into a live skills folder: a skill there loads into every future session.
3. Prove it before anyone installs it
Skills a model writes for itself are not useful by default: in a 2026 benchmark, curated skills raised pass rates by about 16 points while skills the models wrote before each task averaged 1.3 points below having no skill, and a study of self-evolving skills found that only a minority of candidates ever set a validated best, with validation and final results sometimes disagreeing (sources in references/evidence-rules.md). So a forged skill earns its place with numbers, not with the feeling that it is useful.
- Write 2-3 realistic prompts, including one edge case, into
evals/evals.jsoninside the skill folder (the skill-creator format:promptplus a short expected outcome). - Run each prompt twice in fresh subagents: once with the new skill, once with the baseline
(no skill for a new one; for a patch, the previous version kept under
~/.stillwright/forge/<name>/prev/, outside the pinned folder). - Grade each run with the need's own check command, or with a fresh read-only reviewer that
did not write the skill (the rule from
sw-verify), and quote the outcome into the run log:sw run log latest step=N check="evals old vs new" result=pass|fail evidence=<the eval report file> note="new 3/3, baseline 1/3, tokens +8%". - The skill goes forward only if it is better on at least one prompt and worse on none, or equal everywhere with fewer retries or tokens. A plain tie is not enough. Otherwise fix and rerun, or drop it and log why.
Scripts get unit tests as well.
4. Ask, then install
Add a review card, at most 5 lines: the skill's name, what it does, the trigger that
produced it, the old-vs-new numbers, and the install path (Claude Code: ~/.claude/skills/;
others: ~/.agents/skills/ or the harness's documented path). Only after a yes:
- copy it there; for a patch, first copy the installed version to
~/.stillwright/forge/<name>/prev/so it can be put back; sw tool pin <name> <installed path> --source forged(a patch re-pins with--force, after its own card);- record the install:
sw note add "<name>: installed from <run slug>, baseline <n>/<m> -> <n>/<m>" --kind fact --source forge.
Unattended runs may build and test a skill, but installing always waits for the card.
5. Watch it, and let it go
Every later use logs tool=<name> with the step's result. Keep the score in a note
(sw note add "<name>: used 4, passed 3" --source forge, retiring the old count). Two failed
uses in a row, or 90 days without a use, raise a review card that proposes removing the
skill with the numbers. Never remove one without the card. A skill that has not cut retries
or subagent calls on its kind of step after three uses gets the same card.
When to forge at all
Only on one of three logged triggers, so skills come from evidence rather than enthusiasm:
- a step passed after two or more retries (the fix is worth keeping);
- the user corrected the approach;
- the same multi-step work was done twice.
Log the trigger when you see it: sw run log latest event=forge-candidate reason=retries|correction|repeat note="<what>".
Every forged skill carries references/evidence.md: the run slug, the steps, and the
failing-then-passing check output that justified it. No evidence file, no install.
Keep SKILL.md itself free of the incident story: one procedure, the pitfalls as rules, under
200 lines. The story lives in the evidence file.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

