rag-sync

rag-sync is a skill for Claude Code from zhaixin244-wq/fnw. It costs 20 tokens per session (786 once invoked), scanned A, original, MIT.

An end-of-session process for reviewing useful decisions, corrections, configuration changes, and debugging lessons, then syncing non-obvious learnings to a personal LightRAG knowledge graph.

In plain words
What is it for?
Use it before ending a productive session to filter and format memories for LightRAG storage.
Why use it?
It preserves durable lessons without storing temporary progress, duplicates, or information already present elsewhere.

Skill for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter.

Good fit Use it before ending a productive session to filter and format memories for LightRAG storage.

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

Made for: Claude Code.

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-sync

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/zhaixin244-wq/fnw/rag-sync"><img src="https://agentmods.dev/badge/skills/zhaixin244-wq/fnw/rag-sync.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 20 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 786 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.00020 $0.00786
Opus 5 $0.00010 $0.00393
Sonnet 5 $0.00004 $0.00157
Haiku 4.5 $0.00002 $0.00079

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

Security

Grade A, and why

rag-sync 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 8d 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());
Origin

Copies of this mod

1 near-identical copy found in the catalogue:

  • rag-sync — 100% identical, 0 lines differ
.claude/skills/rag-sync/SKILL.md · 109 lines

How it starts

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

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);
})();
"

Read the full file on GitHub · 109 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. 8d ago First seen · 109 lines · 20 tokens per session scan A 25e90cae21ed

Subscribe to this mod's changes

rag-sync is a skill published in the GitHub repository zhaixin244-wq/fnw (29 stars, last pushed 3mo ago), licensed MIT. It adds 20 tokens to every session and 786 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-09-03.

Related

Other skills, from other repositories

pinecone-research

Agent RAG and long-term memory with Pinecone.

NousResearch/hermes-agent · 16 tokens

langchain

Framework for building LLM-powered applications with agents, chains, and RAG. Supports multiple providers (OpenAI, Anthropic, Google), 500+ integrations, ReAct agents, tool calling, memory management, and vector store retrieval. Use for building chatbots, question-answering systems, autonomous agents, or RAG…

davila7/claude-code-templates · 79 tokens

llm-wiki

The foundational knowledge distillation pattern for building and maintaining an AI-powered Obsidian wiki. Based on Andrej Karpathy's LLM Wiki architecture. Use this skill whenever the user wants to understand the wiki pattern, set up a new knowledge base, or needs guidance on the three-layer architecture (raw sources…

Ar9av/obsidian-wiki · 113 tokens

browserwing-admin

Manage and operate BrowserWing — an intelligent browser automation platform. Install dependencies, configure LLM, create/manage/execute automation scripts, use AI-driven exploration to generate scripts, browse the script marketplace, and troubleshoot issues.

MemTensor/MemOS · 47 tokens

mem0-integration

Mem0 memory layer integration for AI agents. Implement persistent, semantic memory for long-term context retention and personalization.

a5c-ai/babysitter · 27 tokens

install-openviking-memory

Install and configure the OpenViking long-term memory plugin for OpenClaw via natural conversation. Once installed, the plugin automatically captures facts from chats and recalls relevant context before each reply (auto-capture + auto-recall, cross-session). Covers prerequisites, install through OpenClaw's plugin…

volcengine/OpenViking · 191 tokens