Skip to content
Back to skills

Codebase Memory

ASecurity

Use the codebase knowledge graph for structural code queries, trace call paths and dependencies, inspect architecture, assess change impact, or activate the bundled Claude Code discovery hooks.

  • 21 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 4, 2026
ai-agentspythongit

Works with

  • claude code
  • mcp

Security analysis

A100/100

Pro scans all 7 files and shows the line behind each finding

Scanned September 21, 2026

npx -y skills add ConnorGriffin/skills --skill codebase-memory --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Codebase Memory?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Codebase Memory
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/connorgriffin-codebase-memory/badge)](https://www.skillsdirectory.com/skills/connorgriffin-codebase-memory)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: codebase-memory
description: Use the codebase knowledge graph for structural code queries, trace call paths and dependencies, inspect architecture, assess change impact, or activate the bundled Claude Code discovery hooks.
---

# Codebase Memory

Follow [reminder.md](reminder.md) for the standing discovery policy; it is the one
authored policy shared by this skill, the profile pointer, and the installed
SessionStart hook.

When `ensure` reports unavailable, use its cbm-onboard diagnostic and bounded retry
sequence rather than guessing at a project or treating every failure as a sandbox
denial. The reminder owns the details.

## Activate discovery guidance in Claude Code

After the standard skills installer copies this directory, run:

```sh
python3 ~/.claude/skills/codebase-memory/scripts/install.py
```

For a non-default Claude home:

```sh
python3 <installed-skill>/scripts/install.py --claude-home PATH
```

The installer owns three files under the selected Claude home's `hooks/`
directory and merges the skill's registrations into `settings.json`. It preserves
unrelated settings and hook registrations. Malformed settings, conflicting
registrations, symlinks, and unowned managed-path files are no-write failures.
Its scope is the bundled files and registrations.

To merge the registrations into a settings file kept outside the Claude home, for
example one versioned in a dotfiles checkout:

```sh
python3 <installed-skill>/scripts/install.py --claude-home PATH \
  --settings-file PATH/TO/settings.json
```

`--settings-file` moves only the settings file. The three hook files, and the
paths rendered into the registrations, still follow `--claude-home`. The named
target must be a regular non-symlink file, and its parent directory must already
exist, be a directory, and be writable and searchable; a symlinked target or an
unusable parent is a no-write failure. A parent reached through a symlinked
directory is fine, which is how a versioned checkout is usually wired.

For a consumer that manages its own `settings.json` hook registrations, add
`--skip-settings`:

```sh
python3 <installed-skill>/scripts/install.py --claude-home PATH --skip-settings
```

This installs the three managed hook files and stops there: it does not read,
parse, validate, merge, or write `settings.json` at all. The consumer owns
registering the installed hooks in its own settings. All the other guards
still run: source ownership, the hooks-directory symlink check, and the
unowned-managed-file check. `--skip-settings` and `--settings-file` name two
different settings targets, so the installer refuses both together at the
command-line level rather than picking one.

The external tool `codebase-memory-mcp` installs its own hooks at two of the
same names (`cbm-code-discovery-gate`, `cbm-session-reminder`). Activation does
not reclaim a name another tool already owns; it stops and names the likely
owner and the repair (move the foreign files out of `hooks/`, remove that
tool's registrations from `settings.json`, then rerun).

## Graph-query vocabulary

- `list_projects` and `index_status` report indexed-project inventory and health.
- `get_architecture` summarizes repository structure and architectural relationships.
- `search_graph` locates symbols by name, label, or qualified-name pattern.
- `trace_path` follows callers, callees, data flow, and cross-service paths.
- `get_code_snippet` returns exact source for a resolved symbol.
- `query_graph` handles complex multi-hop graph questions.
- `search_code` searches literal source text.
- `detect_changes` maps a Git diff to its structural impact.
- `index_repository` creates or refreshes a repository graph.

Files in this skill

  • SKILL.md3.4 KB
  • agents/openai.yaml209 B
  • config/claude-settings.json1.1 KB
  • hooks/cbm-code-discovery-gate523 B
  • hooks/cbm-session-reminder196 B
  • reminder.md1.4 KB
  • scripts/install.py10.6 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.