docs

A guided documentation-writing command for projects and code. It helps structure items such as README files, API documentation, architecture decisions, and code comments.

In plain words
What is it for?
Use it when documenting a project, function, API, architecture decision, or important piece of code while writing the final text yourself.
Why use it?
It helps you explain why code and design choices exist instead of leaving documentation incomplete or filled with comments that only repeat the code.

Command for Claude Code

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 commands/danielpodolsky/ownyourcode/docs
Clone the repo
git clone --depth 1 https://github.com/DanielPodolsky/ownyourcode

Made for: Claude Code.

Per session 13 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,011 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.00013 $0.02011
Opus 5 $0.00006 $0.01006
Sonnet 5 $0.00003 $0.00402
Haiku 4.5 $0.00001 $0.00201

Measured yesterday against content hash b24e027cafe9, 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.

.claude/commands/own/docs.md · 328 lines

How it starts

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

/own:docs

⚠️ PLAN MODE WARNING: Toggle plan mode off before running this command (shift+tab). OwnYourCode commands don't work correctly with plan mode.

Guide the junior through writing documentation. They write the docs, you guide the structure.

The Documentation Philosophy

"Code tells you HOW, comments tell you WHY. Good documentation explains the WHY that code cannot."

  • Junior WRITES the documentation, AI GUIDES structure
  • README is the front door to every project
  • Comments explain WHY, not WHAT
  • Documentation is interview material

This command does NOT:

  • Write complete README files
  • Generate all the documentation
  • Skip the learning process

Execution Flow

Phase 1: Identify What Needs Documenting

Question: "What do you need to document?"

Options:
1. Project README
   Description: The main README.md for my project

2. Function/API documentation
   Description: JSDoc, docstrings, or API docs

3. Architecture decisions
   Description: Why we built it this way

4. Code comments
   Description: Inline explanations in code

Phase 2: Assess Current State

Check what documentation exists:

# Look for README
Glob: README.md, README.txt, readme.md

# Look for existing docs
Glob: docs/**/*.md, documentation/**/*.md

# Check for JSDoc/docstrings
Grep: @param, @returns, :param, :return

If README exists, read it and assess:

"Let me see your current README...

[Read file]

Looking at this, can I answer these questions:

  1. What does this project do? (1 sentence)
  2. How do I install it?
  3. How do I use it?

Let's fill in what's missing."


Phase 3: Research Best Practices (MANDATORY)

NEVER give documentation advice without research.

Context7 — Documentation Standards
# Resolve library for documentation tools
Use mcp__context7__resolve-library-id with libraryName: "jsdoc"
# or "typedoc", "sphinx", "markdown"

# Fetch best practices
Use mcp__context7__get-library-docs with topic: "getting started" or "API documentation"

Read the full file on GitHub · 328 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 · 328 lines · 13 tokens per session scan A b24e027cafe9

Subscribe to this mod's changes

docs is a command published in the GitHub repository DanielPodolsky/ownyourcode (276 stars, last pushed 2mo ago), licensed MIT. It adds 13 tokens to every session and 2,011 once invoked, about $0.0001 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.