Knowledge Graph Skill: Turn Your Vault into an AI Second Brain


The InfraNodus skill can turn an Obsidian vault, a whole notes folder, any collection of documents — or an external knowledge base your agent reaches via MCP, such as Notion — into a persistent, queryable knowledge graph. This page describes that part of the skill specifically: how to build a knowledge graph from your AI second brain, keep it updated as your material grows, and use it to generate responses that are grounded in your own knowledge rather than the model's training data.

Invoked inside your vault ("graph this vault", "analyze this folder", or /infranodus), the skill mines your markdown notes, PDF text, and document structure into saved knowledge graphs on your InfraNodus account — and from then on your AI agent answers questions about the vault's themes, connections, and gaps by querying those graphs first, before reading any files.

Not just one note — the whole vault. The skill graphs every note in a folder or vault (markdown, text, the text of your PDFs) together with the [[wikilinks]] you already made, or just one folder, one topic, or one document if you prefer to start small. If your agent is connected to Notion, Google Drive, or another knowledge base via its own MCP server, it can pull those pages and upload them into the same kind of graph.

Choose the depth: full ingestion of everything as written, a structure map of what links to what, a digest the agent writes about how your ideas fit together (with structural feedback on what is missing), or an ontology of entities and relations — see the scopes and build modes below.

Get Started

1
Create an Account

Sign up for a free InfraNodus account to get access to the knowledge graph tools and your API key.

Create a Free Account
2
Get InfraNodus MCP
https://mcp.infranodus.com

Add this URL as a connector via Settings > Connectors in Claude Web / Desktop and authenticate with your InfraNodus API key via OAuth.

3
Install the Skill
/plugin marketplace add infranodus/skills
/plugin install infranodus@infranodus-skills

Run these two commands in the Claude Code prompt to install the skill as a plugin (use infranodus-all@infranodus-skills to install all our skills at once). Or use npx in your terminal:

npx skills add infranodus/skills --skill infranodus -g -a claude-code -y

npx comes bundled with Node.js. For ChatGPT and OpenClaw, see the full installation instructions.

Didn't work? You can simply download infranodus.zip from our GitHub repository and add it to your LLM client manually — see the step-by-step instructions.

Why Your Second Brain Needs a Knowledge Graph

By default, an AI reading your knowledge base uses RAG vector search: it embeds your query, retrieves the chunks that look most similar, and answers from those. This works well for lookup ("what did I write about prompt caching?") and badly for the questions a second brain is actually for: "what is missing from this knowledge base?", "what other ideas could I link to this one?". Insights are rarely located in the chunk most similar to the question — they sit in the relations between distant parts of your material, across paths that similarity search does not rank highly.

A knowledge graph fixes this: concepts become nodes, their relations become edges, topics become clusters, and the sparse regions between the clusters become visible as the gaps in what you have collected. The model gets a structural view of your material it can traverse (GraphRAG), and you get to see the same view it is working from — so you can observe and steer what the AI retrieves instead of trusting an opaque retrieval harness. See AI second brain and AI knowledge base for the full reasoning behind this architecture.

What the Skill Does for Your Vault

Run inside a vault or notes folder, the skill executes a three-step pipeline:

  1. Extract — a deterministic script mines the folder: markdown notes, text from PDFs, document structure, and [[wikilinks]] connections you already made.
  2. Upload — the extracted statements are uploaded as scoped knowledge graphs to your InfraNodus account, where you can also explore them visually, see the topical clusters, and find the structural gaps.
  3. Report — the skill writes an infranodus/manifest.json routing file into your vault and appends a dated section to an INFRANODUS_REPORT.md log with the main topics, gaps, and ideas for developing the material further.

From then on, the vault is graph-aware: whenever the manifest exists, questions like "what are the main themes in this vault?", "what's underdeveloped here?", or "how do these two ideas connect?" are answered by querying the saved graphs first, which is faster and more structural than re-reading the files each time.

Launched without a target, the skill inventories the vault and asks what to build and how deep — the scopes and build modes are described in the next section. Start with one folder — if it proves useful, widen it.

Choose What to Graph and How: Scopes & Build Modes

The skill first asks what to graph, then how. The what can be the whole vault, a specific folder, only the notes containing certain terms (e.g. everything mentioning "trading"), or a single document. Filtered scopes get their own graphs, so a full vault graph and a topic-specific one can coexist in the same manifest. The same applies to an external source: pages pulled from Notion or Google Drive through your agent's connector become their own graph.

The how is the build mode. Several can be selected at once, and each answers a different kind of question about your knowledge base:

Build mode What it builds What it's good for
Full ingestion
recommended for small and medium corpora, no LLM
Everything the scan covers, as it is literally written: every note and document (plus the [[wikilinks]] link structure in a vault; docs, code rationale, and git / PR / issue history in a repo), one graph per scope. Many uploads, fully deterministic. "What does my knowledge base say about X?" — GraphRAG retrieval grounded in your own text, topical clusters, and the content gaps between them.
Structure map
a few uploads, no LLM — the default for a big repo
A condensed structural map instead of the full text: in a repo the directory tree, file → imports and dependencies, exported symbols, the first docstring line per file, and package manifests; in a vault, the map of which page links to which. "How is this organised? What depends on what? Which notes are hubs and which are orphans?"
Digest + structural feedback
costs the agent's reading tokens, no server LLM
The agent reads the target and writes a digest in its own words — one simple statement per line with [[wikilinks]] on how things work: principles, rules, procedures, hand-offs, main ideas, gaps. It is uploaded as an authored scope you can read and edit, and then optimize_knowledge_base is run on it to tell you what dominates, what is under-developed, and which clusters never connect. Reviewing and improving a project or a knowledge base: "How is this supposed to work? Is it coherent? What does it say one must do — and what is never connected to anything?"
Ontology
costs server LLM tokens, lossy by design; needs a full or structure graph first
The InfraNodus server distils entities and typed relations ([[A]] dependsOn [[B]]) from an already-uploaded graph — the structure map for a codebase, the docs scope otherwise — into a compact onto-<project> graph. Navigating: "How do the parts fit together? How does X connect to Y?"

Which to pick? For a second brain, start with full ingestion of one folder: it needs no LLM, and it gives you the topical clusters and the gaps between them. Add a digest when you want feedback on your own thinking: the agent reads your notes and writes down, one statement per line, the principles and ideas it finds — and optimize_knowledge_base then tells you which of them dominate, which are under-developed, and which clusters of your thinking never touch. The structure map (the link map of a vault) is the cheap option for very large vaults or when you care about hubs and orphan notes, and the ontology is the layer to add when you want to navigate "how does X relate to Y" across the vault.

Graph an External Knowledge Base (Notion, Google Drive, and Others)

Your second brain does not have to live in a local folder. If your AI agent is connected to an external knowledge base through its own MCP server — Notion, Google Drive, Confluence, a wiki, a CRM — the skill can build the same kind of graph from it. The deterministic scanner only reads local files, so in this case the agent does the reading: it fetches the pages through that connector and uploads them as statements to a named InfraNodus graph using the skill's upload contract (one graph per source, heading-aware chunks, paced calls with rate-limit backoff). For example:

Pull all the pages from my Notion "Research" database and build an InfraNodus
									knowledge graph called research-notion from them. Then tell me the main topics
									and the gaps between them.

Once the graph exists on your InfraNodus account, everything below applies to it too: GraphRAG retrieval, gap analysis, research questions, and comparison with the graphs built from your local vault (e.g. "what is in my Notion research that never made it into my Obsidian notes?" via difference_between_texts). You can also open the graph in the InfraNodus app to explore it visually.

Build the Graph from Your Vault in 8 Steps

None of these require programming:

  1. Install the InfraNodus skill and connect the InfraNodus MCP server to your Claude (you'll need an API key from your free InfraNodus account).
  2. Open your vault in Cursor or VSCode.
  3. Open a terminal inside it.
  4. Launch Claude Code with claude.
  5. Type /infranodus.
  6. Answer the questionnaire — start by analyzing one folder rather than the whole vault.
  7. The skill writes the infranodus/ folder with the manifest and a report with the topics, gaps, and ideas for developing the material further.
  8. Because the MCP server is connected, the graph analysis and retrieval tools are now available to the model directly.

Here is a video walkthrough of the whole process:



If you keep your notes in Obsidian and want the graph view alongside the vault itself, add the InfraNodus Obsidian plugin — or the VSCode / Cursor extension for the same graph view inside the IDE.

A Knowledge Graph That Updates

The graph is not built once. When you run /infranodus again after adding or editing notes, the skill detects which files changed since the last build (it keeps a hash per file in the manifest) and offers to update only those: the old statements of a modified note are removed from the graph and the new ones appended in place, new notes are added, deleted notes are removed, and notes that only moved are relabelled without being re-extracted. You can also rebuild a single scope in place, add a new scope, or do a full rebuild when you want a clean start.

A digest is treated as your own text: to correct a line or rename a concept across it, the skill edits the statements in place (update_statements) instead of rebuilding the graph.

Each uploaded graph records its provenance — endpoint, account, and the date it was verified — in the local manifest, so the skill always knows which server and account a graph lives on. Adding material changes the graph, which changes which gaps are open, which changes what is worth asking next: your second brain becomes a feedback loop rather than an archive.

Ask Questions, Get Responses Grounded in Your Knowledge

Once the graph exists, the skill routes your questions to the right retrieval tool automatically:

What you ask What the skill uses
"What does my knowledge base say about X?" retrieve_from_knowledge_base — GraphRAG retrieval over the saved graph, grounded in your own material
"What would my knowledge base advise here?" generate_responses_from_graph — answers and expert advice generated from the graph in its own voice
"What is this vault about?" generate_contextual_hint, analyze_existing_graph_by_name — structural overview of a saved graph
"What am I missing?" generate_content_gapsgenerate_research_questions / generate_research_ideas — under-connected clusters turned into questions worth asking
"Is my thinking on this coherent? What is under-developed?" optimize_knowledge_base on the digest graph — what dominates, what is thin, which clusters never connect
"How does X relate to Y across the vault?" generate_ontology_graph / retrieve_from_knowledge_base on the ontology layer — typed relations between the entities
"Remember this for later" memory_add_relations / memory_get_relations — structured memory saved as graph relations

The model consults the structure first, then goes to the files — so the answers stop being summaries of the nearest paragraph and start connecting the distant parts of your material. The gap analysis does the hard part: it identifies which question is worth asking, out of material that is already there.

Related Tools & Approaches

  • InfraNodus skill — the full skill this workflow is part of: text network analysis, SEO, comparison, and repo graphs.
  • LLM Wiki skill — when you want the model to write an interlinked knowledge base on top of your sources; this skill maps what exists, llm-wiki authors new knowledge, and both share the same manifest.
  • AI Second Brain and AI Knowledge Base — the architecture behind this workflow: storage, semantic layer, query.
  • Knowledge graphs for PKM — if you keep notes in Obsidian, Roam, or Logseq and want to start from the graph side instead.