agentleFS
butchokoy25butchokoy25/lightrag-claude-skills/skills/rag-project-query/skill.md

rag-project-query

Skill2 starsChanged 7 months agoMITView on GitHub

Query the project-level LightRAG knowledge graph for project-specific context and decisions

  • Reads credentials
  • Sends data out

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If no results, say so — don't fabricate

    line 83

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
skill.md

RAG Project Query — Project Knowledge Graph

Query the project-level LightRAG knowledge graph for architecture decisions, conventions, dependencies, and project-specific context.

Query Modes

ModeWhen to useWhat it does
hybrid (default)Most queriesCombines local entity relationships + global topic summaries
local"What's related to X in this project?"Traverses entity relationships from specific nodes
global"What are the project conventions?"Summarizes across all project documents
naiveSimple keyword lookupBasic text search, fastest but least intelligent

How to query

Full query

node -e "
const BASE = 'http://YOUR_LIGHTRAG_HOST:YOUR_PROJECT_PORT';
const API_KEY = process.env.LIGHTRAG_API_KEY || 'YOUR_API_KEY';
(async () => {
  const res = await fetch(BASE + '/query', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'X-API-Key': API_KEY
    },
    body: JSON.stringify({
      query: 'QUERY_HERE',
      mode: 'hybrid'
    })
  });
  const data = await res.json();
  console.log(JSON.stringify(data, null, 2));
})();
"

Context-only query

node -e "
const BASE = 'http://YOUR_LIGHTRAG_HOST:YOUR_PROJECT_PORT';
const API_KEY = process.env.LIGHTRAG_API_KEY || 'YOUR_API_KEY';
(async () => {
  const res = await fetch(BASE + '/query', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'X-API-Key': API_KEY
    },
    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:

  • Distinguish project memory from personal memory — prefix with "Project context:" when relevant
  • Be concise — summarize, don't dump raw JSON
  • Cite the source type (e.g., "from an architecture decision stored on 2026-03-20")
  • Flag stale info (>30 days old)
  • If no results, say so — don't fabricate

Infrastructure

  • Server: YOUR_LIGHTRAG_HOST:YOUR_PROJECT_PORT
  • Auth: X-API-Key header (auth-enabled mode)
  • Env var: LIGHTRAG_API_KEY
  • Workspace: Project-specific (separate from personal graph)

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.