Analyse any code base using modern LLM coding agents, inspired by DeepWiki.
Check out some examples of its output:
- Copy
codebase_analysis_guidelines.md
into your project's notes/ folder. - Use your preferred LLM coding agent (Gemini, Claude, Copilot, etc.) to run the following prompt:
Read the guidelines in @notes/codebase_analysis_guidelines.md.
Run an analysis of this codebase.
- Use agent mode — Use an "agent" mode so the coding agent can run multiple requests and analyze the codebase in depth. This means tools like Aider may not be the best choice.
- Use Gemini models — The Google Gemini models offer 1M context window. (In contrast, Sonnet 4 has 200K.) The Flash model is often good enough if "thinking" is enabled.
- Avoid Copilot GPT-4.1 — I don't know, it just never got good results for me. It does have a 1M context window though.
Gemini CLI — Great results, highly recommended. Completely free to use with any Google Account. As of June 2025, Google provides 1000 free tokens per day for Gemini 2.5 Flash.
- Run Gemini CLI using
gemini --model gemini-2.5-flash
in your project directory. - Follow "Generic instructions" above.
sst/opencode — pretty good. Be sure to use the SST version, not the Charm version.
- Use a model like Gemini 2.5 Pro or Claude Sonnet 4.
- Follow "Generic instructions" above.
GitHub Copilot offers a $10 per month plan. As of June 2025, GitHub Copilot offers 300 premium requests per month, with one "agent mode" user prompt counting towards 1 request.
- Open the command palette (Ctrl+Shift+P or Cmd+Shift+P).
- Run Chat: New Chat Editor.
- Switch to Agent mode for more advanced code analysis.
- Select Claude Sonnet 4 or your preferred model if available.
- Follow "Generic instructions" above.
- Follow "Generic instructions" above.
- (Optional) Create a slash command in
.claude/commands/analyze.md
with the contents of the prompt above.
The prompt has hints on what to do when updating the documentation. It should use Git logs to figure out what's changed recently. Try this:
Follow the guidelines in @notes/codebase_analysis_guidelines.md.
Analyze this codebase. Only consider the files that have changed since 14 days ago.
Update documents in @notes/architecture/.
Create a script to automate the update process. For example, using the Gemini CLI:
gemini --model "gemini-2.5-flash" --prompt "Follow the guidelines in @notes/codebase_analysis_guidelines.md. Analyze this codebase. Only consider the files that have changed since 14 days ago. Update documents in @notes/architecture/."
A GitHub Action can be used to schedule this script to run every 14 days.
It helps teams and individuals quickly assess code quality, architecture, and potential improvements by leveraging AI-powered code analysis tools. The guidelines and instructions here are designed to be agent-agnostic, making it easy to use with a variety of LLMs and coding environments.
Use it when starting a job, or contributing to a new open source project.
Use it to help your LLM tools write PRD documents and design documents. Such as:
Design a new "response caching" feature for this codebase.
Consult @notes/architecture/ for details on the code base architecture.
Try it with spec-mode.
Some work places only has approved webchat interfaces for LLMs. You can still use this prompt there:
- Ask your favourite LLM to modify the prompt ("Modify this prompt to output the results in chat instead of writing to files.").
- Use a tool like repomix to convert a repo into a Markdown file.
- Paste the prompt and the repomix output into a webchat like Open WebUI.
Need more details on a specific feature? Try:
Follow the guidelines in @notes/codebase_analysis_guidelines.md.
Add FAQ question about response caching.
More ideas:
Add code examples for the "translation" module.
Elaborate on features in @notes/architecture/rate_limiting.md.
I think committing the notes/architecture/ and codebase_analysis_guidelines.md is generally a good idea, but working with a team may mean you may want to keep them uncommitted.
echo notes/architecture >> .git/info/exclude
echo notes/codebase_analysis_guidelines.md >> .git/info/exclude
- Also try spec-mode.
This project is licensed under the MIT Licence. See LICENSE for details.