Skip to content

CodeScope Code Graph Analysis

Answers structure, history, bug-tracing and PR-review questions about a codebase using a local code knowledge graph

Stars
28,880
Licence
Apache-2.0
Files
6 files

What it does

This skill teaches the agent to build and query a code knowledge graph of a project, covering functions, call chains, imports, classes, and git history, plus semantic embeddings for similarity search. Once installed, the agent can answer questions like who calls a function, which code is dead or highly coupled, or what a change might affect, instead of relying only on text search. It can also fetch GitHub issues to trace bugs to likely code locations and help score and compare open pull requests.

Great for

  • Developers exploring an unfamiliar large codebase who need call graphs, dependencies or architecture overviews
  • Maintainers triaging bug reports or reviewing a backlog of open pull requests for risk and conflicts
  • Engineers who want to generate class diagrams or module coupling reports for Python, JavaScript/TypeScript, C or Java projects

Skip it if

  • Small projects where grep or the IDE already answers the question, since building an index adds setup cost
  • Users in languages outside Python, JavaScript/TypeScript, C and Java, which the skill does not cover
  • Automated PR labelling on a live repository without review, because the skill can apply GitHub labels and this changes shared project state

Try asking

  • “Who calls free_irq in this codebase, and from which files?”
  • “Show me the modules with the highest coupling and any circular dependencies.”
  • “Analyze the open GitHub issues about crashes and point me to the most likely root-cause functions.”
  • “Score the open pull requests by risk and tell me which ones conflict with each other.”
Step-by-step guide: how to use CodeScope Code Graph AnalysisInstall, first run, examples, tips and FAQs

Install in 3 steps

  1. 1

    Download the skill

    The ZIP contains the 6 original files, the Apache-2.0 licence and an attribution note.

    codegraph.zip
  2. 2

    Add it to your agent

    Claude Code (all projects)

    mkdir -p ~/.claude/skills && unzip codegraph.zip -d ~/.claude/skills/

    Claude Code / Agent SDK (this project only)

    mkdir -p .claude/skills && unzip codegraph.zip -d .claude/skills/

    Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.

  3. 3

    Ask for the task

    No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.

Get better results

  • Run codegraph init with --commits and optionally --backfill-limit first so that change attribution and co-change queries work.
  • Set HF_HUB_OFFLINE=1 after the embedding model is cached, or point HF_ENDPOINT to a mirror if HuggingFace is unreachable.
  • Review any label or merge suggestions the skill produces before applying them to a shared repository.

What's inside

  • bug-analysis.md
  • evals/evals.json
  • patterns.md
  • pr-analysis.md
  • schema.md
  • SKILL.md

Redistributed unmodified from QwenLM/qwen-code under the Apache-2.0 licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.