tpierrain/kenjaku/local-mirror
Claude Code and agent skill by tpierrain/kenjaku
- community
Checking that the SKILL.md file is still in the repository.
Declare and refresh a LOCAL MIRROR — a one-way local copy of a chosen zone of an internal tool (Notion today) replicated into this brain's vault as Markdown, so the LOCAL RAG can search and cite it OFFLINE. A mirror is a 'synchronized source' kept locally: copied once, then refreshed on demand. Use when the user wants to mirror / replicate / copy a Notion zone locally, declare / set up / connect a local mirror, refresh / sync / update one (e.g. 'mirror the Team A zone from Notion', 'refresh my product mirror', 'réplique cette zone Notion en local', 'mets en place un miroir local pour ce Notion', 'mets en place une synchronisation miroir avec ce Notion', 'fais que mon cerveau puisse chercher dans ce Notion'), check whether one is behind, list them, remove one, or MOVE one into another universe (re-file / ranger un miroir dans un autre univers, e.g. 'move my product mirror into the acme universe', 'range ce miroir dans mon univers Acme'). DO NOT use this skill when the user simply wants to read, write, create, edit, fetch or SEARCH Notion content live and ad hoc — that is the job of the NATIVE Notion connector (a different tool); this skill is ONLY for mirroring a Notion zone locally for the RAG. When the intent is genuinely ambiguous (durable / offline / 'puisse chercher' → mirror; one-off / live / now → native connector), ask the balanced 2-option question first. The actual work runs in the local-mirror MCP server; this skill is the thin conversational driver.
Install
npx vskill@latest install tpierrain/kenjaku/local-mirrorSKILL.md
/local-mirror — Mirror a live internal source into your vault (opt-in, safe)
Brain-side skill. A local mirror (a copie miroir / réplica locale) is a zone of aninternal tool (Notion for the MVP) that you declare once; the brain then **mirrors its pagesintovault/mirrors/<name>/as plain Markdown** (orvault/<universe>/mirrors/<name>/when themirror belongs to a universe, see below). From there the existing RAG indexes and citesthem like any other note — *the central RAG you don't have yet, but local and right now, pluggedonto your live sources.*⚠️ This skill holds no logic. All the real, testable work lives in the **local-mirrorMCP server (its own package, Outside-in TDD). This skill only recognizes intent, gathers thedeclaration, guides the token into.env, calls the right MCP tool, and reports.**
First — a local mirror, or the native Notion connector? (don't mix them up)
A brain can touch Notion two completely different ways. Put yourself in the user's shoes and route to the right one before doing anything:
- They just want to read, write, create, edit, fetch or search something in Notion — live, ad hoc?
→ that's the native Notion connector (the brain's general, real-time Notion access: notion-fetch, notion-search, notion-create-pages, …). NOT this skill. Let that connector handle it; do not onboard a local mirror for it.
- They want a sub-zone of Notion replicated locally so the local RAG can search & cite it —
offline, framed, refreshed on demand, without re-querying Notion every time? → that's a local mirror. This skill. (Mirror = one-way read-only copy into the vault; this skill never writes back to Notion.)
🧭 One-line litmus: *live read/write in the ocean → native Notion connector; a local mirror ofa slice of the ocean for the RAG → local mirror (this skill).*
Disambiguate first — the balanced 2-option question (don't guess)
The exact fault line is a phrasing like "je veux que mon cerveau puisse chercher dans ce Notion". It can mean either tool. When the intent is genuinely ambiguous, don't assume — ask one honest, balanced question (not a sales funnel that pushes the mirror):
Two ways, depending on your need:*— one-off, live (native connector): I read Notion directly, right now. Always up to date, butonline, basic search, and it doesn't stay in your brain's memory;**— durable (local mirror): I copy this zone once, then your brain searches it **semantically(RAG), offline, cites** it, and crosses it with the rest of your notes — in exchange youask me to refresh it when the source changes.**Given your phrasing I'd lean toward the local mirror — shall I set it up?*
Discriminators — only ask when it's actually unclear:
- durable / recurring ("puisse", "à chaque fois", "qu'il garde", "hors-ligne") + citable →
local mirror (this skill).
- one-off / live / now ("lis", "va voir", "cherche maintenant") → native connector, not this skill.
If the discriminators clearly point one way (e.g. "mets en place un miroir local pour ce Notion" → obviously a mirror; "va me lire cette page Notion" → obviously the connector), don't ask — just route. The question is for the genuine grey zone, not a reflex.
When to use it
Load this whenever the user wants to work with a local mirror, in any language:
- "mirror / replicate / set up a local mirror of a Notion zone" — onboarding →
setup_source - "refresh / sync / update the `<name>` mirror" — delta + deletions →
sync - "is `<name>` up to date? / what's its status?" — →
check_freshness/status - "list my local mirrors" — →
list_sources - "remove / disconnect the `<name>` mirror" — →
remove_source - "file / move the `<name>` mirror into my `<universe>` universe" — →
move_source(only ever
once a second universe exists; below that gate the notion does not exist for this user)
Scope — local mirrors only; do NOT invent other "source types". This skill mirrors a Notionzone into the vault, full stop. When the user asks the generic "I'd like to connect a source",do not improvise a multiple-choice "what type of source?" menu — and never offer a "liveconnector / sync delta" option (background Slack/Drive/Calendar live querying is the separatesync-sourcesmechanism, not this skill; "sync delta" already means a mirror's incremental delta —keep the term unambiguous). If you must disambiguate, ask one neutral line: *"Do you want tomirror a Notion zone into your vault as a locally-searchable copy? (That's what I set up here.)"*— then proceed with the onboarding flow below. No invented option list.
Routing (the harness's job, not the MCP's — PRD §8): when a question is clearly **about a declaredmirror's topic (the `description` you captured at setup), stay local-first** — exactly like therest of the brain (Slack/Drive/Calendar): answer NOW from the local RAG, and verify freshnessin the background, never block the answer on a network sync. See "Local-first routing" below forthe exact pattern and wording. Sync only the relevant mirror, never all of them — and only when abackground freshness check actually reportsbehind.
Terminology — what to call it when speaking to the user
In English, say "local mirror" (or just "mirror"). In French, lead with « copie miroir » or « réplica locale »; « source synchronisée » is fine as a property, but always framed local / chez toi / hors-ligne so it never drifts back into the ambiguous native-connector "sync". Never use "golden source" / "source de vérité" anymore — they over-claim and confuse. Mirror the user's own wording when they have one. The identifiers stay English everywhere regardless of the spoken language: the skill name local-mirror, the frontmatter key mirror, the folder vault/mirrors/<name>/ (vault/<universe>/mirrors/<name>/ when scoped), the MCP tools — never translate those.
Golden rule — the token NEVER travels through the chat
The Notion integration token is a secret. It goes only into `.env`, referenced by name (token_env) — never pasted into the conversation, never passed as a tool argument, never committed. The setup_source tool takes the name of the env var, not the token.
Onboarding flow (setup_source)
- Gather the declaration (ask in chat, conversationally):
name— short technical id = the vault subfolder (e.g.team-a). Lowercase, no spaces.title— human label (e.g. "PA / SC zone").description— the topics this mirror covers, in natural language. This is the **routing
key**: it's how you'll later know which question should refresh which mirror.
root_page_url— the URL of the root Notion page of the zone to mirror (its whole sub-tree
is in scope; pages outside it are not — see the perimeter disclaimer below).
token_env— the name of the env var that will hold the integration token (e.g.
NOTION_TOKEN_PASC). One token/scope per mirror.
- Guide the token into `.env` — ONE path, no chat paste-block (only if it isn't set yet).
⚠️ Settle `token_env` FIRST. Gather and confirm the exact var name with the user (step 1) before writing anything — open-env.mjs writes that name as a placeholder line, so a name you later change leaves a stale NOTION_TOKEN_<wrong>= line behind (the PERSO→FACTURE placeholder dance). Only once the name is agreed, proceed. .env is a hidden file a non-dev can't locate, so don't ask them to find it, and don't print a <token_env>=… block to copy into the chat (that duplicates what then has to be cleaned up, R2-3). Instead run the deterministic helper, from the brain folder, which writes a single <token_env>= placeholder line into .env (idempotent — never a second line) and pops their editor right on it: ``bash node scripts/open-env.mjs <token_env> # e.g. node scripts/open-env.mjs NOTION_TOKEN_PASC ` Then tell them: *"Your .env just opened — paste your Notion token right after <token_env>=, save (⌘S), and tell me when it's done."* The token stays **in .env**, never in the chat (golden rule). *(If no editor pops — headless / SBG_NO_OPEN_ENV — the command still prints the .env` path; relay it so they can open it themselves.)*
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingengine-skills/local-mirror/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/tpierrain/kenjaku/local-mirror)