agentleFS
a1fa1f/agent-templates/skills/to-prd/SKILL.md

to-prd

Skill2 starsChanged 4 months agoMITView on GitHub

Use when the user wants to turn the current conversation into a short, human-readable PRD published as a GitHub issue, or invokes /to-prd.

87 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use edit-article, decision-mapping 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.
  • kayamanSkill

    edit-article

    Edit and improve articles by restructuring sections, improving clarity, and tightening prose. Use when user wants to edit, revise, or improve an article draft.

    Also in 13 projects that use this

  • RoentekSkill

    decision-mapping

    Turn a loose idea into a sequenced map of investigation tickets, then drive them to resolution one at a time.

    Also in 3 projects that use this

  • AWSSkill

    setup-matt-pocock-skills

    Configure this repo for the engineering skills: set up its issue tracker, triage label vocabulary, and domain doc layout. Run once before first use of the other engineering skills.

    Also in 39 projects that use this

  • kayamanSkill

    request-refactor-plan

    Guides creating a detailed refactor plan with tiny commits via user interview, then files it as a GitHub issue. Use when user wants to plan a refactor, create a refactoring RFC, or break a refactor into safe incremental steps.

    Also in 12 projects that use this

  • Jonathan0823Skill

    design-an-interface

    Generate multiple radically different interface designs for a module using parallel sub-agents. Use when user wants to design an API, explore interface options, compare module shapes, or mentions "design it twice".

    Also in 12 projects that use this

  • qhuang20Skill

    migrate-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 13 projects that use this

  • +2 more from kayaman

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 85 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:

    Read the conversation; explore the repo only if you haven't.

    line 31
  2. Distinctive:

    If a fact that changes the design is missing, ask with AskUserQuestion (≤4 at a time, concrete options) — otherwise skip when context is …

    line 36
  3. Distinctive:

    Only what was discussed or confirmed — invent nothing.

    line 46
  4. Distinctive:

    No file paths or code; they rot.

    line 47
  5. Distinctive:

    Write the approved body to a temp file, which dodges shell-escaping.

    line 77

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

To PRD

Turn the conversation and codebase into a short PRD a human actually reads, then publish it as a GitHub issue.

/to-prd [--title="..."] [--label=Plan] [--issue=N]

  1. Gather context (conversation + light repo read)
  2. Clarify gaps via AskUserQuestion   (gate, only if thin)
  3. Draft the PRD
  4. Show it, wait for approval          (gate)
  5. Publish the issue; print URL + number

Arguments

ArgDefaultNotes
--title="..."Derived from contextIssue title
--label=...PlanDropped if the repo has no such label; pass --label= for none
--issue=NCreate newRe-publish: replace the PRD, keep any appended slices/PRs

Phase 1 — Gather context

Read the conversation; explore the repo only if you haven't. Use the codebase's own vocabulary and respect existing ADRs.

Phase 2 — Clarify (gate)

If a fact that changes the design is missing, ask with AskUserQuestion (≤4 at a time, concrete options) — otherwise skip when context is rich.

Phase 3 — Draft

Write it tight:

  • One screen. Cut anything that doesn't change a decision.
  • The english rule governs every line — it loads each session, so you already have it. Cut all hedging.
  • Tables and bullets over paragraphs. A PRD is scanned, not read: this is the one document where a list beats prose.
  • Only what was discussed or confirmed — invent nothing.
  • No file paths or code; they rot. Rare exception: a tiny snippet that nails a decision — a type, a schema.

Use these sections:

## The problem
<What's wrong today, in the reader's words. One short paragraph.>

## What we're building
<A few sharp sentences. The core idea.>

## How it works
<The key mechanics as bullets.>

## Decisions already made
<Table: Area | Choice.>

## In scope / Out of scope
<Two short lists.>

## Open questions
<What still needs the user's call. Omit if none.>

Phase 4 — Approve (gate)

Show the draft in chat. Wait for an OK or edits. Don't publish until approved.

Phase 5 — Publish

Write the approved body to a temp file, which dodges shell-escaping. Drop an unknown label so the create can't fail on it. Then print one parseable line:

TITLE="..."; LABEL="${LABEL-Plan}"; BODY=$(mktemp)
# ...write the approved PRD to "$BODY"...
[ -n "$LABEL" ] && { gh label list --json name -q '.[].name' | grep -Fqx "$LABEL" || LABEL=""; }
URL=$(gh issue create --title "$TITLE" ${LABEL:+--label "$LABEL"} --body-file "$BODY")
rm -f "$BODY"
[ -n "$URL" ] || { echo "abort: issue create failed" >&2; exit 1; }
echo "PRD published: $URL (issue #${URL##*/})"

For --issue=N, replace only the PRD and keep the downstream sections in place. The rebuild keys on the exact ## Build plan / ## PR breakdown headings (so never use those headings in PRD prose); tr -d '\r' guards CRLF:

ISSUE=<the issue number>; BODY=$(mktemp)
# ...write the approved PRD to "$BODY"...
CUR=$(gh issue view "$ISSUE" --json body -q .body | tr -d '\r')
[ -n "$CUR" ] || { echo "abort: empty issue body" >&2; exit 1; }
DOWN=$(printf '%s\n' "$CUR" | awk '/^## Build plan/{f=1} /^## PR breakdown/{f=1} f')
OUT=$(mktemp)
{ printf '%s\n\n' "$(cat "$BODY")"; [ -n "$DOWN" ] && printf '%s\n' "$DOWN"; } > "$OUT"
gh issue edit "$ISSUE" --body-file "$OUT"
rm -f "$BODY" "$OUT"
echo "PRD published: $(gh issue view "$ISSUE" --json url -q .url) (issue #$ISSUE)"

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.