To investigate codebases, you can ask Claude Code to create a Mermaid Chart for you:
Markdown Text
Create a mermaid flowchart showing which modules import from which.
Flag any circular dependencies with a red style. I want to understand what I can safely change without cascading breakdowns.
Save the diagram in an MD file.
Rules:
- Group related files into logical components
- Use mermaid.js v11 syntax (for mkdocs-material compatibility)
- Do not use deprecated v10 syntax (e.g. use `---` for notes, not `note`)
- Use flowchart LR (left-to-right) layout
- Wrap the diagram in a fenced code block with ```mermaid (not ```mermaid.js or ```text)
- Try to prevent overlapping nodes and lines
This prompt creates a chart like this for our current codebase:
Text
---
title: second_brain — Module Dependencies
---
flowchart LR
subgraph entry["Entry Point"]
main["__main__.py"]
end
subgraph core["Core"]
cli["cli.py"]
end
subgraph lib["Library"]
app["app.py"]
notes["notes.py"]
end
subgraph scripts["Scripts"]
serve["scripts/serve_docs.py"]
end
main --> cli
cli --> app
cli --> notes
Tip: Post the text above in a GitHub issue to see how the chart renders.

Martin Breuss RP Team on March 22, 2026
Here’s how to remove the attribution by adding this JSON to
.claude/settings.json:Settings documentation