guild-learn-graph

A deep project analyser that builds a semantic knowledge graph and an onboarding-tour outline from an existing codebase map. A knowledge graph records relationships between project parts, such as files, modules, and layers.

In plain words
What is it for?
Use it to build project structure information for plan-impact analysis, scope checking, onboarding material, and reverse specification work.
Why use it?
It supplies a structured view of how a project is organised when a simple file map is not enough. It is intended for deeper planning and scope checks and requires the earlier codebase map.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/lookatitude/guild/learn-graph
Any agent
npx skills add lookatitude/guild --skill learn-graph
Clone the repo
git clone --depth 1 https://github.com/lookatitude/guild

Made for: Claude Code, Codex.

Per session 188 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,668 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00188 $0.03668
Opus 5 $0.00094 $0.01834
Sonnet 5 $0.00038 $0.00734
Haiku 4.5 $0.00019 $0.00367

Measured 2d ago against content hash 9da7d08925a7, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

guild-learn-graph scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/knowledge/learn-graph/SKILL.md · 232 lines

How it starts

The opening of the file, as written. The whole thing — 232 lines — stays where its author put it; the contents beside it link to each section on GitHub.

When to use it

Use to build the deep semantic KnowledgeGraph + OnboardingTour skeleton + reverse-spec — stages 2–7 of the authoritative 7-stage spec (see scripts/learn/ for the implementation). This is the deep tier of the learn-* family: lazy and ask-before-deep-scan gated, built when the first plan that needs P2 plan-impact or P3 scope-check is created, or on an explicit user/reflection refresh after the staleness classifier reports PARTIAL | ARCHITECTURE | FULL. The cheap-scan foundation (CodebaseMap) comes from guild:learn-map; this skill consumes it.

When not to use it

Not for the cheap-scan map or the shared output table (guild:learn-map owns both). Not for narrating the tour skeleton into the onboarding guide (guild:learn-onboard owns stage-6 narration). Not for the per-run diff (guild:learn-diff) or a single file/module explanation (guild:learn-explain). Not for querying an already-built graph — that is the bounded kg-query retrieval path (wired into guild:context-assemble) / guild:wiki-query. Not required for Init.

Required inputs

  • .guild/indexes/codebase-map.json (guild.codebase_map.v1) from guild:learn-map stage 1.
  • The ask-before-deep-scan consent gate (skip only with an explicit --learn / approved autonomy policy).
  • Frozen contracts bound by pointer only: guild.knowledge_graph.v1 (schema canonical in scripts/learn/lib/schema.ts; do not re-spell field names or version strings). The output-locations table is owned by guild:learn-map (referenced, not re-spelled). OnboardingTour is the 4th artifact (Markdown, no JSON schema) — shape defined in the skill body of guild:learn-onboard.

Output format

  • .guild/indexes/knowledge-graph.jsonguild.knowledge_graph.v1 (the deterministic validate-graph.ts ladder writes the final artifact, stripping the intermediate _merge_report). Includes the dependency-BFS-ordered tour[] skeleton (stage 6) for guild:learn-onboard to narrate.
  • .guild/indexes/knowledge-links.jsonguild.knowledge_links.v1, the append-only learning-loop edge index (stage 5 contributes its initial batch). This is the work/decision-space edge index — not the recall projection (that is knowledge-recall.json, written by guild:learn-knowledge K6, which guild:context-assemble's kg-query step reads for the memory/recall loop, D4). See the authoritative artifact table in guild:learn-map §"Output format" — bound by pointer, never re-described.
  • .guild/spec/<slug>.md — the reverse-spec (stage 7), every claim carrying source_refs + confidence (the Brownfield Evidence Map).
  • .guild/wiki/concepts/* page candidates for named domains/flows (promotion stays with guild:wiki-ingest).

Read the full file on GitHub · 232 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 232 lines · 188 tokens per session scan A 9da7d08925a7

Subscribe to this mod's changes

guild-learn-graph is a skill published in the GitHub repository lookatitude/guild (7 stars, last pushed 2d ago), licensed MIT. It adds 188 tokens to every session and 3,668 once invoked, about $0.0009 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.

obra/superpowers · 37 tokens

auto-perf-optimize

Run agent-driven VS Code performance or memory investigations. Use when asked to launch Code OSS, automate a VS Code scenario, run the Chat memory smoke runner, capture renderer heap snapshots, take workflow screenshots, compare run summaries, or drive a repeatable scenario before heap-snapshot analysis.

microsoft/vscode · 62 tokens

chat-perf

Run chat perf benchmarks and memory leak checks against the local dev build or any published VS Code version. Use when investigating chat rendering regressions, validating perf-sensitive changes to chat UI, or checking for memory leaks in the chat response pipeline.

microsoft/vscode · 51 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens