to-spec
Skill3 starsChanged 2 months agoMITView on GitHub
Turn the current conversation into a spec (PRD) and save it as markdown under .scratch/: no interview, just synthesis, with Laravel test seams chosen from the tdd ranking rules rather than asked about. Use when the user wants a spec or PRD written from what was just discussed, when a grilling or wayfinder session has settled its decisions, or when an existing spec needs revising in place.
105 other projects use a version of this, 67 of them edited.
Adopted by
Most recently taken up by
- mattpocock/skillsedited, first seen Oct 8, 2026
- AlexisBalayre/claude-code-configtheir own version, first seen Oct 5, 2026
- KroxiDev/engineering-skillstheir own version, first seen Oct 5, 2026
- michielvandermeer/skillstheir own version, first seen Oct 4, 2026
- Integralist/agent-skillstheir own version, first seen Oct 4, 2026
- prefapp/skillsedited, first seen Oct 4, 2026
Used with
Projects with it also use setup-ts-deep-modules, writing-beats and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
loulanyueSkillsetup-ts-deep-modules
Wire dependency-cruiser into a TypeScript repo so each package is a deep module — implementation hidden in subfolders, reachable only through its entry-point files. User-invoked.
Also in 17 projects that use this
RoentekSkillwriting-beats
Writing, exploit — assemble raw material into a journey of beats, grounding each term before a beat leans on it.
Also in 22 projects that use this
RoentekSkillwriting-fragments
Writing, explore — mine raw fragments, no structure yet.
Also in 20 projects that use this
qwlabsSkillclaude-handoff
Hand the current conversation off to a fresh background agent that picks up the work immediately.
Also in 16 projects that use this
qhuang20Skillmigrate-to-shoehorn
Migrate test files from `as` type assertions to @total-typescript/shoehorn. Use when user mentions shoehorn, wants to replace `as` in tests, or needs partial test data.
Also in 19 projects that use this
AnasX7Skillscaffold-exercises
Create exercise directory structures with sections, problems, solutions, and explainers that pass linting. Use when user wants to scaffold exercises, create exercise stubs, or set up a new course section.
Also in 19 projects that use this
- +2 more from Roentek
Other versions105 projects use a version of this.
Word for word · 0
None found.
Edited · 67
- mattpocock/skills★ 335k12% same
- aws/graph-explorer★ 48412% same
- bighadj22/codflow★ 33812% same
- loulanyue/skills★ 23112% same
- iamyoki/qwen-image-2.1-skill★ 14612% same
- willdady/platypus★ 11412% same
- scibly-dev/scibly★ 4212% same
- VoDaiLocz/kilo-kit-mcp★ 2712% same
- ivanrvpereira/.agents★ 1812% same
- icefrag/nbl★ 1712% same
57 more not listed
Wrote their own version · 38
- vinvcn/mattpocock-skills-zh-CN★ 4.6ksame name
- stevesolun/ctx★ 588same name
- nodetool-ai/nodetool★ 551same name
- devcxl/mattpocock-skills-zh★ 426same name
- tt-a1i/matt-skills-with-to-goal★ 182same name
- rengwu/wayfinder-maps★ 133same name
- leandrocfe/skills★ 38same name
- assisjp/specflow★ 17same name
- mhmzdev/hisab-whatsapp★ 9same name
- michielvandermeer/skills★ 9same name
28 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository48 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- architecture-satisfactionSkill
- autopilotSkill
- browser-testSkill
- chatter-scoutSkill
- codebase-designSkill
- code-reviewSkill
- code-smells-auditSkill
- commitSkill
- dependency-auditSkill
- diagnosing-bugsSkill
- distill-sessionsSkill
- domain-modelingSkill
- fix-ci-failuresSkill
- fix-github-issuesSkill
- fix-nightwatch-issuesSkill
- fix-posthog-issuesSkill
- grillingSkill
- grill-meSkill
- grill-with-docsSkill
- handoffSkill
- housekeeperSkill
- implementSkill
- improve-codebase-architectureSkill
- laravel-herd-worktreesSkill
- panelSkill
- prototypeSkill
- releaseSkill
- repository-cleanupSkill
- researchSkill
- resolve-review-commentsSkill
- resolving-merge-conflictsSkill
- scratch-cleanupSkill
- scratch-statusSkill
- setupSkill
- tddSkill
- teachSkill
- to-questionnaireSkill
- to-ticketsSkill
- triage-github-prSkill
- triageSkill
- verifySkill
- wait-whatSkill
- wayfinderSkill
- which-skillSkill
- wizardSkill
- writing-for-agentsSkill
The file
Files
To Spec
Take the current conversation context and codebase understanding and produce a spec (a PRD). Do not interview the user: the interview already happened (usually a grilling session); this skill synthesizes it.
Carry the source material through. Every link, doc, or reference the user brought into the conversation (a vendor guide, API docs, an issue, a thread) is cited in the spec where it applies. Material that was pasted rather than linked has no other home, so save it verbatim beside the spec (.scratch/<slug>/research/<name>.md) and link that file. The spec is the only artifact the build sessions inherit: a fact left out of both is gone.
If a load-bearing decision is genuinely unresolved (one the spec cannot be written without) don't guess and don't launch a full interview. Ask just that decision (via AskUserQuestion where available, otherwise a plain question in chat: recommended option first, trade-offs per option), or suggest a grill-me round if several are open.
Written once per effort, revised in place after. One spec covering everything the effort builds, written in a single session. If it came from a wayfinder map, that first write closes the map and does not run on it again. Later, if downstream work exposes a wrong or missing decision, re-run to edit this spec in place: never write a second spec beside it, and never reopen or re-close the map.
Pipeline position: grill-with-docs/wayfinder (decide) → to-spec (write the spec) → to-tickets (break it into tickets) → implement (build one ticket per session).
Process
1. Explore the repo
Understand the current state of the codebase if you haven't already. Use the project's domain vocabulary throughout the spec (read CONTEXT.md if one exists: domain-modeling maintains it) and respect any ADRs in the area being touched.
Invoked with a wayfinder map, read the map and every closed decision ticket's ## Resolution first: those resolutions are the authoritative decisions the spec must encode. Don't synthesize from conversation memory alone; a fresh session may not hold what earlier ticket sessions decided.
Finish exploring only when you can name the domain terms and ADRs that constrain the spec, the closest existing implementation and tests to imitate (or confirm none exist), and the tracker destination step 3 will use.
2. Sketch the test seams
A seam is the public boundary the feature will be tested at (codebase-design holds the full deep-module vocabulary). Before proposing seams, consult and apply the Laravel ranking and selection rules in the tdd skill's Seams: where tests go section; it is the single source of truth. While sketching seams, look for a deepening opportunity (functionality worth hiding behind a smaller, more stable interface) and record it under Implementation Decisions.
Decide the seams yourself: don't ask. Seam placement is test structure, which grilling's What still earns a question hands to you: the ranking rules settle it, so apply them and move on. Record the chosen set in the spec with a one-line why per seam; the user reviews them as part of the step 3 draft, which is the only gate this step needs. Ask only on a genuine fork, two placements the rules rank equally that would make materially different work, and then ask just that one.
3. Write and publish the spec
Write the spec using the template below. Every decision the draft would make that the conversation did not (a new table, flag, setting, switch, or user-visible behavior) goes into a Needs decision list above the draft, one line each with your recommendation, and stays out of the draft body. Show the list and the complete draft, and wait for the user to approve publication or request changes. Publish only when every Needs decision item is accepted or replaced, and write the accepted ones into the body. More than three items, or any that touches an ADR, money, or data loss, means the grill ended early: recommend /grill-me on them instead.
A spec is a markdown file under .scratch/: there is no external tracker. Read the layout from .agents/issue-tracker.md (written by /setup). If it's missing, try docs/agents/issue-tracker.md (legacy), then the path below; suggest running /setup once to make it durable.
After approval, publish to .scratch/<slug>/spec.md with status: ready-for-agent in its YAML frontmatter (or the AFK-ready role string from .agents/triage-labels.md when that mapping differs). Invoked with a map, reuse that map's directory and set map.md's frontmatter to status: closed: the map's job is done. A later in-place revision leaves the map closed.
Approval to publish covers the commit. Unless git check-ignore -q .scratch says the repo ignores it, commit the effort directory: git add -- .scratch/<slug>, then git commit --only -m "docs(scratch): <slug> spec" -- .scratch/<slug>. The add comes first because --only skips untracked files. implement carries a committed spec onto its PR branch even before it is pushed.
The spec covers the whole effort. Its short Build Contract is the canonical home for invariants, ordering, and shared seams every implementation ticket needs; detailed decisions below it hold ticket-specific context without repeating that contract. If the effort feels too big for one spec, say so and recommend narrowing it rather than writing a second spec beside the first.
Spec template
## Problem Statement
The problem the user is facing, from the user's perspective.
## Solution
The solution to the problem, from the user's perspective.
## Build Contract
- The cross-ticket invariants every implementation must preserve
- Delivery or expand–contract ordering that constrains more than one ticket
- Shared public seams later tickets can rely on
- Links to named sections below that workers should load only when their ticket reaches them
## User Stories
A LONG, numbered list covering all aspects of the feature:
1. As an <actor>, I want <a feature>, so that <benefit>
## Implementation Decisions
The detailed decisions that were made. Keep Build Contract material in that section only; link to it instead of repeating it here. Examples:
- Schema changes (expand–contract sequencing for live tables)
- Eloquent models and relationships to add or modify
- Validation (FormRequest rules) and authorization (policies, record-level scoping)
- Events, listeners, jobs, notifications
- API contracts (routes, resources, payload shapes)
- Filament resources/pages or Livewire components affected
- Config/env keys, feature flags
- Architectural decisions and their reasoning
## Testing Decisions
- The chosen seams (from step 2) and which behaviors each covers
- Prior art: similar tests already in the codebase to imitate
- Ground rules: test behavior through public interfaces, never presentation
(no assertions on copy, layout, or CSS); don't test framework behavior;
do test business rules, validation, persisted data, record-level
authorization, and side effects (via Queue/Mail/Storage/Event fakes)
## Out of Scope
What this spec deliberately excludes.
## Further Notes
Anything else future readers need.When you're done
Print the end-of-session block using the frame in wayfinder/references/pipeline-end-block.md.
---
Pipeline: decide → **spec** → tickets → build (2 of 4)
Done: <what exists now, with its reference; whether a map was closed>
Next:
• <condition> → /<skill> <ref>Stage-specific Next conditions (only those that apply, most likely first):
- Spec published, work spans several tickets →
/to-tickets <spec ref> - Spec revised after its tickets were published →
/to-tickets <spec ref>to add tickets for the change; name which existing tickets the revision touches - Spec published, work fits one session →
/implement <spec ref> - A load-bearing decision is still open →
/grill-meon that decision, naming it; re-run/to-specafter - Several decisions open, or the effort is bigger than one spec →
/wayfinderto chart it first, on a narrower destination - Blocked on knowledge someone else holds →
/to-questionnaire; on a fact worth reading for →/research - Stopped before publishing → say what the draft covers, where it lives, and which sections are unwritten
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.

