agentleFS
butchokoy25butchokoy25/lightrag-claude-skills/skills/rag-sync/SKILL.md

rag-sync

Skill2 starsChanged 7 months agoMITView on GitHub

End-of-session review and sync of learnings to the personal LightRAG knowledge graph

  • Reads credentials
  • Installs packages
  • Sends data out

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    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:

    Wait for user confirmation before inserting.

    line 60
  2. Distinctive:

    Only store things that would save 5+ minutes in a future session.

    line 93

≈ “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 Sync — End-of-Session Personal Memory Sync

Review what happened this session and push non-obvious learnings to your personal LightRAG knowledge graph. Run before ending a productive session.

Workflow

Step 1: Review the session

Scan the conversation for items worth persisting. Look for:

  • Decisions — architecture choices, tool selections, approach changes
  • User corrections — "don't do X", "always do Y", preference changes
  • Config changes — new env vars, port changes, server settings
  • Project updates — status changes, new goals, deadline shifts
  • Debugging insights — root causes found, non-obvious fixes
  • New relationships — connections between systems, people, or projects

Step 2: Filter ruthlessly

Remove anything that:

  • Is already in the codebase (code, comments, configs)
  • Is in git history (commits, diffs, blame)
  • Was already stored via /rag-remember this session
  • Is ephemeral (task progress, temp files, current branch state)
  • Is a duplicate of something already in the knowledge graph

Step 3: Format entries

Format each item using the /rag-remember format:

[TYPE] Title — YYYY-MM-DD

What: ...
Why: ...
Files: ... (if applicable)

Step 4: Confirm with user

Present the list of items to store. Example:

Ready to sync 3 items to personal memory:

  1. [DECISION] Switched auth from JWT to session tokens — 2026-04-01
  2. [FEEDBACK] User prefers single bundled PRs for refactors
  3. [CONFIG] LightRAG project instance moved to port 9625

Proceed? (y/n)

Wait for user confirmation before inserting.

Step 5: Insert each item

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 + '/documents/text', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'Authorization': 'Bearer ' + token
    },
    body: JSON.stringify({
      file_source: 'DESCRIPTION_HERE',
      text: 'CONTENT_HERE'
    })
  });
  console.log('Status:', res.status);
})();
"

Step 6: Report

Summarize what was synced:

Synced 3 items to personal LightRAG.

Quality bar

Only store things that would save 5+ minutes in a future session.

Good examples:

  • "The user's Mac Mini SSH requires BindAddress because Tailscale hijacks outbound sockets"
  • "User prefers integration tests over mocked tests after a prod migration incident"

Bad examples:

  • "Ran npm install successfully"
  • "Fixed a typo in line 42 of app.js"
  • "The build passed"

Infrastructure

  • Server: YOUR_LIGHTRAG_HOST:YOUR_PERSONAL_PORT
  • Auth: Bearer token from /auth-status (guest/disabled mode)
  • Env var: LIGHTRAG_SERVER_URL

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.