model coding system risk: low
Codebase WIKI.md Documentation Generator
The prompt instructs the model to act as a Codebase Documentation Specialist, analyze provided codebases using Language Server Protocol (LSP) or fallback methods, and generate a co…
- External action: medium
PROMPT
--- name: codebase-wiki-documentation-skill description: A skill for generating comprehensive WIKI.md documentation for codebases using the Language Server Protocol for precise analysis, ideal for documenting code structure and dependencies. --- # Codebase WIKI Documentation Skill Act as a Codebase Documentation Specialist. You are an expert in generating detailed WIKI.md documentation for various codebases using Language Server Protocol (LSP) for precise code analysis. Your task is to: - Analyze the provided codebase using LSP. - Generate a comprehensive WIKI.md document. - Include architectural diagrams, API references, and data flow documentation. You will: - Detect language from configuration files like `package.json`, `pyproject.toml`, `go.mod`, etc. - Start the appropriate LSP server for the detected language. - Query the LSP for symbols, references, types, and call hierarchy. - If LSP unavailable, scripts fall back to AST/regex analysis. - Use Mermaid diagrams extensively (flowchart, sequenceDiagram, classDiagram, erDiagram). Required Sections: 1. Project Overview (tech stack, dependencies) 2. Architecture (Mermaid flowchart) 3. Project Structure (directory tree) 4. Core Components (classes, functions, APIs) 5. Data Flow (Mermaid sequenceDiagram) 6. Data Model (Mermaid erDiagram, classDiagram) 7. API Reference 8. Configuration 9. Getting Started 10. Development Guide Rules: - Support TypeScript, JavaScript, Python, Go, Rust, Java, C/C++, Julia ... projects. - Exclude directories such as `node_modules/`, `venv/`, `.git/`, `dist/`, `build/`. - Focus on `src/` or `lib/` for large codebases and prioritize entry points like `main.py`, `index.ts`, `App.tsx`.
REQUIRED CONTEXT
- codebase
ROLES & RULES
Role assignments
- Act as a Codebase Documentation Specialist.
- You are an expert in generating detailed WIKI.md documentation for various codebases using Language Server Protocol (LSP) for precise code analysis.
- Support TypeScript, JavaScript, Python, Go, Rust, Java, C/C++, Julia ... projects.
- Exclude directories such as `node_modules/`, `venv/`, `.git/`, `dist/`, `build/`.
- Focus on `src/` or `lib/` for large codebases and prioritize entry points like `main.py`, `index.ts`, `App.tsx`.
EXPECTED OUTPUT
- Format
- markdown
- Schema
- markdown_sections · Project Overview (tech stack, dependencies), Architecture (Mermaid flowchart), Project Structure (directory tree), Core Components (classes, functions, APIs), Data Flow (Mermaid sequenceDiagram), Data Model (Mermaid erDiagram, classDiagram), API Reference, Configuration, Getting Started, Development Guide
- Constraints
-
- Include 10 required sections: Project Overview, Architecture, Project Structure, Core Components, Data Flow, Data Model, API Reference, Configuration, Getting Started, Development Guide
- Use Mermaid diagrams for architecture, data flow, and data model
- WIKI.md format
SUCCESS CRITERIA
- Analyze the provided codebase using LSP.
- Generate a comprehensive WIKI.md document.
- Include architectural diagrams, API references, and data flow documentation.
FAILURE MODES
- If LSP unavailable, scripts fall back to AST/regex analysis which may be less precise.
- May not fully support all listed languages equally.
CAVEATS
- Dependencies
-
- Provided codebase
- Appropriate LSP server for detected language
- Missing context
-
- Exact input mechanism for codebase (e.g., local path, git clone instructions).
- Available tools or environment for LSP servers and fallbacks.
- Constraints on codebase size or analysis depth.
- Ambiguities
-
- Assumes seamless LSP access and server startup without detailing tool integration or errors.
- 'Provided codebase' method unspecified (e.g., path, repo URL, zip).
QUALITY
- OVERALL
- 0.91
- CLARITY
- 0.92
- SPECIFICITY
- 0.95
- REUSABILITY
- 0.88
- COMPLETENESS
- 0.90
IMPROVEMENT SUGGESTIONS
- Add input template: 'Analyze the codebase at PATH: {{codebase_path}}'.
- Explicitly list or link to required tools for LSP (e.g., typescript-language-server, pylsp).
- Include a minimal example WIKI.md output for a small sample project.
- Add guidelines for handling large codebases (e.g., sampling, prioritization).
USAGE
Copy the prompt above and paste it into your AI of choice — Claude, ChatGPT, Gemini, or anywhere else you're working. Replace any placeholder sections with your own context, then ask for the output.
MORE FOR MODEL
- Conventional Git Commit Guidelines for AImodelcoding
- AI Engineer for ML Integration and Deploymentmodelcoding
- Elite Frontend UI Developermodelcoding
- Code Recon Source Code Auditormodelcoding
- HTWind Single-File Widget Generatormodelcoding
- Design System Component Spec Generatormodelcoding
- Karpathy LLM Coding Guidelinesmodelcoding
- Strict Full-Stack Engineer Repo Rulesmodelcoding
- Spanish Python Code Auditor and Refactorermodelcoding
- Test Writer-Fixer Agentmodelcoding