docs-from-code

docs-from-code is a skill for Claude Code from Varnan-Tech/opendirectory. It costs 111 tokens per session (1,627 once invoked), scanned C, original, MIT.

A documentation tool that reads a codebase's functions, routes, data types, schemas, and structure before writing a README or API reference. An API reference explains how other programs can use the code.

In plain words
What is it for?
Use it to create or update README files, API documentation, and architecture explanations from an existing codebase.
Why use it?
It keeps documentation tied to code that actually exists and leaves unclear parts marked instead of guessing.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions subagents.

Part of the opendirectory-gtm-skills plugin — 65 skills shipped together

Good fit Use it to create or update README files, API documentation, and architecture explanations from an existing codebase.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/varnan-tech/opendirectory/docs-from-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.

Any agent
npx skills add Varnan-Tech/opendirectory --skill docs-from-code
Clone the repo
git clone --depth 1 https://github.com/Varnan-Tech/opendirectory

Made for: Claude Code.

Or install opendirectory-gtm-skills, the plugin that ships this one along with the rest of its 65 skills.

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-from-code

README.md
[![agentmods](https://agentmods.dev/badge/skills/varnan-tech/opendirectory/docs-from-code/github.svg)](https://agentmods.dev/skills/varnan-tech/opendirectory/docs-from-code)
Your own site
<a href="https://agentmods.dev/skills/varnan-tech/opendirectory/docs-from-code"><img src="https://agentmods.dev/badge/skills/varnan-tech/opendirectory/docs-from-code/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-from-code

Your own site · 80×15
<a href="https://agentmods.dev/skills/varnan-tech/opendirectory/docs-from-code"><img src="https://agentmods.dev/badge/skills/varnan-tech/opendirectory/docs-from-code.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 111 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,627 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 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.00111 $0.01627
Opus 5.5 $0.00044 $0.00651
Sonnet 5.5 $0.00022 $0.00325
Haiku 4.5 $0.00011 $0.00163

Measured 15d ago against content hash b3e15b62c173, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

docs-from-code scanned grade C with 2 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 15d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/extract_py.py, scripts/extract_ts.ts), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

3. Clean up: `rm -rf graphify-out/ .docs-extract.json`

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

From the `graphify query "show all API routes"` output. One section per resource, grouped by path prefix. For each route: method, path, description (from docstring or rationale node), request/response shape (from linked
skills/docs-from-code/SKILL.md · 160 lines

How it starts

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

docs-from-code

You are a technical writer. Your job is to generate accurate, developer-friendly docs by first building a knowledge graph of the codebase with graphify, then using that graph to write docs grounded in what actually exists.

DO NOT invent code. If you cannot find a clear description for something, write [Description needed]. Accurate but sparse docs are better than confident but wrong docs.

Before starting: Confirm you are inside a codebase directory. If the user pointed you at a remote repo, clone it first. If neither, ask: "Can you point me to the project directory or repository URL?"


Workflow

Step 1: Install graphify and Build the Knowledge Graph

graphify uses tree-sitter AST (20 languages, no LLM) for code structure and Claude subagents for semantic understanding of docs and comments.

pip install graphifyy
graphify . --no-viz

--no-viz skips HTML output. You only need GRAPH_REPORT.md and graph.json.

This produces graphify-out/ in the project root:

  • GRAPH_REPORT.md — god nodes, community clusters, surprising connections, suggested questions
  • graph.json — full queryable knowledge graph (persistent, SHA256-cached)

QA: Did graphify-out/GRAPH_REPORT.md get created? How many nodes and edges? If graphify fails, go to Step 1B.

Step 1B: Fallback (if graphify unavailable)
# TypeScript/JS projects:
cd <skill-directory>/scripts && npm install
npx ts-node extract_ts.ts <project-root> <project-root>/.docs-extract.json

# Python projects:
python3 <skill-directory>/scripts/extract_py.py <project-root> <project-root>/.docs-extract.json

Read references/extraction-guide.md for framework-specific notes on the fallback output.


Step 2: Read the Graph Report

Read graphify-out/GRAPH_REPORT.md in full. This gives you:

  • God nodes — highest-degree concepts (what everything connects through). Use these for the Architecture section.
  • Community clusters — logical groupings of related code. Use these for module documentation.
  • Surprising connections — non-obvious cross-file relationships. Note these in Architecture.
  • Suggested questions — graphify's assessment of what is worth documenting.

Read the full file on GitHub · 160 lines

Files

What ships with it

8 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 15d ago Changed · -1 lines b3e15b62c173
  2. 1mo ago First seen · 161 lines · 111 tokens per session scan C 03dfb7200e93

Subscribe to this mod's changes

docs-from-code is a skill published in the GitHub repository Varnan-Tech/opendirectory (686 stars, last pushed 9d ago), licensed MIT. It adds 111 tokens to every session and 1,627 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it C with 2 findings (recursive force delete, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

messaging-gateway-troubleshooting

Use this when Hermes messaging platforms are installed/configured but messages do not arrive, are ignored, do not reply, or appear to risk reply loops.

AtlasOmnia/donna-starter · 37 tokens

svix-sending-webhooks

Everything for working with Svix webhooks: first-time setup (API key, SDK install, first message), Dispatch (sending webhooks to your customers), Ingest (receiving third-party webhooks), Applications, Channels, customer UIDs, idempotency, App Portal embedding, operational webhooks, the Svix CLI, and — only when the…

svix/ai · 158 tokens

suap-api

Consume the SUAP (Sistema Unificado de Administração Pública) REST API v2 used by Brazilian federal institutes (IFRN, IFF, IFS, etc.) — obtain a JWT via /api/v2/autenticacao/token/, discover real endpoints via /api/openapi.json, and pull student data (boletim, períodos letivos, dados do aluno). Covers the WAF…

pedroiff0/awesome-skills · 154 tokens

financas-app

Corrigir, estender e validar o app de finanças pessoais (Node/Express + EJS + MongoDB + Docker). Cobre a arquitetura de porta única 4460 com demo via /demo, o fluxo de correção de UI (rebuild de AMBOS os containers + ASSETVERSION), validação por browser headless no IP docker, verificação ad-hoc e o padrão…

pedroiff0/awesome-skills · 125 tokens

suap-iff-api

Authenticate to and consume the SUAP IFF (Instituto Federal Fluminense) API v2 from the CLI — obtain the JWT access/refresh token via matricula+senha, then fetch student data (periodos letivos, dados do aluno, boletim). Use when the user has a suap.iff.edu.br matricula+senha and wants to extract academic data…

pedroiff0/awesome-skills · 102 tokens

express-csp-runtime-config

How to pass server-side runtime config (API prefix, feature flags, user id, CSRF token) from an Express/EJS app to client JS when a strict Content-Security-Policy is in force (helmet default scriptSrc self, with no unsafe-inline). Use this whenever you need to inject a value the browser JS must read at runtime, but…

pedroiff0/awesome-skills · 87 tokens