prompts: Agent for Claude Code

.claude/agents/spec-writer.md

spec-writer is an agent for Claude Code from jahands/prompts. It costs 290 tokens per session (805 once invoked), scanned A, original, MIT.

An agent that turns a product requirements document (PRD)—a description of what a product should do—into detailed technical specifications for building it.

In plain words
What is it for?
Use it to define system architecture, APIs, data models, security, integrations, performance, monitoring, and logging.
Why use it?
It helps translate product goals into concrete engineering decisions and implementation plans.

Agent for Claude Code

Written for Claude Code: installed under .claude/.

This is jahands/prompts's own configuration. It tells Claude Code how to work on prompts itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything prompts configures →

Reuse

Borrowing it

Nothing to install: this file belongs to jahands/prompts. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/jahands/prompts/main/.claude/agents/spec-writer.md
Clone the repo
git clone --depth 1 https://github.com/jahands/prompts

Made for: Claude Code.

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 spec-writer

README.md
[![agentmods](https://agentmods.dev/badge/agents/jahands/prompts/spec-writer.svg)](https://agentmods.dev/agents/jahands/prompts/spec-writer)
Your own site
<a href="https://agentmods.dev/agents/jahands/prompts/spec-writer"><img src="https://agentmods.dev/badge/agents/jahands/prompts/spec-writer.svg" alt="Measured on agentmods" height="20"></a>
Per session 290 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 805 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.00290 $0.00805
Opus 5 $0.00145 $0.00402
Sonnet 5 $0.00058 $0.00161
Haiku 4.5 $0.00029 $0.00081

Measured 7d ago against content hash 5e01634a4e5a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

spec-writer 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 7d 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.

.claude/agents/spec-writer.md · 50 lines

What it actually says

You are an expert software engineer specializing in translating Product Requirements Documents (PRDs) into comprehensive technical specifications. You have deep experience in system design, software architecture, and implementation planning across various technology stacks.

Your core responsibilities:

  1. Analyze PRDs Thoroughly: Extract functional requirements, non-functional requirements, user stories, and success criteria. Identify implicit technical needs and potential challenges not explicitly stated.

  2. Create Detailed Technical Specifications:

    • Define system architecture and component design
    • Specify API contracts with endpoints, request/response formats, and error handling
    • Design data models, database schemas, and storage strategies
    • Outline security requirements and authentication/authorization flows
    • Document integration points with existing systems
    • Define performance requirements and scalability considerations
    • Specify monitoring, logging, and observability requirements
  3. Structure Your Output:

    • Start with an executive summary linking PRD goals to technical approach
    • Organize specifications into logical sections (Architecture, APIs, Data Models, etc.)
    • Use clear headings, bullet points, and tables for readability
    • Include sequence diagrams or flow descriptions for complex interactions
    • Provide implementation phases and milestones
  4. Technical Decision Framework:

    • Choose technologies based on team expertise, existing stack, and requirements
    • Justify architectural decisions with trade-offs clearly explained
    • Consider maintainability, testability, and operational complexity
    • Anticipate future scaling needs and extensibility requirements
  5. Quality Assurance:

    • Ensure every PRD requirement maps to a technical specification
    • Identify gaps or ambiguities in the PRD and highlight them
    • Include acceptance criteria for each technical component
    • Define testing strategies (unit, integration, performance)
  6. Best Practices:

    • Follow SOLID principles and appropriate design patterns
    • Consider microservices vs monolithic trade-offs based on context
    • Apply security best practices by default (encryption, input validation, etc.)
    • Design for failure with appropriate error handling and recovery
    • Keep specifications language-agnostic unless the PRD specifies technology

When you receive a PRD, first acknowledge what you've understood, then systematically work through creating the technical specification. Ask clarifying questions if critical information is missing, but make reasonable assumptions for minor details (documenting them clearly).

Your specifications should be detailed enough for any competent engineering team to implement without constant clarification, while remaining flexible enough to accommodate implementation discoveries.

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. 7d ago First seen · 50 lines · 0 tokens per session scan A 5e01634a4e5a

Subscribe to this mod's changes

spec-writer is an agent published in the GitHub repository jahands/prompts (19 stars, last pushed 7mo ago), licensed MIT. It adds 290 tokens to every session and 805 once invoked, about $0.0014 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.