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.
npx skills add Varnan-Tech/opendirectory --skill docs-from-code --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# 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:*
- Workflow
- Step 1: Install graphify and Build the Knowledge Graph
- Step 2: Read the Graph Report
- Step 3: Read Existing Documentation
- Step 4: Generate Documentation
- Step 5: Write Files, Clean Up, and Open PR
- What Good Output Looks Like
- What Bad Output Looks Like
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
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.
