Agent skill · Backend & API

docs-from-code

Generates and updates README.md and API reference docs by reading your codebase's functions, routes, types, schemas, and architecture. Uses graphify to build a knowledge graph first, then writes accurate docs from it. Use when asked to write docs, generate a README, document an API, update stale docs, create an API reference from code, add an architecture section, or document a project in any language. Trigger when a user says their docs are missing, outdated, or wants to document their codebase without writing it manually.

Varnan-Techgithub.com/Varnan-TechGitHub ↗
claude-codecopilotships scriptsMIT
Install
npx skills add Varnan-Tech/opendirectory --skill docs-from-code --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 9
SKILL.md size: 7 KB
Bundled scripts: yes
Version: 1.0.0
Declared author: OpenDirectory
Requires: [claude-code, gemini-cli, github-copilot]
Path: skills/docs-from-code/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 571
Language: Python

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# 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. ```bash 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:*

What's inside
Steps it walks through
  1. Workflow
  2. Step 1: Install graphify and Build the Knowledge Graph
  3. Step 2: Read the Graph Report
  4. Step 3: Read Existing Documentation
  5. Step 4: Generate Documentation
  6. Step 5: Write Files, Clean Up, and Open PR
  7. What Good Output Looks Like
  8. What Bad Output Looks Like
Ships with 8 files
  • .env.example
  • README.md
  • evals/evals.json
  • references/extraction-guide.md
  • references/output-template.md
  • scripts/extract_py.py
  • scripts/extract_ts.ts
  • scripts/package.json
Commands it runs
pip install graphifyy
graphify . --no-viz
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
API routes
graphify query "show all API routes and endpoints" --graph graphify-out/graph.json
Data models
More from opendirectory
All skills →
About this skill
What does the docs-from-code skill do?

Generates and updates README.md and API reference docs by reading your codebase's functions, routes, types, schemas, and architecture. Uses graphify to build a knowledge graph first, then writes accurate docs from it. Use when asked to write docs, generate a README, document an API, update stale docs, create an API reference from code, add an architecture section, or document a project in any language. Trigger when a user says their docs are missing, outdated, or wants to document their codebase without writing it manually.

How do I install it?

Run `npx skills add Varnan-Tech/opendirectory --skill docs-from-code --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From Varnan-Tech/opendirectory, a repository with 571 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going