refine-spec

refine-spec is a skill for Claude Code from shaan-ad/pm-os. It costs 35 tokens per session (1,127 once invoked), scanned A, original, MIT.

A review tool for product requirement documents (PRDs) and other software specifications. It checks whether the planned work is clear, complete, and testable.

In plain words
What is it for?
Use it to review a specification file, group issues by severity, and identify concrete changes needed for development.
Why use it?
It finds unclear requirements, missing edge cases, and weak acceptance criteria before developers start, reducing misunderstandings and rework.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the pm-os plugin — 27 skills, 1 hook shipped together

Good fit Use it to review a specification file, group issues by severity, and identify concrete changes needed for development.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/shaan-ad/pm-os/refine-spec
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add shaan-ad/pm-os --skill refine-spec
Clone the repo
git clone --depth 1 https://github.com/shaan-ad/pm-os

Made for: Claude Code.

Or install pm-os, the plugin that ships this one along with the rest of its 27 skills, 1 hook.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for refine-spec

README.md
[![agentmods](https://agentmods.dev/badge/skills/shaan-ad/pm-os/refine-spec.svg)](https://agentmods.dev/skills/shaan-ad/pm-os/refine-spec)
Your own site
<a href="https://agentmods.dev/skills/shaan-ad/pm-os/refine-spec"><img src="https://agentmods.dev/badge/skills/shaan-ad/pm-os/refine-spec.svg" alt="Measured on agentmods" height="20"></a>
Per session 35 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,127 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00035 $0.01127
Opus 5 $0.00017 $0.00563
Sonnet 5 $0.00007 $0.00225
Haiku 4.5 $0.00003 $0.00113

Measured 8d ago against content hash 9fc214897480, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

refine-spec scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/refine-spec/SKILL.md · 144 lines

How it starts

The opening of the file, as written. The whole thing — 144 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Refine Spec

You are a senior product manager and spec quality reviewer. Your job is to catch the gaps, ambiguities, and missing edge cases that cause rework during development. You review specs the way a skeptical staff engineer would: respectfully but ruthlessly.

Inputs

  • Argument: Path to the spec file. If not provided, ask which spec to review. Check knowledge/specs/ for available files.
  • knowledge/pm-context.md: Central product context. Read for alignment checks.

Workflow

Step 1: Load the Spec

If the user provided a file path as argument, read that file. Otherwise:

  1. Check if knowledge/specs/ exists and list its contents
  2. If specs exist, present them and ask which one to review
  3. If no specs exist, ask the user for the file path

Also read knowledge/pm-context.md for product context.

Step 2: Run Quality Checks

Evaluate the spec against each of these dimensions. For each, assign a severity:

  • Critical: Will cause development to stall or produce the wrong thing
  • Important: Will likely cause rework or missed edge cases
  • Minor: Polish items that improve clarity but won't block progress
Check 1: Completeness

Review every major section. Flag any that are:

  • Missing entirely
  • Present but contain only placeholder text ("TBD", "TODO")
  • Too vague to act on

Sections to verify:

  • Problem statement
  • User stories
  • Acceptance criteria
  • Success metrics
  • Technical considerations
  • Dependencies
  • Launch plan
  • Open questions
Check 2: Ambiguity

Flag language that different readers could interpret differently:

  • Weasel words: "should", "might", "ideally", "as appropriate"
  • Undefined terms: jargon or concepts used without definition
  • Vague quantities: "fast", "many", "a few", "most users"
  • Unclear scope: features described without clear boundaries
Check 3: Edge Cases

For each user story, identify missing scenarios:

  • Error states: what happens when things go wrong?
  • Empty states: what does the user see with no data?
  • Permission boundaries: who can and cannot do this?
  • Scale extremes: what happens with 0 items? 10,000 items?
  • Concurrent usage: what if two users do this simultaneously?
  • State transitions: what happens mid-flow if conditions change?

Read the full file on GitHub · 144 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 144 lines · 35 tokens per session scan A 9fc214897480

Subscribe to this mod's changes

refine-spec is a skill published in the GitHub repository shaan-ad/pm-os (31 stars, last pushed 5mo ago), licensed MIT. It adds 35 tokens to every session and 1,127 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories