Rag query
Query the personal LightRAG knowledge graph for persistent memory across sessionsFrom its SKILL.md
npx -y skills add butchokoy25/lightrag-claude-skills --skill rag-queryAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
4 things to look at
- reads credentialsReads from 1 credential source: `LIGHTRAG_SERVER_URL`.
- 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
- runs commandsInstructs the agent to run 2 commands, including `node -e "const BASE = process.env.LIGHTRAG_SERVER_URL || 'http://YOUR_LIGHTRAG_HOST:YOUR_PERSONAL_PORT';\n(async () => {\n const auth = await fetch(BASE + '/auth-status').then(r => r.json());\n cons` and 1 more.
- fetches URLsInstructs the agent to fetch 2 URLs, including BASE + '/auth-status' and 1 more.
SKILL.md
2.6 KB, 623 tokens by cl100k_base, as published. Nobody here has run it
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
When presenting results to the user:
- Be concise — summarize, don't dump raw JSON
- Cite the source type when relevant (e.g., "from a stored decision on 2026-03-15")
- Flag potentially stale information (anything >30 days old)
- If no results found, say so clearly — don't fabricate
Infrastructure
- Server:
YOUR_LIGHTRAG_HOST:YOUR_PERSONAL_PORT - Auth: Bearer token from
/auth-status(guest/disabled mode) - Env var:
LIGHTRAG_SERVER_URL
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.