Logo di Graph Augmented Context

Graph Augmented Context

Organizzazione
UitbreidenOS
graph-augmented-context

Claude Code Graph-Augmented Context (GAC): local SQLite codebase knowledge graph builder. Maps files, classes, functions, and import/dependency edges for advanced codebase RAG and contextual navigation

Panoramica

Pubblicato daUitbreidenOS
RepositoryUitKit
Nome della skillgraph-augmented-context
Stelle
14
Fork
5
File inclusi
Solo istruzioni
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • Tutto nelle istruzioni

    Tutto ciò che serve al modello è nelle istruzioni: nessun file aggiuntivo da sincronizzare.

  • Open source

    Pubblicata da UitbreidenOS su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Graph Augmented Context in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/UitbreidenOS/UitKit/tree/main/plugins/uitkit-ai-engineering/skills/graph-augmented-context
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Aggiungi skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella della skill nella directory delle skill di quell'agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/UitbreidenOS/UitKit.git /tmp/UitKit
mkdir -p .claude/skills
cp -r /tmp/UitKit/plugins/uitkit-ai-engineering/skills/graph-augmented-context .claude/skills/graph-augmented-context
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Graph Augmented Context in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente Graph Augmented Context non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi Graph Augmented Context non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello seguirà.

Graph-Augmented Context (GAC) — Knowledge Graph Repository Mapping

When to activate

  • Analyzing large or legacy codebases with complex file structures and deep directory hierarchies.
  • Mapping code dependencies, class hierarchies, import structures, or shared utilities.
  • Troubleshooting circular dependency warnings or tracking down side effects of a proposed signature change.
  • Onboarding to an unfamiliar codebase and building a mental model of how components interlock.

When NOT to use

  • Small, single-file projects or simple scripts with zero external or cross-file dependencies.
  • Static content repositories (e.g. pure markdown documentation directories).
  • Non-code directories containing only assets or media.

Instructions

Graph-Augmented Context maps the repository as a structured directed graph using a local SQLite database (.claude/gac.db). This allows Claude to execute semantic code path tracing, complex relation filtering, and downstream impact analysis.

       ┌───────────────┐
       │   File Node   │
       └───────┬───────┘
               │ DEFINES
               ▼
       ┌───────────────┐  INHERITS  ┌───────────────┐
       │  Class Node   ├───────────►│ Parent Class  │
       └───────┬───────┘            └───────────────┘
               │ DEFINES
               ▼
       ┌───────────────┐    CALLS   ┌───────────────┐
       │ Function Node ├───────────►│ Other Function│
       └───────────────┘            └───────────────┘

1. SQLite Database Schema

Construct a local graph database at .claude/gac.db with the following structure:

sql
-- Schema for .claude/gac.db

CREATE TABLE IF NOT EXISTS nodes (
  id TEXT PRIMARY KEY,          -- Fully qualified identifier (e.g., 'src/utils/auth.ts:generateToken')
  name TEXT NOT NULL,           -- Base name of the symbol (e.g., 'generateToken')
  type TEXT NOT NULL,           -- 'FILE', 'CLASS', 'INTERFACE', 'FUNCTION', 'VARIABLE'
  filepath TEXT NOT NULL,       -- Relative file path (e.g., 'src/utils/auth.ts')
  line_number INTEGER,          -- Declaration line number (1-indexed)
  docstring TEXT                -- Extracted docstring, description, or parameter signature
);

CREATE TABLE IF NOT EXISTS edges (
  source TEXT,                  -- Node ID (origin of relationship)
  target TEXT,                  -- Node ID (destination of relationship)
  relationship_type TEXT,       -- 'IMPORTS', 'DEFINES', 'INHERITS', 'CALLS', 'IMPLEMENTS'
  PRIMARY KEY (source, target, relationship_type),
  FOREIGN KEY (source) REFERENCES nodes(id) ON DELETE CASCADE,
  FOREIGN KEY (target) REFERENCES nodes(id) ON DELETE CASCADE
);

CREATE INDEX IF NOT EXISTS idx_nodes_type ON nodes(type);
CREATE INDEX IF NOT EXISTS idx_nodes_filepath ON nodes(filepath);
CREATE INDEX IF NOT EXISTS idx_edges_relationship ON edges(relationship_type);

2. Node & Edge Extraction Workflow

For the codebase languages, scan files and insert entities using parser tools or helper shell scripts:

  • Files: Create a node for every code file.
  • Imports: Parse import declarations to create IMPORTS edges between files.
  • Definitions: Identify classes, interfaces, and functions, inserting them as nodes and linking them to their host file using DEFINES edges.
  • Calls: Parse function call sites to link the caller function to the callee function using CALLS edges.
  • Inheritance: Link classes inheriting from parents or implementing interfaces via INHERITS or IMPLEMENTS edges.

3. Traversal Patterns (Context Enrichment Queries)

Run these queries to gather context before editing:

A. Downstream Impact ("Blast Radius")

Determine what will break if a function's signature is changed:

sql
SELECT n.filepath, n.name, n.type, n.line_number 
FROM nodes n
JOIN edges e ON n.id = e.source
WHERE e.target = 'src/services/db.ts:queryUser'
  AND e.relationship_type = 'CALLS';
B. Complete Component Call-Graph

Trace execution pathways for debugging:

sql
WITH RECURSIVE call_path(source, target, depth) AS (
  SELECT source, target, 1 FROM edges WHERE source = 'src/routes/users.ts:getUserHandler' AND relationship_type = 'CALLS'
  UNION ALL
  SELECT e.source, e.target, cp.depth + 1
  FROM edges e
  JOIN call_path cp ON e.source = cp.target
  WHERE e.relationship_type = 'CALLS' AND cp.depth < 5
)
SELECT cp.depth, n_src.name AS caller, n_tgt.name AS callee, n_tgt.filepath
FROM call_path cp
JOIN nodes n_src ON cp.source = n_src.id
JOIN nodes n_tgt ON cp.target = n_tgt.id
ORDER BY cp.depth;
C. Find Orphan/Dead Code

Locate nodes defined but never imported or called:

sql
SELECT id, name, filepath 
FROM nodes 
WHERE type IN ('FUNCTION', 'CLASS')
  AND id NOT IN (SELECT DISTINCT target FROM edges WHERE relationship_type IN ('CALLS', 'IMPORTS', 'INHERITS', 'IMPLEMENTS'));

Example

Analyzing a React project's authentication flow using GAC:

bash
# 1. Run the local parser and query the graph
sqlite3 .claude/gac.db "SELECT source, target, relationship_type FROM edges WHERE source LIKE '%useAuth%';"

Results Output:

src/hooks/useAuth.ts | src/contexts/AuthContext.ts | IMPORTS
src/hooks/useAuth.ts:useAuth | src/contexts/AuthContext.ts:AuthContext | CALLS
src/components/Navbar.tsx | src/hooks/useAuth.ts | IMPORTS
src/components/Navbar.tsx:Navbar | src/hooks/useAuth.ts:useAuth | CALLS
src/pages/Dashboard.tsx | src/hooks/useAuth.ts | IMPORTS
src/pages/Dashboard.tsx:Dashboard | src/hooks/useAuth.ts:useAuth | CALLS

Claude Action: Through these outputs, Claude realizes that modifying useAuth affects Navbar and Dashboard. It loads only those two file contexts for verification, saving thousands of input tokens while avoiding breaks in downstream files.

Domande frequenti

Cosa fa la skill IA Graph Augmented Context?

Claude Code Graph-Augmented Context (GAC): local SQLite codebase knowledge graph builder. Maps files, classes, functions, and import/dependency edges for advanced codebase RAG and contextual navigation

Perché usare Graph Augmented Context su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Graph Augmented Context è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che la skill smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo Graph Augmented Context in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/UitbreidenOS/UitKit/tree/main/plugins/uitkit-ai-engineering/skills/graph-augmented-context. TypingMind legge il file SKILL.md e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Graph Augmented Context?

Qualsiasi modello che colleghi a TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con Graph Augmented Context?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con Graph Augmented Context: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA Graph Augmented Context è gratuita?

È pubblicata su GitHub da UitbreidenOS. Consulta il repository per i termini di licenza. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, template o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Elenco completo

Crea subito il tuo spazio di lavoro AI

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇