rag-query

rag-query is a skill for Claude Code, Codex from butchokoy25/lightrag-claude-skills. It costs 16 tokens per session (677 once invoked), scanned A, original, MIT.

A command guide for querying a personal LightRAG knowledge graph, a stored network of related facts and documents, across sessions.

In plain words
What is it for?
Use it to ask broad topic questions, follow connections from a specific item, or perform a simple keyword search.
Why use it?
It helps recover earlier decisions, preferences, project context, and lessons without searching through old conversations manually.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: model in frontmatter.

Good fit Use it to ask broad topic questions, follow connections from a specific item, or perform a simple keyword search.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/butchokoy25/lightrag-claude-skills/rag-query
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 butchokoy25/lightrag-claude-skills --skill rag-query
Clone the repo
git clone --depth 1 https://github.com/butchokoy25/lightrag-claude-skills

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 rag-query

README.md
[![agentmods](https://agentmods.dev/badge/skills/butchokoy25/lightrag-claude-skills/rag-query/github.svg)](https://agentmods.dev/skills/butchokoy25/lightrag-claude-skills/rag-query)
Your own site
<a href="https://agentmods.dev/skills/butchokoy25/lightrag-claude-skills/rag-query"><img src="https://agentmods.dev/badge/skills/butchokoy25/lightrag-claude-skills/rag-query/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 rag-query

Your own site · 80×15
<a href="https://agentmods.dev/skills/butchokoy25/lightrag-claude-skills/rag-query"><img src="https://agentmods.dev/badge/skills/butchokoy25/lightrag-claude-skills/rag-query.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 16 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 677 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00016 $0.00677
Opus 5 $0.00008 $0.00338
Sonnet 5 $0.00003 $0.00135
Haiku 4.5 $0.00002 $0.00068

Measured 11d ago against content hash 4e7cb27869fd, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

rag-query scanned grade A with 1 finding 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 11d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

const auth = await fetch(BASE + '/auth-status').then(r => r.json());
skills/rag-query/SKILL.md · 91 lines

How it starts

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

RAG Query — Personal Knowledge Graph

Query your personal LightRAG knowledge graph to recall decisions, preferences, project context, and learnings from past sessions.

Query Modes

Mode When to use What it does
hybrid (default) Most queries Combines local entity relationships + global topic summaries
local "What's related to X?" Traverses entity relationships from specific nodes
global "What do you know about topic Y?" Summarizes across all documents on a topic
naive Simple keyword lookup Basic text search, fastest but least intelligent

How to query

Full query (returns answer)

node -e "
const BASE = process.env.LIGHTRAG_SERVER_URL || 'http://YOUR_LIGHTRAG_HOST:YOUR_PERSONAL_PORT';
(async () => {
  const auth = await fetch(BASE + '/auth-status').then(r => r.json());
  const token = auth.access_token;
  const res = await fetch(BASE + '/query', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'Authorization': 'Bearer ' + token
    },
    body: JSON.stringify({
      query: 'QUERY_HERE',
      mode: 'hybrid'
    })
  });
  const data = await res.json();
  console.log(JSON.stringify(data, null, 2));
})();
"

Context-only query (returns raw context for Claude to synthesize)

node -e "
const BASE = process.env.LIGHTRAG_SERVER_URL || 'http://YOUR_LIGHTRAG_HOST:YOUR_PERSONAL_PORT';
(async () => {
  const auth = await fetch(BASE + '/auth-status').then(r => r.json());
  const token = auth.access_token;
  const res = await fetch(BASE + '/query', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'Authorization': 'Bearer ' + token
    },
    body: JSON.stringify({
      query: 'QUERY_HERE',
      mode: 'hybrid',
      only_need_context: true
    })
  });
  const data = await res.json();
  console.log(typeof data === 'string' ? data : JSON.stringify(data, null, 2));
})();
"

Response format

Read the full file on GitHub · 91 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. 11d ago First seen · 91 lines · 16 tokens per session scan A 4e7cb27869fd

Subscribe to this mod's changes

rag-query is a skill published in the GitHub repository butchokoy25/lightrag-claude-skills (2 stars, last pushed 5mo ago), licensed MIT. It adds 16 tokens to every session and 677 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). 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

knowledge-gravity-lab

Analyze folders of Markdown/text research notes, Obsidian vaults, paper cards, invention notes, or memory exports as a practical knowledge map. Use when asked to find center topics, noisy or low-signal notes, possible contamination, overgrown topic groups, orphan notes, cleanup actions, or a useful public…

animaresearch/skills · 74 tokens

understand-figma

Analyze a Figma file via the Figma REST API and generate an interactive design knowledge graph (pages, screens, components, component sets, instances, design tokens) with a kind:"design" dashboard.

Egonex-AI/Understand-Anything · 47 tokens

company-brain

Your team's shared, AI-ready knowledge base — people, companies, meetings, SOPs, and decisions structured so Claude can answer questions on your team's behalf. Team-scope sibling to second-brain (which is personal-scope). Seven modes — capture (drop something into the right structured dir), compile (process into wiki…

coreyhaines31/makerskills · 322 tokens

claude-md-updater

Scans the session for lessons and workflows, then proposes scoped CLAUDE.md edits. Use for save this lesson or add to context.

jamditis/claude-skills-journalism · 34 tokens

continuous-learning-construction

Automatically extract patterns, best practices, and reusable knowledge from construction automation sessions to improve future performance.

datadrivenconstruction/DDC_Skills_for_AI_Agents_in_Construction · 24 tokens

autograph

Schema-as-code enforcement for any Obsidian vault. Zero hardcoded domains. Use when creating vault cards, checking vault health, running schema compliance, deduplicating entities, generating MOC indexes, running decay cycles, bootstrapping a vault, fixing wikilinks, finding orphans or backlinks, extracting entities…

smixs/agent-second-brain · 89 tokens