write-a-spec
Create a feature spec or refactor RFC through user interview, codebase exploration, and module design, then publish it as a GitHub issue or local Markdown file. Use when the user wants to write a PRD, RFC, refactor plan, product requirements document, change proposal, or plan a large feature or refactor.
- License 许可
- MIT
- 最近更新
- 2026-09-20
- Stars
- ★ 4
- Forks
- 0
01 前言 Front Matter
- name
- write-a-spec
- description
- Create a feature spec or refactor RFC through user interview, codebase exploration, and module design, then publish it as a GitHub issue or local Markdown file. Use when the user wants to write a PRD, RFC, refactor plan, product requirements document, change proposal, or plan a large feature or refactor.
03 SKILL.md 正文
Write a Spec
Create a durable planning document for a significant change. This skill covers both:
- feature specs / PRDs
- refactor RFCs / change plans
1. Pick the mode
Decide which mode fits the request:
- Feature spec when the user is planning new product behavior, a major feature, or a product requirement
- Refactor RFC when the user is restructuring an existing system, improving architecture, or breaking a refactor into safe incremental steps
If the request is ambiguous, ask one short question to resolve the mode.
2. Gather the problem space
Start with a detailed description from the user, then explore the repo to verify assumptions and understand the current state.
You are trying to understand:
- the real problem
- the affected users or developers
- current constraints
- existing interfaces and modules
- what is already working
3. Interview until the scope is clear
Work through open questions one at a time.
For feature specs, clarify:
- desired user outcomes
- key user stories
- boundaries of the feature
- major product and technical constraints
For refactor RFCs, clarify:
- what pain is being removed
- alternative options that were considered
- exact scope vs out-of-scope
- what a safe migration path looks like
4. Explore module boundaries and tests
Look for the major modules you would build or modify.
Actively prefer deep modules:
- small interfaces
- large implementation hidden behind them
- testable at the boundary
Check existing test coverage in the affected area and note what good new tests would verify.
5. Write the document
If GitHub is available, publish the result as an issue. Otherwise, write it to ./plans/.
Use:
./plans/<slug>-spec.mdfor feature specs./plans/refactor-<slug>.mdfor refactor RFCs
Feature spec template
## Problem Statement
[The problem from the user's perspective]
## Solution
[The proposed solution from the user's perspective]
## User Stories
1. As a <actor>, I want <feature>, so that <benefit>
## Implementation Decisions
- modules to build or modify
- interface changes
- architectural decisions
- schema or API contracts
## Testing Decisions
- what good tests verify
- which modules need tests
- prior art in the codebase
## Out of Scope
[Not included in this spec]
## Further Notes
[Anything else worth recording]
Refactor RFC template
## Problem Statement
[The developer-facing problem]
## Solution
[The proposed refactor approach]
## Commits
1. [Tiny commit that leaves the system working]
2. [Next tiny commit]
## Decision Document
- modules to build or modify
- interface changes
- architectural decisions
- migration or rollout constraints
## Testing Decisions
- what good tests verify
- what existing coverage exists
- what new boundary tests are needed
## Out of Scope
[Not included in this refactor]
## Further Notes
[Optional]
Gotchas
- Do not include file paths or code snippets in the durable document.
- The value is in clarifying scope and decisions, not producing a long wall of text.
- Refactor plans should break work into tiny commits that keep the codebase working.
- Feature specs should be extensive on user stories, not just implementation notes.
04 同仓库更多 Skills
writing-shape
Take a markdown file of raw material and shape it into an article through a conversational session — drafting candidate openings, growing the piece paragraph by paragraph, arguing about format (lists, tables, callouts, quotes) at each step. Use when the user has a pile of notes, fragments, or a rough draft and wants help turning it into something publishable.
writing-fragments
Grilling session that mines the user for fragments — heterogeneous nuggets of writing (claims, vignettes, sharp sentences, half-thoughts) — and appends them to a single document as raw material for a future article. Use when the user wants to develop ideas before imposing structure, or mentions "fragments", "ideate", or "raw material" for writing.
writing-beats
Shape an article as a journey of beats, choose-your-own-adventure style. The user picks a starting beat from the raw material, you write only that beat, then offer options for where to pivot next, beat by beat, until the article reaches a natural end. Use when the user has raw material and wants to assemble it as a narrative rather than an argument.
stop-slop
Remove AI writing patterns from prose. Use when drafting, editing, or reviewing text to eliminate predictable AI tells.
humanizer
Remove signs of AI-generated writing from text. Use when editing or reviewing text to make it sound more natural and human-written. Based on Wikipedia's comprehensive "Signs of AI writing" guide. Detects and fixes patterns including: inflated symbolism, promotional language, superficial -ing analyses, vague attributions, em dash overuse, rule of three, AI vocabulary words, passive voice, negative parallelisms, and filler phrases.
feedback
Prepare, deliver, and debrief timely interpersonal feedback using a question-first coaching flow, observable behavior, owned experience, and concrete impact. Use when drafting feedback, coaching managers, rehearsing a feedback conversation, praising specific behavior, or reviewing whether feedback landed.