agentleFS
int2t05int2t05/engineering-skills/skills/01-product/spec/SKILL.md

spec

Skill3 starsChanged 4 months agoMITView on GitHub

Use when starting a new project, feature, or significant change — writes a spec/PRD covering objectives, structure, commands, code style, testing, and boundaries before any code. Triggers on "write spec", "create prd", "spec out", "写需求文档", "写规格", "需求文档" — also when user says "要做什么" / "需求是什么".

96 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use tickets, make-pdf 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.
  • toveruxSkill

    tickets

    Break a spec, plan, or the current conversation into tracer-bullet tickets, each declaring its blocking edges.

    Also in 3 projects that use this

  • chloropineSkill

    make-pdf

    Turn any markdown file into a publication-quality PDF. Proper 1in margins, intelligent page breaks, page numbers, cover pages, running headers, curly quotes and em dashes, clickable TOC, diagonal DRAFT watermark. Not a draft artifact — a finished artifact. Use when asked to "make a PDF", "export to PDF", "turn this markdown into a PDF", or "generate a document". (cgstack) Voice triggers (speech-to-text aliases): "make this a pdf", "make it a pdf", "export to pdf", "turn this into a pdf", "turn this markdown into a pdf", "generate a pdf", "make a pdf from", "pdf this markdown".

    Also in 3 projects that use this

  • anombyte93Skill

    discover

    Phase 1 of the prd-taskmaster pipeline: brainstorm-driven discovery. Delegates to superpowers:brainstorming in Interactive Mode (one adaptive question at a time), or self-brainstorms in Autonomous Mode when no user is present. Intercepts before the brainstorming chain hands off to writing-plans — this skill owns the exit. Extracts constraints, calibrates scale (Solo / Team / Enterprise), and advances the pipeline to GENERATE.

    Also in 5 projects that use this

  • diego-tobalinaSkill

    build-fix

    Fix build and compilation errors systematically. Run when build fails.

    Also in 3 projects that use this

  • chloropineSkill

    context-restore

    Restore working context saved earlier by $context-save. Loads the most recent saved state (across all branches by default) so you can pick up where you left off — even across Conductor workspace handoffs. Use when asked to "resume", "restore context", "where was I", or "pick up where I left off". Pair with $context-save. Formerly /checkpoint resume — renamed because Codex treats /checkpoint as a native rewind alias in current environments. (cgstack)

    Also in 3 projects that use this

  • GoogleSkill

    metrics

    Expertise in analyzing time-series repository health metrics, investigating root causes, and proposing proactive workflow improvements.

    Also in 3 projects that use this

  • +1 more from chloropine

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 79 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 a structured specification before any code.

    line 8
  2. Distinctive:

    Surface assumptions: Before writing any spec content, list what you're assuming (tech stack, auth model, database, target environment).

    line 23
  3. Distinctive:

    Commit both — they are living documents.

    line 45
  4. Distinctive:

    User review gate: Ask the user to review the written spec before any implementation.

    line 47
  5. Distinctive:

    If they request changes, make them and re-verify.

    line 48

“Common” is measured: kept by at least 6 in 10 of the 79 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

Spec

Write a structured specification before any code. The spec is the shared source of truth — it defines what we're building, why, and how we'll know it's done. Code without a spec is guessing.

When to use

  • Starting a new project, feature, or significant change.
  • Requirements are ambiguous or only exist as a vague idea.
  • The change touches multiple files or modules.
  • User says "write spec", "create prd", "spec out", "to spec", "写需求文档", "写规格", or "需求文档".

Not for: single-line fixes, typos, or changes where requirements are unambiguous; changes needing design decisions only — use architecture for system design.

Steps

  1. Surface assumptions. Before writing any spec content, list what you're assuming (tech stack, auth model, database, target environment). Ask the user to correct before proceeding. Don't silently fill ambiguous requirements.
  2. Ask 3–5 clarifying questions where the prompt is ambiguous — problem/goal, core functionality, scope, success criteria. Offer lettered options (A/B/C/D) so the user can respond "1A, 2C, 3B" for quick iteration. Only ask what's actually ambiguous. If the conversation already resolved the ambiguities, skip questions and synthesize directly.
  3. Write the spec using the template below. Reframe vague requirements as testable success criteria ("make the dashboard faster" → "LCP < 2.5s on 4G; initial load < 500ms"). For PRD structure, user-story format, Given/When/Then acceptance criteria, and INVEST — load references/prd-patterns.md. For success-criteria frameworks (North Star, AARRR, retention, A/B testing) — load references/metrics-frameworks.md. For feature prioritization (RICE, Kano, MoSCoW) — load references/prioritization.md.
  4. Publish. Two layers:
    • docs/PRD.md — project-level requirements, concise (mermaid-heavy), on main. The shared source of truth for the whole project.
    • docs/vX.Y/prd.md — the current version's detailed PRD (user stories, full acceptance criteria, rules, boundaries), on the version branch. Falls back to docs/PRD.md alone for single-version projects. Commit both — they are living documents. Update when decisions or scope change; reference in PRs.
  5. User review gate. Ask the user to review the written spec before any implementation. If they request changes, make them and re-verify. Only proceed once approved.

Spec template:

# Spec: [Project/Feature Name]

## Objective
[What we're building and why. User stories with verifiable acceptance criteria.]

## Success Criteria
[Project-level "how we know it's done" metrics.]

## Project Structure
[Directory layout with descriptions — where source, tests, docs live.]

## Commands
[Build, test, lint, dev — full executable commands with flags.]

## Code Style
[One real code snippet showing conventions. Naming, formatting, key patterns.]

## Testing Strategy
[Framework, test locations, coverage expectations, which test levels for which concerns.]
Identify test seams — prefer existing seams, use the highest seam possible (the fewer seams across the codebase, the better).

## Boundaries
- Always: [run tests before commits, validate inputs, follow naming conventions]
- Ask first: [schema changes, new dependencies, CI config changes]
- Never: [commit secrets, edit vendor dirs, remove failing tests without approval]

## Non-Goals
[What this feature will NOT include. Makes scope trade-offs explicit.]

## Open Questions
[Unresolved items needing human input.]

Planning the implementation FROM this spec uses Claude Code's built-in plan mode (see engineering-principles §7) — no custom plan skill. The spec is plan mode's input.

Verify

  • The spec file exists on disk and is committed to version control.
  • It covers all sections: Objective, Success Criteria, Structure, Commands, Code Style, Testing, Boundaries, Non-Goals.
  • Success criteria are specific and testable, not vague.
  • Boundaries (Always / Ask first / Never) are defined.
  • The user has reviewed and approved the spec.

Output: docs/PRD.md (project-level, concise, main) + docs/vX.Y/prd.md (version-level, detailed, version branch). Single-version projects fall back to docs/PRD.md alone.

References

  • ${CLAUDE_PLUGIN_ROOT}/references/engineering-principles.md — discipline shared by every skill; §7 covers plan mode for implementation planning.
  • ${CLAUDE_PLUGIN_ROOT}/references/product-principles.md — product discipline (need≠feature, outcomes over outputs, say no to good ideas, the real competitor is the workaround).
  • references/prd-patterns.md — PRD structure, user stories, Given/When/Then acceptance criteria, INVEST, Non-Goals, success-criteria reframing, anti-patterns.
  • references/prioritization.md — RICE, ICE, Kano, MoSCoW, Value×Feasibility matrix, true-need vs false-need filter.
  • references/metrics-frameworks.md — North Star metric, AARRR funnel, retention curves, cohort analysis, Hook Model, A/B testing discipline, data-driven loop.

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.