Agent skill

Codegraphcontext

by CodeGraphContext in CodeGraphContext/CodeGraphContext

Use CodeGraphContext (CGC) to index a repo into a graph DB and query it via CLI or MCP.

MITAuto-check: notesAgent Workflows

Install Codegraphcontext

skills CLI
$ npx skills add CodeGraphContext/CodeGraphContext --skill codegraphcontext -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install CodeGraphContext/CodeGraphContext codegraphcontext --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/CodeGraphContext/CodeGraphContext.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.cursor/skills/codegraphcontext .claude/skills/codegraphcontext && rm -rf skills-src

Use ~/.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/

Facts

Skill name
codegraphcontext
GitHub stars
4.2k
Token cost
~675 tokens
SKILL.md length
320 words
Files
1
Skills in repo
1
Repo updated
First seen
Licence
MIT

At a glance

Use CodeGraphContext (CGC) to index a repo into a graph DB and query it via CLI or MCP.

  • Works in 4 steps: Install: pip install codegraphcontext… → Configure: Optional… → Index: From the repo root, cgc index .… → …
  • Wants semantic/code-graph search
  • SKILL.md covers When to use this skill, Core workflow, MCP setup (short) and Agent behavior, plus 1 more section
  • Calls uvx, pip and pipx

What it does

Codegraphcontext is an agent skill from CodeGraphContext/CodeGraphContext. Use CodeGraphContext (CGC) to index a repo into a graph DB and query it via CLI or MCP. Apply when the user wants semantic/code-graph search, call graphs, indexing, or configuring the codegraphcontext MCP server.

Its SKILL.md is about 680 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Agent Workflows, covering MCP servers and Codebase onboarding. It works with Model Context Protocol and Neo4j. The repository describes itself as: An MCP server plus a CLI tool that indexes local code into a graph database to provide context to AI assistants. The licence is MIT.

When your agent uses it

  • Wants semantic/code-graph search
  • Configuring the codegraphcontext MCP server

Example prompts

  • “/codegraphcontext”

Requirements

  • Python 3

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Install: pip install codegraphcontext (or pipx install codegraphcontext). With uv, uv tool install codegraphcontext or uvx…
  2. Configure: Optional ~/.codegraphcontext/.env for DEFAULT_DATABASE, Neo4j URI, or Kùzu path. Run cgc doctor if connections fail.
  3. Index: From the repo root, cgc index . (or cgc index --force . to rebuild). Ensure CLI and MCP use the same config so they see the same…
  4. Query: CLI (cgc find, cgc query, …) or MCP tools after cgc mcp setup / cgc mcp start in the client config.

What it can do on your machine

Read from SKILL.md and the folder at commit 642c321. It shows what the files ask for, not the result of running them.

  • Tool permissions

    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.

  • Runs code

    Shell commands in SKILL.md call:

    • uvx
    • pip
    • pipx
    • uv

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • opencode.ai

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Codegraphcontext loads about 675 tokens when it runs. Until then it costs about 57 tokens; SKILL.md has 320 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~57
When it runs · the whole SKILL.md, loaded when a task matches
~675

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.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:20
    nfigure**: Optional `~/.codegraphcontext/.env` for `DEFAULT_DATABASE`, Neo4j URI, or Kùzu path. Run `cgc doctor` if conn

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.

SKILL.md

The full file from CodeGraphContext/CodeGraphContext at commit 642c321, republished under its MIT licence (© CodeGraphContext). 320 words, ~675 tokens.

Download SKILL.mdSave it as .claude/skills/codegraphcontext/SKILL.md (or your agent's skills folder).
name
codegraphcontext
description
Use CodeGraphContext (CGC) to index a repo into a graph DB and query it via CLI or MCP. Apply when the user wants semantic/code-graph search, call graphs, indexing, or configuring the codegraphcontext MCP server.

CodeGraphContext (CGC)

When to use this skill

  • Indexing or re-indexing a codebase for AI or CLI queries.
  • Explaining how to install and run cgc, choose a database backend, or wire MCP into an editor.
  • Interpreting CGC tools: codegraph_find_code, analyze_code_relationships, add_code_to_graph, etc.

Core workflow

  1. Install: pip install codegraphcontext (or pipx install codegraphcontext). With uv, uv tool install codegraphcontext or uvx codegraphcontext … is supported; if a parser fails with ModuleNotFoundError: tree_sitter_c_sharp, run with an explicit extra package, e.g. uvx --with tree-sitter-c-sharp codegraphcontext ….
  2. Configure: Optional ~/.codegraphcontext/.env for DEFAULT_DATABASE, Neo4j URI, or Kùzu path. Run cgc doctor if connections fail.
  3. Index: From the repo root, cgc index . (or cgc index --force . to rebuild). Ensure CLI and MCP use the same config so they see the same graph.
  4. Query: CLI (cgc find, cgc query, …) or MCP tools after cgc mcp setup / cgc mcp start in the client config.

MCP setup (short)

  • Run cgc mcp setup and pick the editor, or add a server entry that runs cgc with args mcp start and the same env as the CLI.
  • OpenCode: Follow the vendor MCP docs for registering a stdio server, then point the command at cgc with arguments mcp, start (same as other editors). Official OpenCode MCP overview: OpenCode MCP servers.

Agent behavior

  • Prefer indexing the workspace before deep graph queries if the user has not indexed yet.
  • For fuzzy symbol search on Kùzu/Falkor backends, matching is typo-tolerant (edit distance); on Neo4j, full-text fuzzy uses Lucene-style terms—preserve original casing in queries when fuzziness matters for camelCase symbols.
  • If Repository.path is missing in the DB, that row is skipped for path checks and a warning is logged when repositories are listed; suggest cleaning stale Repository nodes (see Neo4j example in logs) if it keeps happening.

References in this repo

  • CLI entry: codegraphcontext.cli.main
  • MCP server and tool wiring: codegraphcontext.server, tool_definitions.py
  • User-facing setup detail: docs/docs/setup_workflows.md, docs/docs/guides/mcp_guide.md
  • Published copy of this skill (for docs / GitHub): docs/docs/agent_skill_codegraphcontext.md

© CodeGraphContext, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .cursor/skills/codegraphcontext of CodeGraphContext/CodeGraphContext.

Open the folder on GitHubat commit 642c321

Compare with similar skills

Codegraphcontext 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.

Codegraphcontext compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Codegraphcontext this skillCodeGraphContext/CodeGraphContext4.2k—~675Automated safety check: NotesMIT
Codebase SearchHelweg/open-codebase-index216—~1.3kAutomated safety check: PassMIT
Codebase Search WorkflowHelweg/open-codebase-index216—~822Automated safety check: PassMIT
1c Code Searchcomol/ai_rules_1c480—~1kAutomated safety check: PassNone
Basemind Index ScanGoldziher/basemind106—~997Automated safety check: WarnMIT
Neo4j MCP Skillneo4j-contrib/neo4j-skills114—~3kAutomated safety check: NotesMIT

Similar skills

  • Codebase Search

    Helweg/open-codebase-index

    Chooses the right retrieval tool for code questions: compact context for unfamiliar repos, direct lookup for known symbols, call graphs for relationships and grep for exhaustive matches.

    216 GitHub stars~1.3k tokensUpdated yesterday
    Agent WorkflowsAuto-check passed
  • Codebase Search Workflow

    Helweg/open-codebase-index

    Directs an agent to use a local codebase index for repository orientation, definition lookups, call graphs and semantic search before turning to web lookups.

    216 GitHub stars~822 tokensUpdated yesterday
    Agent WorkflowsAuto-check passed
  • 1c Code Search

    comol/ai_rules_1c

    Find BSL code in a 1C project — routines by name, code by behaviour or exact literal, module layout, members of a context — through the graph and code-metadata MCP servers before any Grep.

    480 GitHub stars~1k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Basemind Index Scan

    Goldziher/basemind

    Builds or refreshes the basemind code index from the command line, for when basemind reports no index or its MCP server is not running.

    106 GitHub stars~997 tokensUpdated yesterday
    Agent WorkflowsAuto-check: warnings
  • Neo4j MCP Skill

    neo4j-contrib/neo4j-skills

    A skill your agent uses when installing, configuring, or troubleshooting the official Neo4j MCP server (neo4j/mcp) — connecting Claude Code, Claude Desktop, Cursor, Windsurf, VS Code, Kiro, or other…

    114 GitHub stars~3k tokensUpdated today
    Agent WorkflowsAuto-check: notes
  • GitHub MCP

    vibeeval/vibecosystem

    GitHub MCP Server ile GitHub API erisimi. An agent skill from vibeeval/vibecosystem.

    531 GitHub stars~2.3k tokensUpdated 1 mo ago
    Agent WorkflowsAuto-check: notes

Categories

Questions about Codegraphcontext

What does Codegraphcontext do?

Use CodeGraphContext (CGC) to index a repo into a graph DB and query it via CLI or MCP. Codegraphcontext is an agent skill from CodeGraphContext/CodeGraphContext. Use CodeGraphContext (CGC) to index a repo into a graph DB and query it via CLI or MCP.

When should I use Codegraphcontext?

Codegraphcontext fits situations like: wants semantic/code-graph search; configuring the codegraphcontext MCP server.

How do I install Codegraphcontext in Claude Code?

Run `npx skills add CodeGraphContext/CodeGraphContext --skill codegraphcontext -a claude-code`. Or copy the skill folder (.cursor/skills/codegraphcontext in CodeGraphContext/CodeGraphContext) into .claude/skills/codegraphcontext in your project. Claude Code loads it when a task matches its description.

How do I install Codegraphcontext in Codex?

Run `npx skills add CodeGraphContext/CodeGraphContext --skill codegraphcontext -a codex`. Or copy the skill folder (.cursor/skills/codegraphcontext in CodeGraphContext/CodeGraphContext) into .agents/skills/codegraphcontext in your project. Codex loads it when a task matches its description.

Can I use Codegraphcontext in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add CodeGraphContext/CodeGraphContext --skill codegraphcontext -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/codegraphcontext, .gemini/skills/codegraphcontext, .github/skills/codegraphcontext and .opencode/skills/codegraphcontext in your project.

What does Codegraphcontext need to run?

Going by SKILL.md and its folder, Codegraphcontext needs the command-line tools its instructions call (uvx, pip, pipx and uv). Our summary lists: Python 3.

Does Codegraphcontext access the network?

SKILL.md names 1 domain. As links in the text: opencode.ai. This is read from the text; nothing was executed.

Is Codegraphcontext safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Codegraphcontext use?

Codegraphcontext is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Codegraphcontext use?

About 675 tokens (SKILL.md is roughly 2.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Codegraphcontext?

Skills that share tags, products or a category with Codegraphcontext: Codebase Search (Helweg/open-codebase-index, 216 stars), Codebase Search Workflow (Helweg/open-codebase-index, 216 stars), 1c Code Search (comol/ai_rules_1c, 480 stars) and Basemind Index Scan (Goldziher/basemind, 106 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Codegraphcontext?

CodeGraphContext (a GitHub organization) maintains it in CodeGraphContext/CodeGraphContext, which has 4,247 GitHub stars. The repository was last updated on September 29, 2026.

Source: CodeGraphContext/CodeGraphContext on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.