graph-rag-knowledge-expert

graph-rag-knowledge-expert is a skill for Claude Code, Codex from roedyrustam/vibes-plug. It costs 62 tokens per session (2,018 once invoked), scanned A, original, MIT.

A guide to combining a knowledge graph with vector search to answer questions about connected information. A knowledge graph stores entities and their relationships, while vector search finds text with similar meaning.

In plain words
What is it for?
Use it for multi-step relationship questions, linked enterprise data, global summaries, and knowledge bases containing structured entities and dependencies.
Why use it?
Regular vector search can miss links between several related entities and can struggle with questions about an entire collection of documents. Graph-based retrieval makes those relationships available during search.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it for multi-step relationship questions, linked enterprise data, global summaries, and knowledge bases containing structured entities and dependencies.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/roedyrustam/vibes-plug/graph-rag-knowledge-expert
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.

Any agent
npx skills add roedyrustam/vibes-plug --skill graph-rag-knowledge-expert
Clone the repo
git clone --depth 1 https://github.com/roedyrustam/vibes-plug

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for graph-rag-knowledge-expert

README.md
[![agentmods](https://agentmods.dev/badge/skills/roedyrustam/vibes-plug/graph-rag-knowledge-expert/github.svg)](https://agentmods.dev/skills/roedyrustam/vibes-plug/graph-rag-knowledge-expert)
Your own site
<a href="https://agentmods.dev/skills/roedyrustam/vibes-plug/graph-rag-knowledge-expert"><img src="https://agentmods.dev/badge/skills/roedyrustam/vibes-plug/graph-rag-knowledge-expert/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for graph-rag-knowledge-expert

Your own site · 80×15
<a href="https://agentmods.dev/skills/roedyrustam/vibes-plug/graph-rag-knowledge-expert"><img src="https://agentmods.dev/badge/skills/roedyrustam/vibes-plug/graph-rag-knowledge-expert.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 62 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,018 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00062 $0.02018
Opus 5 $0.00031 $0.01009
Sonnet 5 $0.00012 $0.00404
Haiku 4.5 $0.00006 $0.00202

Measured today against content hash 432d9704cdeb, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

graph-rag-knowledge-expert 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 today.

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/graph-rag-knowledge-expert/SKILL.md · 201 lines

How it starts

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

GraphRAG & Knowledge Graph Expert (2026 Edition)

English | Bahasa Indonesia


English

Description

Expert guide for implementing Knowledge Graph-augmented Retrieval (GraphRAG), solving the fatal weaknesses of vector search: multi-hop reasoning, relationship discovery, and global corpus understanding. Covers Microsoft GraphRAG, Neo4j Text2Cypher, FalkorDB, and hybrid Vector + Graph retrieval pipelines.

Trigger Conditions

  • Complex multi-hop queries where entities are linked through multiple intermediate nodes.
  • High hallucination rate using standard vector RAG on interconnected data.
  • Global corpus queries requiring domain-wide thematic summarization across thousands of documents.
  • Enterprise knowledge bases containing explicitly structured relational entities (e.g., organizations, code dependencies, regulatory rules).

Capability Pure Vector Search (RAG) GraphRAG (Graph + Vector)
Direct Similarity ("What is X?") 🟢 Fast, accurate 🟢 High accuracy
Multi-Hop Traversal ("How does X affect Z via Y?") 🔴 Blind (returns fragmented chunks) 🟢 Explores interconnected graph edges
Global Corpus Query ("What are the main themes across all documents?") 🔴 Fails (limited to Top-K chunks) 🟢 Hierarchical Community Summaries
Hallucination Rate on Complex Queries 🔴 Moderate to High (context stitching) 🟢 Grounded in explicit knowledge edges

2. Production Recipe: Text2Cypher Knowledge Graph Querying (TypeScript)

Using Neo4j with deterministic schema introspection, preventing arbitrary syntax hallucinations.

// text2cypher.ts - Safe Neo4j Query Generation & Execution
import neo4j, { Driver } from 'neo4j-driver';
import { generateText } from 'ai';
import { openai } from '@ai-sdk/openai';

export class GraphRAGService {
  private driver: Driver;

  constructor(uri: string, user: string, pass: string) {
    this.driver = neo4j.driver(uri, neo4j.auth.basic(user, pass));
  }

  // 1. Fetch live Graph Schema to ground the LLM
  private async getGraphSchema(): Promise<string> {
    const session = this.driver.session();
    try {
      const result = await session.run(`
        CALL apoc.meta.schema() YIELD value
        RETURN value
      `);
      return JSON.stringify(result.records[0]?.get('value') || {});
    } finally {
      await session.close();
    }
  }

  // 2. Synthesize strict read-only Cypher query
  public async queryGraph(userQuestion: string): Promise<any[]> {
    const schema = await this.getGraphSchema();

    const { text: cypherQuery } = await generateText({
      model: openai('gpt-4o-mini'),
      system: `
        You are an expert Neo4j Cypher generator.
        Generate ONLY valid, read-only CYPHER queries based on this schema:
        ${schema}

        Rules:
        - Never generate CREATE, MERGE, DELETE, or SET statements.
        - Always use parameterization where appropriate.
        - Output ONLY the raw Cypher query, without markdown or backticks.
      `,
      prompt: `Translate this question into Cypher: ${userQuestion}`,
    });

    const sanitizedCypher = cypherQuery.trim().replace(/^```cypher|```$/g, '');

    // 3. Execute with read-only transaction
    const session = this.driver.session({ defaultAccessMode: neo4j.session.READ });
    try {
      const res = await session.run(sanitizedCypher);
      return res.records.map((r) => r.toObject());
    } finally {
      await session.close();
    }
  }

  public async close(): Promise<void> {
    await this.driver.close();
  }
}

Read the full file on GitHub · 201 lines

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. today First seen · 201 lines · 62 tokens per session scan A 432d9704cdeb

Subscribe to this mod's changes

graph-rag-knowledge-expert is a skill published in the GitHub repository roedyrustam/vibes-plug (53 stars, last pushed today), licensed MIT. It adds 62 tokens to every session and 2,018 once invoked, about $0.0003 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-09-12.

Related

Other skills, from other repositories

rag-and-memory

Patterns for Retrieval-Augmented Generation (RAG) and agent memory systems. Retrieves only relevant context, prevents context bloat, and maintains coherent state across sessions.

DevelopersGlobal/ai-agent-skills · 36 tokens

ai-product

Every product will be AI-powered. The question is whether you'll build it right or ship a demo that falls apart in production. This skill covers LLM integration patterns, RAG architecture, prompt engineering that scales, AI UX that users trust, and cost optimization that doesn't bankrupt you. Use when "keywords…

omer-metin/skills-for-antigravity · 74 tokens

document-ai

Comprehensive patterns for AI-powered document understanding including PDF parsing, OCR, invoice/receipt extraction, table extraction, multimodal RAG with vision models, and structured data output. Use when "document parsing, PDF extraction, OCR, invoice processing, receipt extraction, document understanding…

omer-metin/skills-for-antigravity · 79 tokens

ai-llm-application

Group skill: AI/LLM application — provider selection, app patterns, RAG, agents, prompts, evaluation, safety, and monitoring.

may215/antigravity-awesome-group-skills · 36 tokens

ai-ml

AI and machine learning workflow covering LLM application development, RAG implementation, agent architecture, ML pipelines, and AI-powered features.

sickn33/agentic-awesome-skills · 30 tokens

arrowspace

Spectral vector search using graph Laplacian eigenstructure. Use when cosine/L2 similarity misses latent structure in your embeddings.

sickn33/agentic-awesome-skills · 28 tokens