Writing prompts · Prompt
Write a codebase wiki (prompt)
write-codebase-wiki-prompt
A prompt that writes a wiki for a codebase: each module, how requests flow, and how to extend a module, with a file named on every claim. Use when the user wants a WIKI.md, wiki pages for modules, or docs on how to extend the code.
Works with: Any AI Not yet model-tested; testing Jan 2027
Paste it into ChatGPT, Claude, Gemini or any AI chat, then tell it about your project. How it works
Install in Claude Code, Cursor or Codex (optional)
Only for AI coding tools that read skill folders. Run one line in a terminal, in your project folder. It downloads this skill's text files from TheSkillVault and nothing else; you can read them first with “View raw SKILL.md”.
Claude Code (all your projects)
curl -fsSL --create-dirs 'https://theskillvault.ai/api/skills/write-codebase-wiki-prompt/raw' -o ~/'.claude/skills/write-codebase-wiki-prompt/SKILL.md'Cursor (this project)
curl -fsSL --create-dirs 'https://theskillvault.ai/api/skills/write-codebase-wiki-prompt/raw' -o '.cursor/skills/write-codebase-wiki-prompt/SKILL.md'Codex and other Agent Skills tools (this project)
curl -fsSL --create-dirs 'https://theskillvault.ai/api/skills/write-codebase-wiki-prompt/raw' -o '.agents/skills/write-codebase-wiki-prompt/SKILL.md'
Or connect the whole library over MCP
Add TheSkillVault to Cursor or add this to your app's MCP settings (read-only; help):
{
"mcpServers": {
"theskillvault": {
"url": "https://theskillvault.ai/mcp"
}
}
}This prompt writes wiki pages for a codebase you can point at. It is not a short README and not a design doc for a system that does not exist yet.
When to use
- You want a WIKI.md for a repo.
- You need wiki pages for the modules.
- Someone asked how to extend the code.
When not to use
- You need a README with a quick start. Use write-readme-prompt.
- You only need a map before a small edit. Use research-repo-onboarding-prompt.
Steps
- Paste a directory tree, or the paths of the main files. Skip dependency folders.
- Paste the entry file and one or two modules. Remove secrets first.
- Say which module a new teammate would extend.
- Read the wiki. Drop any claim that names no file.
Prompt
Write a wiki for this codebase. Use only the files and tree I paste.
TREE AND FILES:
{{TREE AND FILES}}
MODULE TO EXTEND:
{{MODULE}}
Write these sections:
# Project overview
What the code does, in a few sentences. Name the stack only if a file shows it.
# Modules
One short subsection per main module. Say what it owns. Name the file.
# Request flow
How a request, job or command moves through the modules. Name the files in order. If you cannot see the path, write "unknown".
# How to extend
Steps to add a feature in {{MODULE}}. Each step names the file to open.
# Config
Settings a developer must set. If none are in the files, write "none shown".
Rules:
- Every claim names a file path, or says "unknown".
- Do not invent APIs, tables or folders.
- Skip dependency folders such as node_modules, vendor, .git, dist and build.
- A language server is optional. Pasted files are enough.
- One diagram is fine. A short numbered list is also fine.
How to adapt
- A huge repo? Ask for one module's wiki page, not the whole tree.
- You want a page per folder? Ask for one page per top-level folder under the source directory.
Gotchas
- Do not paste API keys, passwords or private data into a public AI.
- A wiki that cites no files is a guess. Check the paths before you commit it.
Portability
Works with any AI chat and any language. No tool lock-in.
Done when
- Modules, a request flow and how to extend are all present.
- Every claim names a file or says unknown.
Example prompt
"Write a WIKI.md for this codebase: modules, how requests flow, and how to extend the billing module."
---
Adapted from the "Codebase WIKI Documentation Skill" prompt by s-celles on prompts.chat (CC0 1.0, public domain).
Licence
Adapted from s-celles (prompts.chat, 'Codebase WIKI Documentation Skill') (Public domain (CC0 1.0) - prompt contributed to prompts.chat by s-celles), CC0 1.0. Adapted by TheSkillVault: kept wiki sections for modules, request flow and how to extend, dropped the required language-server setup, added a cite-a-file rule, steps and done-when. Queue name document-codebase-wiki-prompt; document is not a house verb.
Licence: CC0 1.0. Attribution when you reuse it: Based on work by s-celles (prompts.chat, 'Codebase WIKI Documentation Skill') (Public domain (CC0 1.0) - prompt contributed to prompts.chat by s-celles, CC0 1.0), https://github.com/f/prompts.chat/blob/b09880e229d2f091ffa2254bc187532fb8980f9b/prompts.csv; adapted by TheSkillVault, https://theskillvault.ai