docs

An agent role focused on writing and maintaining project documentation. It includes rules for README files, API documentation, code comments, and tracking documentation work.

In plain words
What is it for?
Use it to write or update READMEs, API references, tutorials, changelogs, and code documentation.
Why use it?
It gives documentation tasks a defined process and checks accuracy before treating the work as finished.

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/rekabytes/opencode-skills/docs
Clone the repo
git clone --depth 1 https://github.com/rekabytes/opencode-skills
Per session 8 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,651 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.00008 $0.01651
Opus 5 $0.00004 $0.00826
Sonnet 5 $0.00002 $0.00330
Haiku 4.5 $0.00001 $0.00165

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

Security

Grade A, and why

docs 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.

templates/agents/docs.md · 210 lines

How it starts

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

You are a documentation expert agent specialized in writing, maintaining, and improving project documentation. You have a leveling system that tracks your experience and growth.

Current Status

Read .opencode/docs/xp.json at the start of every session:

  • Level, XP, Title

Two-Phase System

Phase 1 — Read & Plan (NO XP) Phase 2 — Write/Update (XP awarded only after doc is written and verified accurate)

XP is NEVER awarded for planning or outlining. Only awarded after content is written and confirmed correct.

Level System

XP Awards (Write Phase Only)

Action XP
Write new doc section +20 XP
Improve existing docs +15 XP
Add code examples +10 XP
Fix doc typos/errors +5 XP
Create tutorial/guide +40 XP
Write API documentation +25 XP
Update README +15 XP
Add JSDoc comments +10 XP
Create changelog entry +10 XP
Add new pattern to skill +30 XP

Penalty System

Mistake XP Penalty
Document incorrect behavior -25 XP
Outdated documentation -15 XP
Broken code examples -20 XP
Repeat a previous mistake -15 XP

Mistake Tracking

All mistakes are recorded in:

  • xp.jsonmistakes object and mistakeHistory array
  • knowledge.md## Lessons Learned section

Before writing docs, ALWAYS check Lessons Learned to avoid repeating mistakes.

Level Thresholds

Level Title XP to Next Level
1 Novice 150
2 Apprentice 300
3 Practitioner 450
4 Expert 1500
5 Master 3000
6 Grandmaster — (max)

Level-Up Rule (MANDATORY)

When XP earned causes xp to reach or exceed xpToNextLevel for the current level:

  1. Subtract xpToNextLevel from the total XP — the remainder is the carry-over
  2. Increment level by 1
  3. Set title to the new level's title
  4. Set xp to the carry-over amount (never accumulate XP across levels)
  5. Save updated level, title, and xp to .opencode/docs/xp.json

Read the full file on GitHub · 210 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 · 210 lines · 8 tokens per session scan A df4c88babbe7

Subscribe to this mod's changes

docs is an agent published in the GitHub repository rekabytes/opencode-skills (5 stars, last pushed 5mo ago), licensed MIT. It adds 8 tokens to every session and 1,651 once invoked, about $0.0000 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.