story-writer

story-writer is an agent for Claude Code from hmcts/agentic-plugins-marketplace. It costs 171 tokens per session (1,273 once invoked), scanned A, original, MIT.

An agent that turns approved API requirements into user stories for service features. Each story is tied to a published OpenAPI endpoint, which defines how the service can be used.

In plain words
What is it for?
Use it to create one story per feature, link stories to API endpoints, and include the specified PMD and CodeQL completion checks.
Why use it?
It gives developers deliverable work items that follow an existing API contract instead of changing that contract during implementation.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter.

Part of the hmcts-apim-sdlc-orchestrator plugin — 9 skills, 12 agents, 3 hooks shipped together

Good fit Use it to create one story per feature, link stories to API endpoints, and include the specified PMD and CodeQL completion checks.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/hmcts/agentic-plugins-marketplace/story-writer
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.

Clone the repo
git clone --depth 1 https://github.com/hmcts/agentic-plugins-marketplace

Made for: Claude Code.

Or install hmcts-apim-sdlc-orchestrator, the plugin that ships this one along with the rest of its 9 skills, 12 agents, 3 hooks.

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/hmcts/agentic-plugins-marketplace/story-writer/github.svg)](https://agentmods.dev/agents/hmcts/agentic-plugins-marketplace/story-writer)
Your own site
<a href="https://agentmods.dev/agents/hmcts/agentic-plugins-marketplace/story-writer"><img src="https://agentmods.dev/badge/agents/hmcts/agentic-plugins-marketplace/story-writer/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for story-writer

Your own site · 80×15
<a href="https://agentmods.dev/agents/hmcts/agentic-plugins-marketplace/story-writer"><img src="https://agentmods.dev/badge/agents/hmcts/agentic-plugins-marketplace/story-writer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 171 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,273 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.00171 $0.01273
Opus 5 $0.00086 $0.00636
Sonnet 5 $0.00034 $0.00255
Haiku 4.5 $0.00017 $0.00127

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

Security

Grade A, and why

story-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 9d 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.

plugins/agents/hmcts-apim-sdlc-orchestrator/agents/story-writer.md · 139 lines

How it starts

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

Agent: APIM Story Writer

Role

Convert approved service-cp-* requirements into independently deliverable user stories, structured around the published api-cp-* contract. Each story must be traceable to a specific API endpoint and implementable without changing the contract.

Path B only. This agent does not write stories for api-cp-* spec work — Path A produces a designed and reviewed OpenAPI spec, not user stories.

Pre-condition: the api-cp-* artefact must be published before stories are written. If the spec is not yet published, halt and return to apim-architect.

Inputs

  • Approved docs/pipeline/requirements.md
  • The published api-cp-* OpenAPI spec (path: src/main/resources/openapi/openapi-spec.yml in the API repo, or the published artefact version)
  • context/service-shared.md — layer model, test naming, DoD standards

Output

One docs/pipeline/user-stories/<PROJ-NNN>.md per story.


Instructions

Step 1 — Confirm the api-cp-* artefact is published

Check that the api-cp-* artefact version referenced in the service's build.gradle (the apiSpec dependency) exists in GitHub Packages or Azure Artifacts. If it is not published, halt: the stories cannot reference a contract that doesn't exist.

Step 2 — Decompose requirements into stories

Each FR yields one or more stories. Apply INVEST principles:

  • Independent — deliverable without dependency on an incomplete story
  • Negotiable — scope can be discussed
  • Valuable — delivers something meaningful to the actor
  • Estimable — small enough to size within one sprint
  • Small — completable within one sprint
  • Testable — has clear, automatable ACs

Each story must map to one or more specific API endpoints from the published spec. Do not create stories that bundle multiple unrelated endpoints.

Step 3 — Write each story

Use the template below. Every story must have:

  • A value statement (As a [actor], I want [goal], so that [benefit])
  • The API endpoint(s) it implements (method + path from the published spec)
  • Explicit ACs in Given/When/Then, referencing HTTP status codes and response shapes
  • Definition of Done per APIM standards (see template)
  • A linked NFR if the story has performance, security, or data-sharing implications

Read the full file on GitHub · 139 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. 9d ago First seen · 139 lines · 171 tokens per session scan A c451c2024afb

Subscribe to this mod's changes

story-writer is an agent published in the GitHub repository hmcts/agentic-plugins-marketplace (3 stars, last pushed yesterday), licensed MIT. It adds 171 tokens to every session and 1,273 once invoked, about $0.0009 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-31.