Obsidian project memory
Skill louisdevzz/project-memory/skills/obsidian-project-memory
Per-project memory for coding agents, stored as plain Markdown in the repo under .agent-memory/. Use whenever the user wants to save, restore, or curate working context across sessions — phrases like "remember this decision", "preserve state", "resume where we left off", "compress my session notes", "what did we decide about X", "clean up old memory", or any mention of agent memory, project memory, second brain, or an Obsidian vault for a codebase. Also use proactively at the end of a long working session, before switching branches or machines, or when starting work on a repo that already contains a .agent-memory/ directory. Works identically in Claude Code and Codex CLI.From its SKILL.md
npx -y skills add louisdevzz/project-memory --skill obsidian-project-memoryAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
9.1 KB, as published. Nobody here has run it
Obsidian Project Memory
Memory that lives in the repo it describes, as Markdown a human can read, edit, and diff. No global memory, no vector database, no chat transcripts. Obsidian is an optional viewer, never a dependency.
The one idea
Not everything worth saying is worth remembering, and not everything worth remembering stays true. So memory has two tiers with a one-way promotion path between them:
this session
│
▼ preserve (cheap, disposable, high volume)
sessions/*.md + current-state.md ← working memory
│
▼ compress (rare, curated, lossy on purpose)
decisions.md + knowledge/*.md ← durable memory
│
▼ cleanup (archives only what was provably promoted)
archive/
Working memory answers "where was I on Tuesday?" and expires. Durable memory answers "why is this code shaped this way?" and outlives the session, the branch, and possibly you. Confusing the two is the failure mode this skill exists to prevent — a memory system that remembers everything is just a slower transcript.
Modes
Pick the mode from what the user is doing, then read the matching reference file before acting. Do not improvise these workflows from the summary below; the reference files carry the edge cases that matter.
| Mode | Trigger | Reference |
|---|---|---|
resume | Starting work in a repo with .agent-memory/ | references/resume.md |
preserve | Ending a session, switching context, "save where I am" | references/preserve.md |
remember | A durable decision or constraint just got made | references/remember.md |
recall | "What did we decide about X?" | references/recall.md |
compress | Several snapshots have piled up | references/compress.md |
supersede | An earlier decision has been reversed | references/compress.md |
cleanup | Memory is cluttered; wants old snapshots gone | references/cleanup.md |
status | "How big is my memory / what needs attention?" | run memory_repo.py status |
collaborate | Another agent is working this repo (agent-bus tools present) | references/collaboration.md |
references/schema.md defines every file and frontmatter field. Read it the first time you write to memory in a session.
Two agents on one repo
If agent-bus tools are available, Claude Code and Codex are sharing this repo. Call join once, status at the start of each turn, and claim before editing — then read references/collaboration.md.
Be accurate with the user about what this is: two separate agents with separate context windows sharing a board, not one merged session. Each learns about the other only when it calls a tool, so the granularity is the turn boundary — except inbox(wait_seconds=N), which genuinely blocks until the peer posts. Someone expecting continuous conversation will otherwise read normal latency as a bug.
The bus is live state and is gitignored. It sits below working memory and drains into it at preserve:
agent-bus (seconds to hours, disposable)
→ sessions/*.md → decisions.md + knowledge/
Safety rules that override everything else
These are not style preferences. Violating them puts secrets in git history or destroys information a human cannot reconstruct.
Never write secret values. Not tokens, API keys, passwords, private keys, connection strings, .env values, or anything matching a credential pattern. Record the name and the shape: write JWT_SECRET comes from env, rotated quarterly — never the secret itself. Never copy the contents of .env*, *.pem, *.key, *.p12, id_rsa, credentials, or any path matched by .gitignore into memory. Run python3 scripts/memory_repo.py scan --repo . before any commit that touches memory. Memory in a repo means memory in git history, and git history is forever — a leaked value cannot be un-leaked by editing the file.
Never delete durable memory. decisions.md and knowledge/ are append-and-supersede only. A reversed decision gets status: superseded and a pointer to what replaced it, keeping the original rationale intact — future-you will want to know why the old approach was tried, not just that it lost.
Never delete anything without proof and consent. cleanup moves files to archive/, never deletes them, and only for snapshots whose promoted content is verifiably present in a durable file. Always dry-run first and show the user the list.
The repo outranks the memory. Memory is a claim about the past; the working tree is the present. When they disagree, the code wins and the memory gets corrected.
Writing to memory: the bar
Before writing anything, ask: would this still be useful to someone who has forgotten this week entirely?
Write it down if it is a decision and its rationale, a constraint discovered the hard way ("the staging DB rejects connections without SSL"), a convention the team follows, an unfinished thread with a concrete next action, or a dead end worth not repeating.
Leave it out if it is narration of what you just did, anything readable from the code in ten seconds, restated user messages, or speculation. Memory pollution is silent: nothing breaks, recall just slowly stops returning anything useful.
Aim for a preserve snapshot under ~60 lines and a remember entry under ~20. If it needs more, it probably contains two things.
Layout
.agent-memory/
├── README.md Human-facing: what this is, schema version
├── config.yml Retention, size budgets, commit policy
├── .gitignore Working memory stays local by default
├── current-state.md Derived pointer to the latest snapshot
├── decisions.md Durable: decisions with status + rationale
├── knowledge/ Durable: one file per topic, index in README
├── sessions/ Working: one append-only file per session
└── archive/ Retired snapshots, never auto-purged
init gitignores sessions/, archive/, and current-state.md by default, so working memory stays personal while decisions.md and knowledge/ become a shared team artifact. Two agents in two worktrees write to different snapshot files and never clobber each other. Change this in config.yml only deliberately.
Scripts
Python 3.8+, standard library only, no install step. The scripts live in this
skill's own directory; when installed as a plugin $CLAUDE_PLUGIN_ROOT points
there, and ${CLAUDE_PLUGIN_ROOT:-.} falls back to the repo when run from source.
Always target the user's repo with --repo .:
S="${CLAUDE_PLUGIN_ROOT:-.}/scripts/memory_repo.py"
python3 "$S" init --repo .
python3 "$S" status --repo .
python3 "$S" validate --repo .
python3 "$S" scan --repo . # secret scan
python3 "$S" gc --repo . --days 30 # dry-run
python3 "$S" gc --repo . --days 30 --apply
python3 "$S" purge-archive --repo . --days 365 --apply --confirm
gc is dry-run unless --apply, and refuses to touch a snapshot unless compress_status: full and every anchor in compressed_into resolves to a heading that actually exists. Trusting the flag alone would let a half-finished compress erase its own inputs.
Install
The supported path is the plugin. It bundles this skill and the agent-bus MCP
server, so installing it in Claude Code and in Codex is all the setup there is —
no per-repo wiring, no manual setup_bus.sh:
# Claude Code
/plugin marketplace add louisdevzz/obsidian-project-memory
/plugin install obsidian-project-memory@obsidian-project-memory
# Codex
codex plugin marketplace add louisdevzz/obsidian-project-memory
codex plugin add obsidian-project-memory@obsidian-project-memory
The bundled agent-bus server needs no config: it auto-detects whether it is
running under Claude or Codex (naming the two agents apart on the board) and
scopes its bus.db to the current repo's git root. Two agents that both install
the plugin and open the same repo see each other automatically.
scripts/install.sh (symlink the skill into ~/.claude/skills + ~/.agents/skills)
and scripts/setup_bus.sh (wire the bus per-repo) remain for source/manual installs
that do not use the plugin system.
Getting started in a fresh repo
Run init, then tell the user what was created and that working memory is gitignored by default. Do not backfill memory by reading the whole codebase — memory earns its content from real sessions. Seed at most a short knowledge/architecture.md if the user explicitly asks.