ownyourcode: Command for Claude Code

.claude/commands/own/docs.md

docs is a command for Claude Code from DanielPodolsky/ownyourcode. It costs 13 tokens per session (2,011 once invoked), scanned A, original, MIT.

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

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths; names the AskUserQuestion tool.

This is DanielPodolsky/ownyourcode's own configuration. It tells Claude Code how to work on ownyourcode itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything ownyourcode configures →

Reuse

Borrowing it

Nothing to install: this file belongs to DanielPodolsky/ownyourcode. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/DanielPodolsky/ownyourcode/main/.claude/commands/own/docs.md
Clone the repo
git clone --depth 1 https://github.com/DanielPodolsky/ownyourcode

Made for: Claude Code.

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 docs

README.md
[![agentmods](https://agentmods.dev/badge/commands/danielpodolsky/ownyourcode/docs/github.svg)](https://agentmods.dev/commands/danielpodolsky/ownyourcode/docs)
Your own site
<a href="https://agentmods.dev/commands/danielpodolsky/ownyourcode/docs"><img src="https://agentmods.dev/badge/commands/danielpodolsky/ownyourcode/docs/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 docs

Your own site · 80×15
<a href="https://agentmods.dev/commands/danielpodolsky/ownyourcode/docs"><img src="https://agentmods.dev/badge/commands/danielpodolsky/ownyourcode/docs.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
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. 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.00013 $0.02011
Opus 5.5 $0.00005 $0.00804
Sonnet 5.5 $0.00003 $0.00402
Haiku 4.5 $0.00001 $0.00201

Measured 1mo ago against content hash b24e027cafe9, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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.

.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. 1mo ago 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 (292 stars, last pushed 4mo ago), licensed MIT. It adds 13 tokens to every session and 2,011 once invoked, about $0.0001 per session on Opus 5.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.