Skip to content

Guide · Agent skill

How to use the codebase-memory-mcp agent skill

Updated · written with AI from the project's own documentation and checked against our catalogue data

The codebase-memory-mcp skill teaches an AI agent to explore a codebase through a Codebase Memory graph served by an MCP server, instead of searching blindly with text matching. It is for developers working in large or unfamiliar repositories, teams planning refactors, and reviewers checking dead or complex code. After this guide you will know how to install the skill, what it asks the agent to do, how to trigger it with plain requests, and where its limits are.

Codebase Memory Explorergithub/awesome-copilot · MIT

Quick start

  1. 1Download the ZIP. Download the skill ZIP from this page and unzip it. Confirm the folder contains SKILL.md.
  2. 2Place the folder. Move the unzipped folder into ~/.claude/skills/ for all projects, or into .claude/skills/ inside one repository.
  3. 3Install the Codebase Memory MCP server. Make sure an installed Codebase Memory MCP server is running and exposes tools such as list_projects and search_graph.
  4. 4Check your checkout. Have a local Git checkout of the repository ready, so the agent can match it to an indexed project.
  5. 5Ask a plain question. Describe the task, such as mapping architecture or tracing callers, and mention the Codebase Memory graph if you want it used.
  6. 6Review the sources cited. Read the source snippets the agent points to, and check any strong claim before you act on it.

What the skill makes the agent do

The skill is a set of instructions in a file called SKILL.md. When it applies, it tells the agent to use a Codebase Memory graph to find symbols, callers, callees, dependencies, module structure and likely impact. The agent starts from the graph and then confirms important findings by reading the actual source files.

The skill also defines evidence levels (Scout, Verify and Auditor) so the agent does not overstate its findings. A graph result is treated as a lead, not proof. For example, the agent should not call code dead just because the index does not show callers, since the index may be incomplete.

  • Finds symbols, classes, interfaces and routes by name or keyword.
  • Traces who calls a function and what it calls.
  • Maps module boundaries and dependency paths.
  • Estimates the impact of a change before you refactor.
  • Flags dead or complex code for review, with source checks.

Install the skill from a ZIP file

Download the ZIP file from this page and unzip it. The folder contains SKILL.md. Put the folder in one of these locations: ~/.claude/skills/ to make the skill available across your projects, or the .claude/skills/ folder inside a single project to limit it to that project.

You can also upload the skill in the Claude apps under Settings → Capabilities → Skills, if your plan and app version offer that option.

  • Personal install: place the unzipped folder in ~/.claude/skills/.
  • Project install: place the unzipped folder in .claude/skills/ inside the repository.
  • App install: upload the skill under Settings → Capabilities → Skills.

Set up the prerequisites

The skill does not work on its own. It needs an installed Codebase Memory MCP server that provides tools such as list_projects, search_graph, trace_path and get_code_snippet. It also needs a local Git checkout of the repository you want to analyse. The skill checks that the indexed project matches your checkout before it relies on the graph.

This page does not give setup steps for the MCP server, so follow the documentation for that server.

  • An installed Codebase Memory MCP server exposing the graph tools.
  • A local Git checkout of the repository being analysed.
  • An AI client that loads agent skills, such as Claude.

Trigger the skill with natural requests

You do not need a special command. The skill's description tells the agent when to use it, so ask in plain language about the kind of task you have. Mention the Codebase Memory graph explicitly if you want to be sure it is used.

The skill is designed to skip small jobs. If your request is about one known file, a tiny one-file check, an exact string, a configuration value, an error message or non-code text, the agent should use ordinary search instead.

  • Map the architecture of this repository and list its main modules.
  • Who calls the function parseConfig, and what does it call?
  • What would break if I change the signature of UserService.save?
  • Find dead or unused code in the payments module and check each candidate against the source.
  • Use the Codebase Memory graph to trace the data flow from the API handler to the database layer.
  • Find the error string 'Invalid token' in the code. (The skill will skip the graph for this and use plain search.)

What the agent does behind the scenes

The skill tells the agent to call list_projects first and pick only the project whose root path matches your checkout. It then uses the other graph tools in a fixed order: check index status and version-control state, get the architecture overview, search the graph, read code snippets, trace call paths, and check index coverage for each file it cites.

For negative or exhaustive claims, such as saying nothing calls a function or that a change has no other impact, the skill requires stronger checks. These include the current index, complete result pages, coverage inspection and source reads. If those checks cannot be finished, the agent should state the limitation rather than give an absolute answer.

  • list_projects: confirms which indexed project matches your checkout.
  • search_graph and semantic_query: find candidates by name, keyword or meaning.
  • get_code_snippet and get_file_outline: read the real source.
  • trace_path: follows callers, callees and dependencies.
  • check_index_coverage: shows which files the index covers.

Safety notes: scripts and network

According to the skill's listing, it runs no scripts and uses no network. The skill also tells the agent to stay inside the canonical checkout root when it falls back to local file search, and not to follow symbolic links recursively.

The graph index can be stale or partial, so the skill warns against trusting it alone. When graph results and the checked-out source disagree, the skill says to treat the source as current and report possible index drift. The skill is released under the MIT licence.

  • Runs scripts: no.
  • Uses network: no.
  • Stays within the checkout root during local fallback search.
  • Treats source files as the final authority.

What people use it for

  • Getting oriented in an unfamiliar repository by mapping its modules and main entry points.
  • Tracing who calls a function before changing its signature.
  • Checking the likely impact of a refactor across services or dependencies.
  • Auditing candidate dead code, then verifying each candidate in the source before deleting anything.
  • Following a data flow from an API route to the code that stores the data.

Frequently asked questions

Is the codebase-memory-mcp skill free?

The skill is released under the MIT licence, as stated on its listing. The Codebase Memory MCP server it depends on is a separate install, so check its own licence and terms before you rely on it.

What do I need to use the codebase-memory-mcp skill?

You need an installed Codebase Memory MCP server that provides tools such as list_projects, search_graph and trace_path, plus a local Git checkout of the repository. The skill itself does not run scripts or use the network.

How do I install the codebase-memory-mcp skill?

Download the ZIP from this page and unzip it. Put the folder in ~/.claude/skills/ for personal use or in .claude/skills/ inside a project, or upload it in the Claude apps under Settings → Capabilities → Skills.

Can the agent use this skill for every question about my code?

No. The skill says to skip small single-file tasks, exact text lookups, configuration values and error strings, and to use ordinary search for those. It is aimed at exploring code, mapping architecture, tracing relationships and assessing impact.

Why does the agent still read my source files if the graph already has the answer?

The graph index can be stale or incomplete. The skill tells the agent to confirm important findings with source snippets, and to treat the source as the current version when the two disagree.

How does this compare with grep or normal code search?

Normal search is faster for exact text, such as an error string or a config key. The graph is more useful for questions about relationships, like callers, callees, dependencies and impact, which text search answers poorly. The skill itself tells the agent to choose between them.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

Use this skill if you work in a large or unfamiliar repository and need to map architecture, trace call paths or check the impact of a change, and you already run a Codebase Memory MCP server. Skip it for small single-file edits or exact text searches, where ordinary search is quicker, and do not rely on it alone for guaranteed completeness.

Download the skill