GitDiagram Repository Overview
ahmedkhaleel2004/gitdiagram
Explains the architecture of a public GitHub repository through GitDiagram: how the code is organized, the main components with paths, and a Mermaid diagram.
Query and analyze codebases semantically using codebase-memory-mcp graph database.
$ npx skills add meain/dotfiles --skill codebase-query -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install meain/dotfiles codebase-query --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/meain/dotfiles.git skills-src && mkdir -p .claude/skills && cp -r skills-src/agents/.agents/skills/codebase-query .claude/skills/codebase-query && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "codebase-query" agent skill from https://github.com/meain/dotfiles/tree/master/agents/.agents/skills/codebase-query into .claude/skills/codebase-query/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "codebase-query", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/meain/dotfiles/tree/master/agents/.agents/skills/codebase-queryType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add meain/dotfiles --skill codebase-query -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install meain/dotfiles codebase-query --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/meain/dotfiles.git skills-src && mkdir -p .agents/skills && cp -r skills-src/agents/.agents/skills/codebase-query .agents/skills/codebase-query && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "codebase-query" agent skill from https://github.com/meain/dotfiles/tree/master/agents/.agents/skills/codebase-query into .agents/skills/codebase-query/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "codebase-query", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add meain/dotfiles --skill codebase-query -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install meain/dotfiles codebase-query --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/meain/dotfiles.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/agents/.agents/skills/codebase-query .cursor/skills/codebase-query && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "codebase-query" agent skill from https://github.com/meain/dotfiles/tree/master/agents/.agents/skills/codebase-query into .cursor/skills/codebase-query/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "codebase-query", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/meain/dotfiles.git --path agents/.agents/skills/codebase-query--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add meain/dotfiles --skill codebase-query -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install meain/dotfiles codebase-query --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/meain/dotfiles.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/agents/.agents/skills/codebase-query .gemini/skills/codebase-query && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "codebase-query" agent skill from https://github.com/meain/dotfiles/tree/master/agents/.agents/skills/codebase-query into .gemini/skills/codebase-query/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "codebase-query", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install meain/dotfiles codebase-queryInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add meain/dotfiles --skill codebase-query -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/meain/dotfiles.git skills-src && mkdir -p .github/skills && cp -r skills-src/agents/.agents/skills/codebase-query .github/skills/codebase-query && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "codebase-query" agent skill from https://github.com/meain/dotfiles/tree/master/agents/.agents/skills/codebase-query into .github/skills/codebase-query/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "codebase-query", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add meain/dotfiles --skill codebase-query -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install meain/dotfiles codebase-query --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/meain/dotfiles.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/agents/.agents/skills/codebase-query .opencode/skills/codebase-query && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "codebase-query" agent skill from https://github.com/meain/dotfiles/tree/master/agents/.agents/skills/codebase-query into .opencode/skills/codebase-query/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "codebase-query", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
codebase-queryQuery and analyze codebases semantically using codebase-memory-mcp graph database.
Codebase Query is an agent skill from meain/dotfiles. Query and analyze codebases semantically using codebase-memory-mcp graph database. Use to explore code structure, complexity, dependencies, call graphs, and architecture. Triggers: /codebase-query, /cbm, /code-graph, "show me high complexity functions", "what calls X", "find implementations of", "map service entry points", "analyze code complexity", "find technical debt", "what implements this interface"
Its SKILL.md is about 2.5k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including reference files (for example `references/cookbook.md` and `references/integrations.md`).
It sits in Development, covering Codebase onboarding and Technical debt. It works with Model Context Protocol. The repository describes itself as: If there is a shell, there is a way! The licence is MIT.
4 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit f469fb6. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
jqFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Codebase Query loads about 2.5k tokens when it runs, and up to ~7.6k if it reads all its reference files. Until then it costs about 106 tokens; SKILL.md has 739 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from meain/dotfiles at commit f469fb6, republished under its MIT licence (© meain). 739 words, ~2,455 tokens.
.claude/skills/codebase-query/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.Query and analyze codebases using codebase-memory-mcp semantic graph.
/codebase-query, /cbm, /code-graphYou are a codebase graph query assistant. Use codebase-memory-mcp to answer questions about code structure, complexity, dependencies, and architecture.
Search & Discovery
search_codeCall Graph Analysis
Complexity & Quality
Architecture Insights
get_architectureget_graph_schemaNote: In Claude Code, codebase-memory-mcp MCP tools are available natively. Prefer calling them directly over CLI. CLI examples use 2>&1 | grep -v "^level=" to suppress logs.
Use get_architecture and get_graph_schema:
codebase-memory-mcp cli get_architecture '{"project": "...", "aspects": ["entry_points"]}' 2>&1 | grep -v "^level="
codebase-memory-mcp cli get_graph_schema '{"project": "..."}' 2>&1 | grep -v "^level=" | jq '.node_labels[] | {label: .label, count: .count}'Use search_graph or trace_path:
codebase-memory-mcp cli search_graph '{"project": "...", "name_pattern": ".*Router.*", "label": "Function"}' 2>&1 | grep -v "^level="
codebase-memory-mcp cli trace_path '{"project": "...", "function_name": "CreateEvent", "direction": "both", "max_depth": 2}' 2>&1 | grep -v "^level="Use search_code when looking for string literals or patterns:
codebase-memory-mcp cli search_code '{"project": "...", "pattern": "GetOrgRegion", "file_pattern": "*.go", "limit": 10}' 2>&1 | grep -v "^level="Use query_graph with Cypher:
codebase-memory-mcp cli query_graph '{
"project": "...",
"query": "MATCH (f:Function) WHERE f.complexity > 15 AND f.is_test = false RETURN f.name, f.complexity, f.file_path ORDER BY f.complexity DESC LIMIT 10"
}' 2>&1 | grep -v "^level="When in a repository:
list_projects to find the indexed project nameUsers-meain-dev-folder-repo (path with slashes replaced by dashes)/Users/acme/dev/myapp/backend → Users-acme-dev-myapp-backendget_graph_schema to discover available node types and propertiesFind high complexity:
MATCH (f:Function)
WHERE f.complexity > 15 AND f.is_test = false
RETURN f.name, f.complexity, f.file_path
ORDER BY f.complexity DESC LIMIT 10Find interface implementations:
MATCH (s)-[:IMPLEMENTS]->(i:Interface {name: 'InterfaceName'})
RETURN s.name, s.file_pathFind functions with many parameters:
MATCH (f:Function)
WHERE f.param_count > 7 AND f.is_test = false
RETURN f.name, f.param_count, f.file_path
ORDER BY f.param_count DESC LIMIT 10Find entry points:
MATCH (f:Function)
WHERE f.is_entry_point = true
RETURN f.name, f.file_pathFind hot paths (most-called functions):
MATCH ()-[:CALLS]->(f:Function)
WHERE f.is_test = false
WITH f, count(*) as call_count
RETURN f.name, call_count, f.file_path
ORDER BY call_count DESC LIMIT 15Find recursive functions:
MATCH (f:Function)
WHERE f.recursive = true
RETURN f.name, f.file_pathFind HTTP endpoints:
MATCH (f:Function)-[h:HTTP_CALLS]->(target)
RETURN f.name, h.url_path, f.file_path
LIMIT 15Find external dependencies:
MATCH (p:Package)
WHERE p.external = true
RETURN p.name
ORDER BY p.nameFind similar functions (duplication candidates):
MATCH (f1:Function)-[s:SIMILAR_TO]->(f2:Function)
WHERE s.same_file = false AND s.jaccard > 0.7
RETURN f1.name, f2.name, s.jaccard, f1.file_path, f2.file_path
LIMIT 10Boolean comparisons:
f.is_test = falseNOT f.is_test (syntax error)String operations:
f.file_path STARTS WITH 'services/'f.file_path ENDS WITH '_test.go'f.file_path CONTAINS 'organchor'toLower(f.name) CONTAINS 'anchor'Aggregation:
MATCH (f:Function)-[:CALLS]->(target)
WITH f, count(*) as call_count
RETURN f.name, call_count
ORDER BY call_count DESCLimitations:
*1..3) not supportedWHERE and LIMITFunction / Method nodes (both types carry the same properties):
name, qualified_name, file_path, signaturecomplexity, cognitive (complexity metrics)param_count, loop_count, loop_depthis_exported, is_test, is_entry_pointrecursive, unguarded_recursionlines, docstringRelationships:
:CALLS - function calls:IMPLEMENTS - interface implementation:IMPORTS - module imports:USAGE - symbol usage (largest edge set):TESTS - test relationships (may be sparse):SIMILAR_TO - code similarity (has .jaccard and .same_file properties):HTTP_CALLS - HTTP endpoints (has .url_path property):ASYNC_CALLS - async patterns (has .broker property):CONFIGURES - config access (has .config_key property)Filter stderr and parse JSON:
codebase-memory-mcp cli query_graph '...' 2>&1 | grep -v "^level=" | jq .
# For user-friendly tabular output:
| jq -r '.rows[] | "\(.[0]): \(.[1]) (\(.[2]))"'list_projectsget_graph_schema to see available node types and countsget_architecturesearch_graphtrace_pathquery_graphget_code_snippetsearch_codeUse codebase-memory-mcp when:
Use search_code (CBM grep-like) when:
Use grep/ripgrep when:
Combine both:
rg locates their usage in docs/configQ: "Show me the most complex functions in the earn service"
A: Query with:
MATCH (f:Function)
WHERE f.file_path STARTS WITH 'services/earn/' AND f.is_test = false
RETURN f.name, f.complexity, f.cognitive, f.file_path
ORDER BY f.complexity DESC LIMIT 10Q: "What implements the EventRouter interface?"
A: Query with:
MATCH (s)-[:IMPLEMENTS]->(i:Interface {name: 'EventRouter'})
RETURN s.name, s.file_pathQ: "Find all functions that call GetOrgRegion"
A: Use trace_path:
codebase-memory-mcp cli trace_path '{
"project": "...",
"function_name": "GetOrgRegion",
"direction": "callers",
"max_depth": 2
}'/refactorability to validate complexity findings/create-commit to understand change impact/backlog for technical debt tasks/vault for documentationlist_projects firstdetect_changes then index_repository to reindexNOT, use = falseWHERE filters and reduce LIMITget_graph_schema for available properties and edge countsFunction query returns nothing: try Method (methods have nearly as many nodes as functions in Go repos)See references/ for:
cookbook.md — 50+ query recipes by categoryintegrations.md — integration patterns with rg, jj, lint, gh, fzf, emacsWhen user invokes this skill, identify what they want to analyze, construct the appropriate query, execute it, and present results with actionable insights.
© meain, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 2 other files (references) in agents/.agents/skills/codebase-query of meain/dotfiles.
Open the folder on GitHubat commit f469fb6
Codebase Query next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Codebase Query this skillmeain/dotfiles | 285 | — | ~2.5k | Automated safety check: Pass | MIT | |
| GitDiagram Repository Overviewahmedkhaleel2004/gitdiagram | 18k | — | ~427 | Automated safety check: Pass | MIT | |
| Explore Codebase with Graphtirth8205/code-review-graph | 32k | 1 repos | ~335 | Automated safety check: Pass | MIT | |
| Grepaiyoanbernabeu/grepai | 1.9k | — | ~1.1k | Automated safety check: Pass | MIT | |
| Octocode Code Researchbgauryy/octocode | 946 | — | ~1.5k | Automated safety check: Pass | MIT | |
| Releaseyoanbernabeu/grepai | 1.9k | — | ~918 | Automated safety check: Pass | MIT |
ahmedkhaleel2004/gitdiagram
Explains the architecture of a public GitHub repository through GitDiagram: how the code is organized, the main components with paths, and a Mermaid diagram.
tirth8205/code-review-graph
Navigates a codebase through the code-review-graph MCP tools: architecture overview, symbol search, caller and callee tracing, flows and oversized functions.
yoanbernabeu/grepai
Semantic code search and call-graph tracing. An agent skill from yoanbernabeu/grepai.
bgauryy/octocode
Researches code with evidence: traces callers, imports and cross-repo links, diagnoses failures and reports findings with exact file and line references and a confidence label.
yoanbernabeu/grepai
Create a new release for grepai. An agent skill from yoanbernabeu/grepai.
jahala/tilth
Replaces grep, cat, find and ls with the tilth CLI, which returns AST-aware outlines, definitions, usages and callers across many languages in one call.
meain/dotfiles
Search past Claude Code and Codex sessions. An agent skill from meain/dotfiles.
meain/dotfiles
Grilling session that challenges your plan against the existing domain model, sharpens terminology, and updates documentation (CONTEXT.md, ADRs) inline as decisions crystallise.
meain/dotfiles
Daily backlog management — full planning review OR add a single entry from a URL.
meain/dotfiles
Generate an interactive local HTML review page for a large PR or diff, grouping the changed files by logical concern (not just by file) so a reviewer can go through one theme at a time instead of a…
meain/dotfiles
Generate a concise weekly status update in team format. An agent skill from meain/dotfiles.
meain/dotfiles
Search the web using lynx and DuckDuckGo. An agent skill from meain/dotfiles.
Works with
Categories
Query and analyze codebases semantically using codebase-memory-mcp graph database. Codebase Query is an agent skill from meain/dotfiles. Query and analyze codebases semantically using codebase-memory-mcp graph database.
Codebase Query fits situations like: explore code structure; tasks that involve Codebase onboarding; tasks that involve Technical debt.
Run `npx skills add meain/dotfiles --skill codebase-query -a claude-code`. Or copy the skill folder (agents/.agents/skills/codebase-query in meain/dotfiles) into .claude/skills/codebase-query in your project. Claude Code loads it when a task matches its description.
Run `npx skills add meain/dotfiles --skill codebase-query -a codex`. Or copy the skill folder (agents/.agents/skills/codebase-query in meain/dotfiles) into .agents/skills/codebase-query in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add meain/dotfiles --skill codebase-query -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/codebase-query, .gemini/skills/codebase-query, .github/skills/codebase-query and .opencode/skills/codebase-query in your project.
Going by SKILL.md and its folder, Codebase Query needs the command-line tools its instructions call (jq).
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Codebase Query is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.5k tokens (SKILL.md is roughly 9.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 5.1k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Codebase Query: GitDiagram Repository Overview (ahmedkhaleel2004/gitdiagram, 18k stars), Explore Codebase with Graph (tirth8205/code-review-graph, 32k stars), Grepai (yoanbernabeu/grepai, 1.9k stars) and Octocode Code Research (bgauryy/octocode, 946 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
meain (a GitHub user) maintains it in meain/dotfiles, which has 285 GitHub stars. The repository holds 36 skills in this directory. The repository was last updated on September 5, 2026.
Source: meain/dotfiles on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.