memory-worktree

A skill for checking or changing how moflo shares durable learning between Git worktrees. A worktree is another working directory connected to the same Git repository.

In plain words
What is it for?
Use it to verify automatic sharing, choose a shared storage path, or turn sharing off. It applies to the learnings and knowledge namespaces while keeping temporary and structural data local.
Why use it?
Separate worktrees can otherwise make useful project knowledge hard to share, while sharing all local session data would expose information that should remain isolated. This controls the durable learning portion only.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/eric-cielo/moflo/memory-worktree
Any agent
npx skills add eric-cielo/moflo --skill memory-worktree
Clone the repo
git clone --depth 1 https://github.com/eric-cielo/moflo

Made for: Claude Code, Codex.

Per session 134 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,467 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00134 $0.01467
Opus 5 $0.00067 $0.00733
Sonnet 5 $0.00027 $0.00293
Haiku 4.5 $0.00013 $0.00147

Measured 2d ago against content hash 07f0d689a9f8, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

memory-worktree scanned grade A with 0 findings 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 2d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/memory-worktree/SKILL.md · 128 lines

How it starts

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

/memory-worktree — Durable Sharing Across Worktrees (Automatic)

Working across git worktrees is a core moflo competency, so durable-learning sharing across the worktrees of a repo is now automatic and on by default. When a checkout is part of a repo with worktrees in play, moflo derives a shared durable store at <git-common-dir>/moflo/durable.db and converges the learnings + knowledge namespaces across every worktree at session start — no config. A plain single checkout writes nothing and behaves exactly as before.

This skill is for the three things you might still want: verify it's working, customize where it stores (or extend it to non-worktree clones), or opt out.

Only the durable slice travels. Structural + ephemeral data stays local per checkout and rebuilds itself — the same safety model the auto path is built on (a dedicated durable.db, never a full moflo.db). See [[memory-team]] for the git-tracked, cross-machine variant.

Arguments: $ARGUMENTS--off to opt out, --path <store> to set a custom shared store.

When to use

  • "Is memory / are learnings shared across my worktrees?" → verify (Step 1).
  • "Where are my worktree learnings stored?" → it's <git-common-dir>/moflo/durable.db; verify to confirm.
  • "Turn off / disable worktree memory sharing" → opt out (Step 2).
  • "Share learnings across my separate clones / a custom location" → customize (Step 3).

For a team, or your own laptop+desktop over git, that's /memory-team, not this.

Procedure

Step 0 — Memory first (gate requirement)

mcp__moflo__memory_search { query: "durable_path worktree sharing auto git common dir learnings", namespace: "guidance" }

Step 1 — Verify (default action)

Run the safety/status check and surface it verbatim:

npx flo doctor -c shared-db 2>&1
  • "Automatic worktree learning sharing active ()" → it's working; the path is the shared store.
  • "No shared full moflo.db detected…" → auto sharing is NOT active here. Most likely this checkout has no sibling worktrees yet (auto only turns on once worktrees exist). Confirm with the user; if they expected sharing across separate clones (not worktrees), go to Step 3 — auto can't converge those.
  • A warn → a full-DB misconfig is present; follow the check's fix line.

Read the full file on GitHub · 128 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. 2d ago First seen · 128 lines · 134 tokens per session scan A 07f0d689a9f8

Subscribe to this mod's changes

memory-worktree is a skill published in the GitHub repository eric-cielo/moflo (18 stars, last pushed 4d ago), licensed MIT. It adds 134 tokens to every session and 1,467 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.