agentleFS
nisarthnisarth/claude-skills-store/skills/product-management/write-spec/SKILL.md

write-spec

Skill1 starsChanged 7 months agoMITView on GitHub

Write a feature spec or PRD from a problem statement or feature idea. Use when turning a vague idea or user request into a structured document, scoping a feature with goals and non-goals, defining success metrics and acceptance criteria, or breaking a feature down into shippable phases. Trigger phrases: "write a spec", "write a PRD", "feature spec for", "spec this out", "product requirements", "document this feature", "define requirements for", "acceptance criteria for", "scope this feature", "spec out"

29 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use implement-spec-with-codex, close-spec and 9 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.
  • dzhngSkill

    implement-spec-with-codex

    Run [implement-spec](../implement-spec/SKILL.md) with Codex doing the implementation passes while you orchestrate, integrate, and review. Use when the user asks to implement a spec with Codex, or to run implement-spec with Codex as the implementer.

    Also in 4 projects that use this

  • dzhngSkill

    close-spec

    When a spec under specs/<feature>/ is done shipping (a write-spec build, or any planned task that produced a spec), archive it to specs/done/ and rewrite it from a build-plan into a durable rationale — the why, the principles, the invariants — pointing back to the real code for the how. Use when implementation has landed and the plan no longer matches what shipped, or the user says a feature/spec is finished. Pairs with [write-spec](../write-spec/SKILL.md) (the plan this closes) and [review](../review/SKILL.md) (run before closing).

    Also in 4 projects that use this

  • wolverin0Skill

    audit-decisions

    Standardize remediation decisions, baseline-policy entries, and legal-review banners for accepted, deferred, or policy-blocked audit findings.

    Also in 4 projects that use this

  • transitive-bullshitSkill

    compare-screenshots

    Compare screenshots against the intended design, distinguishing approved references from historical baselines. Use for iterative implementation matching, before/after visual review, objective image telemetry, or checking a lone capture for flat, empty, or badly framed content.

    Also in 4 projects that use this

  • LucasMatuszewskiSkill

    audit-agents

    Audit and maintain agent configuration files (.claude/agents, AGENTS.md, CLAUDE.md, agent-memory). Checks for duplicates, outdated info, naming conflicts, wrong technical facts, and files over 200 lines. Fixes all issues and commits.

    Also in 4 projects that use this

  • antonio-orionusSkill

    find-state-machines

    Report every implicit state machine in a project, with its states, transitions and flaws.

    Also in 3 projects that use this

  • +5 more from dzhng

The file

We split this skill into the rules it gives an agent

5 rules. 0 are common, 5 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 28 edited versions we read keep these.

  • 5

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Write feature specifications and product requirements documents that are clear, complete, and actionable.

    line 12
  2. Distinctive:

    If the user has only a vague idea, help them think through these questions rather than asking all at once.

    line 27
  3. Distinctive:

    Write a crisp problem statement:

    line 31
  4. Distinctive:

    Response: Start with the problem: "Why?

    line 153
  5. Distinctive:

    Measurable success: If you cannot measure whether the feature succeeded, you cannot learn from it.

    line 167

“Common” is measured: kept by at least 6 in 10 of the 28 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Feature Spec / PRD Writer

Write feature specifications and product requirements documents that are clear, complete, and actionable. Turn vague ideas into structured documents with problem statements, goals, non-goals, success metrics, and acceptance criteria.

Workflow

Step 1: Understand the Feature

Gather these inputs from the user:

  1. What is the feature? Brief description of what should exist.
  2. Why build it? What problem does it solve, or what opportunity does it capture?
  3. Who is it for? Specific user segment or persona.
  4. What triggered this? Customer request, data insight, strategic bet, competitive pressure.
  5. What exists today? Current state, workarounds, or related features.
  6. How big is this? Initial sense of scope: small (days), medium (sprint), large (quarter).

If the user has only a vague idea, help them think through these questions rather than asking all at once.

Step 2: Define the Problem

Write a crisp problem statement:

### Problem Statement

**Who**: [Specific user segment]
**What**: [The problem they face]
**When/Where**: [The context in which it occurs]
**Impact**: [Quantified consequence -- time lost, revenue at risk, user drop-off]
**Evidence**: [Data, research, or customer quotes supporting this]

A good problem statement is specific enough that two product managers would agree on whether a proposed solution addresses it.

Step 3: Set Goals and Non-Goals

Goals (what this feature must achieve):

  1. [Goal with measurable outcome]
  2. [Goal with measurable outcome]
  3. [Goal with measurable outcome]

Non-goals (what this feature explicitly will not do):

  1. [Non-goal]: [Why it is out of scope]
  2. [Non-goal]: [Why it is out of scope]

Non-goals are as important as goals. They prevent scope creep and set expectations with stakeholders.

Step 4: Define Success Metrics

MetricCurrentTargetMeasurement Method
[Metric 1][Baseline][Target][How to measure]
[Metric 2][Baseline][Target][How to measure]

Include:

  • Primary metric: The one number that determines if this feature succeeded
  • Secondary metrics: Supporting indicators
  • Guardrail metrics: Metrics that must not regress (e.g., page load time, error rate)

Step 5: Describe the Solution

### Solution Overview
[2-3 paragraphs describing the proposed solution at a level of detail appropriate for engineering to begin design]

### User Flow
1. [Step 1]: [What the user does and sees]
2. [Step 2]: [What the user does and sees]
3. [Step 3]: [What the user does and sees]

### Key Decisions
| Decision | Options | Recommendation | Rationale |
|----------|---------|---------------|-----------|
| [Decision] | A, B, C | B | [Why] |

### Edge Cases
- [Edge case 1]: [How to handle it]
- [Edge case 2]: [How to handle it]

Step 6: Write Acceptance Criteria

For each user story or major behavior, write acceptance criteria in Given/When/Then format:

### Feature: [Name]

**Story**: As a [user], I want to [action] so that [benefit].

**Acceptance Criteria**:
- Given [precondition], when [action], then [expected result]
- Given [precondition], when [action], then [expected result]
- Given [edge case], when [action], then [expected result]

**Out of scope for this story**:
- [What is not included]

Step 7: Compile the Spec

## Feature Spec: [Feature Name]
Author: [Name] | Date: [Date] | Status: [Draft/Review/Approved]

### 1. Problem Statement
[From Step 2]

### 2. Goals and Non-Goals
[From Step 3]

### 3. Success Metrics
[From Step 4]

### 4. Solution Overview
[From Step 5]

### 5. Detailed Requirements
[User flows, acceptance criteria from Step 6]

### 6. Technical Considerations
- Dependencies: [Systems, APIs, teams]
- Performance: [Latency, throughput requirements]
- Security: [Auth, data handling, compliance]
- Scalability: [Expected load, growth considerations]

### 7. Rollout Plan
- Phase 1: [What ships first, to whom]
- Phase 2: [What comes next]
- Rollback plan: [How to revert if issues arise]

### 8. Open Questions
- [Question 1]: [Owner] | Due: [Date]
- [Question 2]: [Owner] | Due: [Date]

### 9. Appendix
- [Mockups, data analysis, research links]

Examples

Example 1: New Feature

User: "We need to add team permissions to our app." Response: Start with the problem: "Why? What goes wrong without permissions?" Define the user segment (admins, team leads). Scope: what permission levels (view, edit, admin)? What entities get permissions? Write the spec with acceptance criteria for each permission level.

Example 2: Improvement

User: "Our search is slow and users complain." Response: Quantify the problem: current latency, user complaints, drop-off rate. Set a measurable goal (p95 search latency under 500ms). Define the solution approach. Include both functional (relevant results) and non-functional (performance) acceptance criteria.

Example 3: Vague Request

User: "Customers want better reporting." Response: Push back constructively: "Which customers, what reports, what is missing?" Help the user narrow from "better reporting" to a specific, specifiable feature like "scheduled email reports with custom date ranges for admin users."

Best Practices

  1. Problem before solution. Spend time validating the problem is real and worth solving before describing the solution. A well-defined problem constrains the solution space.
  2. Specific non-goals. Vague specs grow scope. Explicit non-goals like "We will not support custom branding in this phase" prevent scope creep.
  3. Measurable success. If you cannot measure whether the feature succeeded, you cannot learn from it. Define metrics before building.
  4. Edge cases are requirements. "What happens when the user has no data?" is not a detail; it is a core UX question. Surface edge cases early.
  5. Phase the work. Large features should be broken into shippable increments. Each phase should deliver user value, not just technical progress.
  6. Living document. The spec evolves during development. Update it when decisions change rather than letting it become stale.
  7. Write for the engineer. The spec should be detailed enough that an engineer unfamiliar with the context can build the right thing. Ambiguity in the spec becomes bugs in the product.
  8. Include what you do not know. Open questions with owners and due dates prevent blockers from being discovered mid-sprint.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.