docs-from-code
Skill720 starsChanged 44 days agoMITView on GitHub
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.
- Deletes or force-pushes
- Installs packages
- Commits and pushes
3 other projects use a version of this.
Adopted by
Most recently taken up by
- vishnujchandran/.agentstheir own version, first seen Oct 20, 2026
- BackToCimaCoppi/Praxistheir own version, first seen Sep 23, 2026
- 00PrabalK00/claude-skillstheir own version, first seen Mar 16, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- BackToCimaCoppi/Praxis★ 6same name
- 00PrabalK00/claude-skills★ 1same name
- vishnujchandran/.agents★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository64 other files it gives its agents.
- app-store-review-arbitrageSkill
- blog-cover-generatorSkill
- brand-alchemySkill
- claude-md-generatorSkill
- cold-email-verifierSkill
- company-radarSkill
- competitor-pr-finderSkill
- cook-the-blogSkill
- dependency-update-botSkill
- domain-expired-opportunity-finderSkill
- dx-roasterSkill
- email-newsletterSkill
- explain-this-prSkill
- geo-gap-fixerSkill
- gh-issue-to-demand-signalSkill
- github-discussion-to-devrel-contentSkill
- seo-keyword-researchSkill
- graphic-case-studySkill
- graphic-chartSkill
- graphic-ebookSkill
- graphic-gifSkill
- graphic-slide-deckSkill
- hackernews-intelSkill
- human-toneSkill
- hyperframes-product-launch-videoSkill
- kill-the-standupSkill
- linkedin-job-post-to-buyer-pain-mapSkill
- linkedin-post-generatorSkill
- llms-txt-generatorSkill
- map-your-marketSkill
- meeting-brief-generatorSkill
- meta-ads-expertSkill
- meta-tribe-skillSkill
- newsletter-digestSkill
- noise2blogSkill
- noise-to-linkedin-carouselSkill
- npm-downloads-to-leadsSkill
- openverse-sfxSkill
- oss-launch-kitSkill
- outreach-sequence-builderSkill
- podcast-transcript-fetcherSkill
- position-meSkill
- pr-description-writerSkill
- pricing-finderSkill
- pricing-page-psychology-auditSkill
- producthunt-launch-kitSkill
- product-update-loggerSkill
- reddit-icp-monitorSkill
- reddit-post-engineSkill
- schema-markup-generatorSkill
- sdk-adoption-trackerSkill
- show-hn-writerSkill
- store-listing-optimizerSkill
- tweet-thread-from-blogSkill
- twitter-GTM-find-SkillSkill
- vc-curated-matchSkill
- vc-finderSkill
- vid-motion-graphicsSkill
- vid-product-launchSkill
- vid-sizzle-reelSkill
- The first 60 shown.
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. About 0 are common, 5 are distinctive, and 9 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
9
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 12
DO NOT invent code: If you cannot find a clear description for something, write [Description needed].
- Very specific: line 48
Read references/extraction-guide.md for framework-specific notes on the fallback output.
- Very specific: line 54
Read graphify-out/GRAPH_REPORT.md in full.
- Distinctive: line 84
Before writing anything new, check what already exists:
- Distinctive: line 86
Read README.md if present.
- Very specific: line 87
Read docs/API.md, docs/api.md, or API.md if present.
- Very specific: line 88
Read CHANGELOG.md for context on recent changes worth noting.
- Very specific: line 101
Read references/output-template.md for the exact templates to use.
- Distinctive: line 107
Use god nodes and community clusters to write a plain-English architecture overview.
- Very specific: line 118
QA:: Check 3 random routes in the generated docs/API.md against the actual source file.
- Distinctive: line 124
Write README.md to the project root (full file or updated sections only).
- Very specific: line 125
Write docs/API.md if routes were found.
- Distinctive: line 128
Ask the user: "Docs written.
- Very specific: line 147
Every route in docs/API.md matches a real path from the graphify query output
≈ “Common” is an estimate: at least 1 in 5 of the 383,637 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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 questionsgraph.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.jsonRead 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.
Then run targeted queries for specific doc sections:
# API routes
graphify query "show all API routes and endpoints" --graph graphify-out/graph.json
# Data models
graphify query "what are the main data models and types?" --graph graphify-out/graph.json
# Auth flow
graphify query "how does authentication work?" --graph graphify-out/graph.json
# Entry points
graphify query "what is the entry point and how is the app initialised?" --graph graphify-out/graph.jsonEach query returns a focused subgraph. Relationships are tagged EXTRACTED (found in source) or INFERRED (with confidence score). Trust EXTRACTED fully. Use INFERRED but flag uncertainty.
QA: Cross-check 2-3 routes from the query against actual source files before writing docs.
Step 3: Read Existing Documentation
Before writing anything new, check what already exists:
- Read
README.mdif present. Note which sections exist and which are stale or missing. - Read
docs/API.md,docs/api.md, orAPI.mdif present. - Read
CHANGELOG.mdfor context on recent changes worth noting.
Decide what to generate:
- No README — generate a full README from Template 1 in
references/output-template.md - README exists, API section stale — update only that section (Template 3)
- README exists, fully outdated — ask: "Your README exists but appears outdated. Rewrite fully or update specific sections?"
QA: List exactly what you will write or update before starting.
Step 4: Generate Documentation
Read references/output-template.md for the exact templates to use.
README — Project Description:
From package.json or pyproject.toml description + god nodes summary from GRAPH_REPORT.md.
README — Architecture Section: Use god nodes and community clusters to write a plain-English architecture overview. Example:
"The system is organised around 3 core modules:
AuthService(god node, connects to 14 other components),DatabaseAdapter(bridges all data access), andEventBus(central to async flows). The auth and request-handling modules are tightly coupled; the analytics module is independent."
README — Installation and Quick Start:
From the entry point file + scripts in package.json or Makefile.
API Reference (docs/API.md):
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 type nodes), curl example.
Flag anything without a docstring as [Description needed]. Do not invent behaviour.
QA: Check 3 random routes in the generated docs/API.md against the actual source file. Do the paths and descriptions match?
Step 5: Write Files, Clean Up, and Open PR
- Write
README.mdto the project root (full file or updated sections only). - Write
docs/API.mdif routes were found. Createdocs/if needed. - Clean up:
rm -rf graphify-out/ .docs-extract.json
Ask the user: "Docs written. Should I open a GitHub PR with these changes?"
If yes:
git checkout -b docs/auto-generated-$(date +%Y%m%d)
git add README.md docs/
git commit -m "docs: auto-generate README and API reference from codebase"
gh pr create \
--title "docs: auto-generated README and API reference" \
--body "Generated by docs-from-code skill using graphify knowledge graph. All routes and types verified against source."QA: Did the files write? Do paths exist? Did the PR open cleanly?
What Good Output Looks Like
- Architecture section explains god nodes and module relationships in plain English
- Every route in
docs/API.mdmatches a real path from the graphify query output - README Quick Start has a runnable snippet from tests or the entry point
- INFERRED relationships that influenced descriptions are noted as "likely" or "appears to"
- Missing descriptions are flagged
[Description needed], not fabricated
What Bad Output Looks Like
- Routes or functions that do not appear in the graphify query results
- Architecture section that is generic ("the app has controllers, services, and models")
- Examples using wrong function names or parameter types
- INFERRED edges described as definite facts without a confidence qualifier
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

