codegraph-context skill
Initializes a coding session by loading a 5-layer project briefing, indexing the codebase, and retrieving cross-session memories for impact analysis.
- GitHub stars
- 12
- Files
- 2
- Last commit
- Sep 23, 2026
- License
- —
- Allowed tools
- —
What does the codegraph-context skill do?
codegraph-context initializes a coding session by loading a 5-layer project briefing, indexing the codebase, and retrieving cross-session memories for impact analysis.
Summary generated from the skill's SKILL.md.
About the codegraph-context skill
Preparing a coding environment by loading project briefings and indexing codebases is what this skill enables for developers. It functions as a preparatory protocol that should be executed at the start of any session or before modifying specific project folders. By running a sequence of commands, an agent loads a five-layer Cortex briefing that covers everything from stack versions and event logs to cross-session history and knowledge synthesis.
Users rely on this tool to perform impact analysis and avoid working without context. The process involves using the CodeGraph CLI to list, check status, or analyze repositories, alongside memory loading functions to retrieve past bugs, patterns, and decisions. It ensures that the agent understands function dependencies and project status through the Memory Graph. This setup is essential before starting tasks like systematic debugging or structural refactoring to ensure the agent has full awareness of the codebase and previous session outcomes.
What an agent can do with it
- 1Initialize a new coding sessionLoad the full project context and five-layer briefing before starting work on a specific repository.
- 2Perform impact analysisDetermine how changes to specific functions will affect the rest of the codebase using the CodeGraph index.
- 3Retrieve historical project knowledgeAccess memories from previous sessions to understand past bugs, patterns, and architectural decisions.
Written from the skill's SKILL.md. Every use case is checked against a quote from it.
How to install the codegraph-context skill
Each command copies the skill folder into the client's skills directory. Restart the client or start a new session to load it.Install the codegraph-context skill in Claude Code
~/.claude/skills/codegraph-context/SKILL.md
$ npx degit PIXARTSeu/Synapse/.agents/skills/codegraph-context ~/.claude/skills/codegraph-contextInstall the codegraph-context skill in Claude Code (project)
.claude/skills/codegraph-context/SKILL.md
$ npx degit PIXARTSeu/Synapse/.agents/skills/codegraph-context .claude/skills/codegraph-contextInstall the codegraph-context skill in Codex
~/.agents/skills/codegraph-context/SKILL.md
$ npx degit PIXARTSeu/Synapse/.agents/skills/codegraph-context ~/.agents/skills/codegraph-contextInstall the codegraph-context skill in Gemini CLI
~/.gemini/skills/codegraph-context/SKILL.md
$ npx degit PIXARTSeu/Synapse/.agents/skills/codegraph-context ~/.gemini/skills/codegraph-contextInstall the codegraph-context skill in Claude.ai
npx degit PIXARTSeu/Synapse/.agents/skills/codegraph-context codegraph-context && zip -r codegraph-context.zip codegraph-context # claude.ai → Customize → Skills → + → Create skill → Upload a skill → codegraph-context.zip
SKILL.md
View on GitHubCodeGraph Context — Carica il cervello prima di lavorare
Perché questa skill esiste
Lavorare su codice senza il grafo CodeGraph è come operare bendati. Lavorare senza Memory Graph è come avere amnesia tra una sessione e l'altra.
Con il Cortex attivo posso:
- Sapere esattamente quali funzioni dipendono da quella che sto toccando
- Ricordare bug, pattern, e decisioni da sessioni precedenti
- Vedere cosa è successo nelle altre sessioni Claude Code
- Fare impact analysis prima di modificare
Senza il Cortex: indovino. Con il Cortex: so.
Il Protocollo (eseguire sempre in ordine)
Step 1 — Registra inizio sessione
session_start({
sessionName: "MASTER_Fullstack",
project: "{nome progetto corrente}",
workspacePath: "{percorso workspace}",
repo: "skillbrain"
})
Step 2 — Carica il Cortex (5-layer briefing)
bash "/Users/dan/Desktop/progetti-web/MASTER_Fullstack session/.opencode/scripts/load_project_context.sh"
Questo genera:
- Layer 1: Identity — stack versions (Next.js, TS, Payload)
- Layer 2: Event Log — ultimi commit, file modificati, branch
- Layer 3: Cross-Session — cosa è successo nelle altre sessioni
- Layer 4: Project Status — Memory Graph stats, contradictions
- Layer 5: Knowledge Synthesis — top 5 memorie per confidence
Step 3 — Identifica e indicizza il progetto target
node packages/codegraph/dist/cli.js list
Repo già indicizzato? → Verifica freshness:
node packages/codegraph/dist/cli.js status /percorso/progetto
Repo NON indicizzato? → Indicizza:
node packages/codegraph/dist/cli.js analyze /percorso/progetto
# o per non-git:
node packages/codegraph/dist/cli.js analyze /percorso --skip-git
Step 4 — Carica contesto CodeGraph
codegraph_query(
query: "main entry point architecture overview",
repo: "nome-repo",
limit: 5
)
Step 5 — Carica memorie rilevanti per il task
memory_load({
project: "{nome progetto}",
activeSkills: ["next-best-practices", "systematic-debugging", ...],
limit: 15,
repo: "skillbrain"
})
Se il task ha un focus specifico, aggiungi una ricerca mirata:
memory_search({
query: "{descrizione del task}",
limit: 5,
repo: "skillbrain"
})
Step 6 — Controlla history cross-session
session_history({
limit: 3,
repo: "skillbrain"
})
Step 7 — Conferma e procedi
✅ Cortex caricato per [nome-repo]
📊 NNN nodi | NNN relazioni | NN flussi
🧠 NN memorie caricate (top confidence: N)
📋 Ultime N sessioni: [riassunto]
🕐 Indice aggiornato al: [data]
Pronto a lavorare con piena consapevolezza.
Quando RE-indicizzare durante il lavoro
| Situazione | Azione |
|---|---|
| Hai aggiunto nuovi file | Re-indicizza |
| Hai spostato/rinominato file | Re-indicizza |
| Hai modificato molte funzioni (5+) | Re-indicizza |
| L'impact analysis dà risultati strani | Re-indicizza |
| Hai fatto un refactor strutturale | Re-indicizza |
| Stai modificando solo 1-2 funzioni | Non serve |
A fine sessione
OBBLIGATORIO: Invoca post-session-review che:
- Auto-cattura memorie dalla sessione
- Applica decay al Memory Graph
- Registra la fine sessione con
session_end
Integrazione con altre skills
- Prima di
systematic-debugging→ carica il grafo per tracciare il root cause - Prima di
writing-plans→ carica il grafo per un piano accurato - Durante
subagent-driven-development→ ogni subagent deve avere il nome del repo - Prima di qualsiasi refactoring → usa
codegraph_impactper il blast radius
Files in this skill
2codegraph-context skill questions
How do I install the codegraph-context skill in Claude Code?
Run npx degit PIXARTSeu/Synapse/.agents/skills/codegraph-context ~/.claude/skills/codegraph-context. Claude Code loads skills from ~/.claude/skills (all projects) or .claude/skills (one project) and uses a skill when its description matches the task.
Which clients can use the codegraph-context skill?
Any client that reads the Agent Skills format: Claude Code, Codex, Gemini CLI and claude.ai (upload as a ZIP). Scripts in the skill run only where the client allows code execution.