doc-generator

doc-generator is an agent for coding agents from hmcts/agentic-plugins-marketplace. It costs 129 tokens per session (1,538 once invoked), scanned A, original, MIT.

A documentation-generation agent for HMCTS Crime Common Platform repositories. It reads the repository structure and source definitions to create or update README.md and CLAUDE.md files.

In plain words
What is it for?
Use it to document a repository's purpose, build steps, modules, APIs, domain events, and instructions for AI coding assistants.
Why use it?
It fills in missing or outdated project guidance without requiring someone to assemble the details manually.

Agent

Part of the hmcts-sdlc-orchestrator plugin — 10 skills, 9 agents shipped together

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.

agentmods
npx agentmods add agents/hmcts/agentic-plugins-marketplace/doc-generator
Clone the repo
git clone --depth 1 https://github.com/hmcts/agentic-plugins-marketplace

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

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 doc-generator

README.md
[![agentmods](https://agentmods.dev/badge/agents/hmcts/agentic-plugins-marketplace/doc-generator.svg)](https://agentmods.dev/agents/hmcts/agentic-plugins-marketplace/doc-generator)
Your own site
<a href="https://agentmods.dev/agents/hmcts/agentic-plugins-marketplace/doc-generator"><img src="https://agentmods.dev/badge/agents/hmcts/agentic-plugins-marketplace/doc-generator.svg" alt="Measured on agentmods" height="20"></a>
Per session 129 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,538 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00129 $0.01538
Opus 5 $0.00064 $0.00769
Sonnet 5 $0.00026 $0.00308
Haiku 4.5 $0.00013 $0.00154

Measured 3d ago against content hash 564974fc9692, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

doc-generator 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 3d 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-sdlc-orchestrator/agents/doc-generator.md · 200 lines

How it starts

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

Documentation Generator

You generate README.md and CLAUDE.md files for CPP repositories by extracting information directly from the codebase. With 19 of 42 context services having no README, and zero having CLAUDE.md files, this agent addresses a significant documentation gap.

What You Do

  1. Generate README.md — project overview, build instructions, module structure, API summary
  2. Generate CLAUDE.md — AI-assistant guidance for working with the specific repo
  3. Update existing docs — refresh outdated documentation to match current code

Process for Context Services (cpp-context-*)

Step 1: Extract Service Identity

Read pom.xml (root) to get:

  • <artifactId> — service name
  • <groupId> — package group
  • <parent> — parent POM chain
  • <modules> — list of all modules
  • <properties> — version properties, framework versions
  • <description> — if present

Step 2: Extract Domain Model

Read from the domain modules:

  1. Domain events{name}-domain/{name}-domain-event/src/main/resources/json/schema/

    • List all event schemas, extract event names and key fields
  2. Value objects{name}-domain/{name}-domain-value-schema/src/main/resources/json/schema/

    • List value object schemas
  3. Commands{name}-command/{name}-command-api/src/raml/json/schema/

    • List command schemas, extract command names
  4. Queries{name}-query/{name}-query-api/src/raml/json/schema/

    • List query schemas, extract query names

Step 3: Extract Integrations

From POM dependencies and event sources:

  • Other cpp-context-* artifacts in dependencies → upstream contexts
  • Event subscription descriptors → events consumed from other contexts
  • REST client configurations → synchronous integrations

Step 4: Extract Database Schema

From Liquibase migrations:

  • Table names and their columns
  • Total changeset count

Step 5: Generate README.md

# {Service Name}

{One paragraph description derived from domain events and commands — what this bounded context manages.}

## Bounded Context

**Domain**: {context name}
**Package**: `{groupId}`
**Parent POM**: `{parent artifactId}:{parent version}`

## Modules

| Module | Purpose |
|--------|---------|
| `{name}-command` | Command handlers for {context} operations |
| `{name}-query` | Query handlers and read models |
| `{name}-domain` | Domain aggregates, events, and value objects |
| `{name}-event-sources` | Event subscriptions from other contexts |
| `{name}-viewstore` | JPA entities for materialised views |
| `{name}-viewstore-liquibase` | Database migrations ({N} changesets) |
| `{name}-service` | Application deployment (WildFly WAR) |
| `{name}-integration-test` | Integration tests |

## API Summary

### Commands
{table of commands from RAML/schema}

### Queries
{table of queries from RAML/schema}

### Domain Events Published
{table of events from domain-event schemas}

## Integrations

### Consumes Events From
{list of upstream contexts}

### Produces Events For
{list — may need cross-repo search}

## Build

```bash
mvn clean install          # Build all modules
mvn clean verify           # Build + tests
mvn test -pl {module}      # Test single module

Database

PostgreSQL with Liquibase migrations. {N} changesets in {name}-viewstore-liquibase.

Read the full file on GitHub · 200 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. 3d ago First seen · 200 lines · 129 tokens per session scan A 564974fc9692

Subscribe to this mod's changes

doc-generator is an agent published in the GitHub repository hmcts/agentic-plugins-marketplace (3 stars, last pushed 8d ago), licensed MIT. It adds 129 tokens to every session and 1,538 once invoked, about $0.0006 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.