write-a-spec
БесплатноБез исполняемых скриптовНе проверенExtend a core journey in evals/core or write a one-off proof in evals/proofs that proves a PR's change to a human reviewer. Use when a PR changes user-visible…
от different-ai★ 24 642 звезды на GitHubОб этом скилле
Skill: Write a Spec
Every evals/core/*.e2e.test.ts or evals/proofs/*.proof.test.ts a PR adds or
changes runs in CI on the PR head and is published as that PR's proof (private report + one PR comment).
Write the spec for the person who will read that report in thirty seconds,
not for the machine that runs it.
Map: from change to reviewed proof
| Moment | Skill | Output |
|---|---|---|
| Decide whether a journey is needed and design it | write-a-spec (this) |
a spec whose titles, steps, and evidence read as the report |
| Run it and read your own record | run-tests |
evals/results/test-runs/<latest>/ with the captions in order |
| Let a reviewer click through the change | pnpm world help (preview worlds) |
a sandbox link in the report's Show sandbox panel |
| Describe it on the PR | open-a-pr |
an ## Evidence line naming the spec and its before → after |
Which lane runs your spec (and when to tag)
CI picks the lane from the file name and tags alone. Pick the lane first: it decides the world you can build.
| If the spec… | Name / tag | CI lane |
|---|---|---|
| proves your change (default) | evals/proofs/<name>.proof.test.ts |
on demand only, with PR change proof |
changes one of the nine core journeys in evals/journeys.ts |
evals/core/<journey>.e2e.test.ts |
core journeys nightly and on demand |
| needs a reviewer to reopen the running browser at a screenshot | add { tags: ["checkpoints"] } to the test(...) options |
protected checkpoint lane on Freestyle (not run by manual proof runs) |
Tag checkpoints only when a still image cannot show what the reviewer has to
check: an open stream, a populated workspace to explore, a state that costs
minutes to reach. The tag moves the spec to a protected lane that uses a
secret, where fork PRs cannot run. It saves each tagged test's world as
launched for the commit (before the body acts) and its end state, plus every user.checkpoint("caption") and every step(..., { checkpoint: true }).
Plain user.screenshot() never saves one. Say why in a comment beside the
tag. Checkpoints cost VM snapshots, so capture the one or two moments a
reviewer would open, not every step. Run it locally with
pnpm evals:e2e <slug> --local --checkpoints (needs FREESTYLE_API_KEY).
Do not write one when…
- A core journey covers the behaviour and the change broke or extends it: add a step there instead.
- The change is a pure function or a server rule (permissions, isolation,
validation): write a colocated unit or API test (
ee/apps/den-api/test/apifor Den security rules), not an e2e proof. - You would import
../../apps|packages|ee, read source files, or spawn another runner. That is a unit test in disguise;pnpm --dir evals lint:specsrejects it and names the core journey to extend instead.
No UI does not mean no spec. A server, proxy, or protocol bug gets a browser-less world whose steps are the requests a real client makes; the steps still read as one person's before → after.
Core journey or proof? There are nine core journeys (evals/journeys.ts);
adding a tenth is a review decision. Almost every PR writes a one-off proof in
evals/proofs/<name>.proof.test.ts: it runs on your PR and is not maintained.
The proof shape
A proof answers: who can now do what they could not before, and who
still cannot. Structure every spec as that story. Each beat is one step()
with a claim-sized name; each visual beat ends in user.screenshot().
persona → the test title names a person: "an owner", "a teammate", "a member without access"
before → what that person sees or cannot do today (features only)
action → the person does the thing, through the UI, as they would
after → what they now see; screenshot at that moment
boundary → who else is affected, and the negative half: who is not
The review app is generated from the spec. It shows exactly four strings, and each comes from one place in your code; write those strings for the reviewer:
| Reviewer sees | Comes from | Rule |
|---|---|---|
| Section heading | the test("…") title |
names the persona and what they can now do |
| Caption under a screenshot | the step("…") the user.screenshot() ran inside |
the old state starts before:, the new state after:; otherwise a plain claim |
Caption + judgment on a looks() image |
the first expectation in user.looks([...]) |
judged later; pending until then, so CI proof stays Incomplete |
| Assertion line | recordAssertionEvidence(claim, evidence, ok) |
claim is the caption, evidence the text under it |
Each test is one section, marked with a status icon. Its checks collapse to
"N of M checks passed" and open only when one fails. Its screenshots form a
numbered gallery in capture order, so the captions have to tell the story on
their own. A section with no recordAssertionEvidence shows as Incomplete.
A screenshot taken outside any step() is captioned "
Установить write-a-spec в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл write-a-spec?
Extend a core journey in evals/core or write a one-off proof in evals/proofs that proves a PR's change to a human reviewer. Use when a PR changes user-visible behaviour, when a reviewer asks "show me", or when the coverage decision says a journey is missing.
Как установить скилл write-a-spec?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл write-a-spec запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic