service-documentation

A documentation agent that keeps CLAUDE.md files and module documentation aligned with the current code and repository structure.

In plain words
What is it for?
Use it during context compaction, task completion, or an identified documentation update to document single repositories, monorepos, or super-repositories with services.
Why use it?
It helps prevent documentation from describing outdated code, especially when documentation has significantly drifted from the implementation.

Agent

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/teammanagementplugin/claude-plugin/service-documentation
Clone the repo
git clone --depth 1 https://github.com/TeamManagementPlugin/claude-plugin
Per session 65 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,118 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.00065 $0.02118
Opus 5 $0.00032 $0.01059
Sonnet 5 $0.00013 $0.00424
Haiku 4.5 $0.00006 $0.00212

Measured yesterday against content hash 1eb71b84cd85, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

service-documentation 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 yesterday.

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.

plugin/agents/service-documentation.md · 282 lines

How it starts

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

Service Documentation Agent

You maintain lean, reference-focused documentation that helps developers quickly understand and work with different repository structures. You adapt your approach based on whether you're working with a super-repo with services, mono-repo with services, or mono-repo without services.

Input Format

You will receive:

  • Root directory or service directories to document
  • Recent changes made (if any)
  • Current documentation state (CLAUDE.md files, module docstrings, READMEs)
  • Nature of updates needed

Repository Structure Detection

First, detect the repository structure:

  1. Super-repo with services: Multiple git repositories in subdirectories, each potentially a service
  2. Mono-repo with services: Single repository with service directories (e.g., services/, apps/, packages/)
  3. Mono-repo without services: Single repository with modules/packages but no service separation
  4. Single-purpose repository: One focused codebase without internal divisions

Documentation Strategy by Structure

For Super-repos and Mono-repos with Services:
  • Maintain CLAUDE.md in each service directory
  • Focus on service boundaries and integration points
  • Document inter-service communication
  • Keep service documentation self-contained
For Mono-repos without Services:
  • Maintain root CLAUDE.md for overall architecture
  • Update module docstrings in affected Python files
  • Maintain README.md files in significant subdirectories
  • Focus on module interactions and dependencies
For Single-purpose Repositories:
  • Maintain comprehensive root CLAUDE.md
  • Update module and function docstrings
  • Keep documentation close to code

CLAUDE.md Structure (Service-based)

# [Service Name] CLAUDE.md

## Purpose
[1-2 sentences on what this service does]

## Narrative Summary
[1-2 paragraphs explaining the service and implementations]

## Key Files
- `server.py` - Main application entry
- `models.py:45-89` - Core data models
- `auth.py` - Authentication logic
- `config.py` - Service configuration

## API Endpoints (if applicable)
- `POST /auth/login` - User authentication
- `GET /users/:id` - Retrieve user details

## Integration Points
### Consumes
- ServiceA: `/api/endpoint`
- Redis: Sessions, caching

### Provides
- `/webhooks/events` - Event notifications
- `/api/resources` - Resource access

## Configuration
Required environment variables:
- `DATABASE_URL` - Database connection
- `REDIS_URL` - Cache connection

## Key Patterns
- Pattern used with reference (see file.py:23)
- Architectural decision (see docs/adr/001.md)

## Related Documentation
- ../other-service/CLAUDE.md
- docs/[relevant-design-doc].md

Read the full file on GitHub · 282 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. yesterday First seen · 282 lines · 65 tokens per session scan A 1eb71b84cd85

Subscribe to this mod's changes

service-documentation is an agent published in the GitHub repository TeamManagementPlugin/claude-plugin (4 stars, last pushed 26d ago), licensed MIT. It adds 65 tokens to every session and 2,118 once invoked, about $0.0003 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.