codebase-understanding
Build and use a lightweight, queryable codebase knowledge graph for unfamiliar repositories.
Skill by munlucky
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/munlucky-codebase-understanding-8ee0a4
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: data, agent-building
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
- Runs as
- Python package
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/codebase-understanding
What's inside
- Skill name
codebase-understanding- Description
- Build and use a lightweight, queryable codebase knowledge graph for unfamiliar repositories. Use when Codex needs to onboard into a repo, explain architecture, map files/functions/classes/imports/layers, answer "how does this work" questions, assess git diff or PR blast radius, produce an onboarding path, or create a durable codebase map without installing a full external dashboard plugin.
- License
- MIT
- Instructions
- 269 lines in SKILL.md · view on GitHub
Before installing
- Ships executable scripts
Files (15)
- SKILL.md
- openai.yaml · agents/
- index.html · assets/dashboard/
- graph-schema.md · references/
- upstream-analysis.md · references/
- build_chat_prompt.py · scripts/
- explain_graph.py · scripts/
- graph_utils.py · scripts/
- query_graph.py · scripts/
- scan_codebase.py · scripts/
- semantic_graph.py · scripts/
- serve_dashboard.py · scripts/
- understand_codebase.py · scripts/
- validate_graph.py · scripts/
- write_diff_overlay.py · scripts/
SKILL.md (first lines)
# Codebase Understanding
## Contract
Use this skill to turn a repository into a compact code graph, then answer from that graph plus targeted source reads. The graph is an aid, not the source of truth: verify claims against current files before making edits or high-risk recommendations.
Default output language is Korean unless the user asks otherwise.
This is an agent-operated skill. Do not ask the user to run the bundled Python commands unless they explicitly want manual CLI usage. When the user invokes `$codebase-understanding`, asks to understand a repository, asks how code is structured, asks for onboarding, asks a broad flow question, asks for file/symbol explanation, asks for diff impact, or asks to open the dashboard, choose and run the appropriate script yourself.
The skill name is `codebase-understanding` because it describes the reusable capability. `moonshotnote-skills` is only the repository that distributes several skills; it is not the name of this individual skill.
## Agent Invocation Policy
1. Resolve the target repository.
- If the user gives a path, use that path.
- If no path is given, use the current Codex session's project/workspace root automatically. In a normal local session this is the shell current working directory. Do not ask the user for a path just because they omitted one.
- If a subdirectory is given, let `understand_codebase.py` discover the repository root unless the user asks for a narrow subdirectory analysis.
2. Resolve the skill directory before running scripts.
- Prefer the installed skill path when available: `${CODEX_HOME:-$HOME/.codex}/skills/codebase-understanding`.
- If working from this repository, `skills/codebase-understanding` is also valid.
- Prefer running the script by absolute path with the shell working directory set to the target repository. That lets the script's default `.` mean the current project.
- If you run from the skill directory instead, pass the target repository as an absolute path.
3. Select the consumer mode from the user's intent.
- Whole repo onboarding, "study this repo", or no specific question: run `onboard` after ensuring a graph exists.
- Broad architecture or flow question: run `chat . "<question>"` from the target repository, or pass the absolute target repository if running elsewhere.
- Specific file, class, function, symbol, or `file:line` request: run `explain . <target>` from the target repository.
- Review, PR, changed file, or blast-radius request: run `diff .` with changed files from git or user input.
- Learning plan or all-file study guide: run `study .`.
- Visual exploration request: run `dashboard .`.
4. Ensure graph freshness.
- If `.codebase-understanding/codebase-map.json` is missing, run the product-style analyze flow first.
- If the repository has changed substantially or the user asks for a fresh map, run analyze again.
- For quick follow-up questions, reuse the existing graph, then verify final claims against source files.
5. Answer in terms of the user's request, not in terms of internal scripts. Mention generated files or dashboard URLs only when useful.
## Default Workflow
Use the product-style entrypoint first when a repository needs a fresh graph. It mirrors the upstream user flow without commit hooks or auto-update:
```powershell
py -3 <skill-dir>\scripts\understand_codebase.py
```
```bash
python3 <skill-dir>/scripts/understand_codebase.py
```
Default behavior:
1. Detect the project root.
2. Scan files and save `.codebase-understanding/codebase-map.json`.
3. Generate `.codebase-understanding/semantic-packs/*.jsonl` and heuristic semantic annotations, then merge responsibility, evidence, confidence, risk hints, and language notes into the graph.
4. If git changed files are available, write `.codebase-understanding/diff-overlay.json`.
5. Open the dashboard unless `--no-dashboard` is passed.
Use these subcommands for the original consumer surfaces:
```powershell
py -3 scripts\understand_codebase.py chat <repo-root> "How does auth work?"
py -3 scripts\understand_codebase.py diff <repo-root> --changed-file src\auth.ts
py -3 scripts\understand_codebase.py explain <repo-root> src\auth.ts:login
py -3 scripts\understand_codebase.py onboard <repo-root>
py -3 scripts\understand_codebase.py study <repo-root>
py -3 scripts\understand_codebase.py semantic <repo-root>
py -3 scripts\understand_codebase.py dashboard <repo-root>
```
```bash
python3 scripts/understand_codebase.py chat <repo-root> "How does auth work?"
python3 scripts/understand_codebase.py diff <repo-root> --changed-file src/auth.ts
python3 scripts/understand_codebase.py explain <repo-root> src/auth.ts:login
python3 scripts/understand_codebase.py onboard <repo-root>
python3 scripts/understand_codebase.py study <repo-root>
python3 scripts/understand_codebase.py semantic <repo-root>
python3 scripts/understand_codebase.py dashboard <repo-root>
```
## Low-Level Workflow
Use individual scripts when automation needs one step only.
1. Resolve the repository root.
- Prefer `git rev-parse --show-toplevel`.
- If the user gives a subdirectory, let `scan_codebase.py` climb to the project root by default so package manifests and TypeScript configs are visible.
- Use `--no-root-discovery` only when the user explicitly wants an isolated subdirectory graph.
- If running inside a Git worktree, write graph outputs to the active working tree unless the user explicitly wants the main checkout.
- Use the platform's Python launcher:
- Windows: `py -3`
- macOS/Linux: `python3`
2. Create or refresh the graph:
```powershell
py -3 scripts\scan_codebase.py <repo-root> --out <repo-root>\.codebase-understanding\codebase-map.json
```
```bash
python3 scripts/scan_codebase.py <repo-root> --out <repo-root>/.codebase-understanding/codebase-map.json
```
3. Validate the graph before relying on it:
```powershell
py -3 scripts\validate_graph.py <repo-root>\.codebase-understanding\codebase-map.json
```
```bash
python3 scripts/validate_graph.py <repo-root>/.codebase-understanding/codebase-map.json
```
4. Query only the relevant subgraph:
```powershell
py -3 scripts\query_graph.py <repo-root>\.codebase-understanding\codebase-map.json --q "auth login token"
```
```bash
python3 scripts/query_graph.py <repo-root>/.codebase-understanding/codebase-map.json --q "auth login token"
```From munlucky/moonshotnote-skills, MIT.
More from munlucky/moonshotnote-skills
- 0.529score
moonshotnote-ocr
munlucky
Extract and verify OCR text from images, screenshots, scanned pages, PDFs, Korean or mixed Korean-English UI captures, receipts, signs, ebook captures…
SkillBFreshness: BClaude Code +9 - 0.525score
text-knowledge-skill-builder
munlucky
Convert long source text, notes, transcripts, exported documents, manuals, or verified text files into public-safe Codex skills backed by structured…
SkillBFreshness: BClaude Code +9 - 0.479score
backend-architecture
munlucky
Registry-driven backend architecture meta-skill backed by a public-safe ontology distilled from FastAPI clean architecture, Spring modern API, Python…
SkillCFreshness: CClaude Code +9 - 0.479score
fastapi-clean-architecture
munlucky
FastAPI and clean architecture study assistant backed by a public-safe ontology and knowledge graph extracted from verified OCR notes.
SkillCFreshness: CClaude Code +9 - 0.479score
moonshot-research
munlucky
Maximum-saturation public-web research workflow for Codex.
SkillCFreshness: CClaude Code +9 - 0.479score
python-architecture-patterns
munlucky
Use when Codex needs to explain or connect Python-oriented software architecture patterns from a public-safe knowledge graph covering API design, data…
SkillCFreshness: CClaude Code +9 - 0.479score
spring-modern-api
munlucky
Spring 6 and Spring Boot 3 modern API development study assistant backed by a public-safe ontology and knowledge graph extracted from private OCR-derived notes.
SkillCFreshness: CClaude Code +9 - 0.479score
tidy-first
munlucky
Tidy First study and engineering-decision assistant backed by a public-safe ontology and knowledge graph extracted from private OCR-derived notes.
SkillCFreshness: CClaude Code +9 - 0.479score
modern-java-in-action
munlucky
Modern Java study assistant backed by a public-safe graph extracted from private OCR-derived notes.
SkillCFreshness: CClaude Code +9 - 0.476score
domain-driven-design-first-steps
munlucky
Use this public-safe Korean study skill for Domain-Driven Design first-step questions about subdomains, ubiquitous language, bounded contexts, context maps…
SkillCFreshness: CClaude Code +9 - 0.474score
teddynote-langchain-rag
munlucky
Use this skill for public-safe reasoning about RAG and LangChain pipelines, document loading, splitting, embedding, vector stores, retrievers, prompts…
SkillCFreshness: CClaude Code +9 - 0.470score
daily-webnovel-writing-knowledge
munlucky
Use this skill for Korean webnovel writing planning, serialization strategy, genre-market fit, character design, episode structure, readability, cliffhangers…
SkillCFreshness: CClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Jun 4, 2026 (4 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/munlucky/moonshotnote-skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from munlucky
- 0.556score
moon-relay-kernel
munlucky
Default provider-neutral command-skill entrypoint for Moon Relay Kernel task routing and adaptive workflow execution.
SkillAFreshness: AClaude Code +9 - 0.529score
moonshotnote-ocr
munlucky
Extract and verify OCR text from images, screenshots, scanned pages, PDFs, Korean or mixed Korean-English UI captures, receipts, signs, ebook captures…
SkillBFreshness: BClaude Code +9 - 0.525score
text-knowledge-skill-builder
munlucky
Convert long source text, notes, transcripts, exported documents, manuals, or verified text files into public-safe Codex skills backed by structured…
SkillBFreshness: BClaude Code +9 - 0.521score
codebase-master-guide
munlucky
코드베이스 전수 분석 및 인터랙티브 개발자 가이드(슬라이드북) 제작 스킬.
SkillBFreshness: BClaude Code +9 - 0.513score
architecture-artifacts
munlucky
Produce architecture artifacts and a provenance-bound Task Contract Seed before Kernel execution.
SkillBFreshness: BClaude Code +9 - 0.513score
codebase-understanding
munlucky
Build and query the regenerable account-root Code Index for the current Kernel project.
SkillBFreshness: BClaude Code +9
Cite this page
codebase-understanding skill. Agent Mart. https://agentmart.dev/skills/munlucky-codebase-understanding-8ee0a4 (last updated 2026-10-24)