# Obsidian Memory Capture

> Capture Codex assistant answers from session JSONL into Obsidian raw inbox notes for manager distillation. Use when maintaining long-term memory artifacts in `00-Inbox` and append only new, unlogged answers.

- Skill: `mbtz/obsidian-memory-capture` (Agent Skill, multi-file: 7 files)
- Install (CLI): `npx skillmds@latest add mbtz/obsidian-memory-capture`
- Raw SKILL.md: https://api.skillmd.com/api/skills/mbtz/obsidian-memory-capture/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: mbtz (https://skillmd.com/u/mbtz)
- Updated: 2026-09-10
- Page: https://skillmd.com/skills/mbtz/obsidian-memory-capture

---


# Obsidian Memory Capture

Use this skill to ingest Codex session outputs into raw inbox notes with deduplicated, append-only capture.

## Bundle layout

- Script: `scripts/capture_session_answers.py`
- Config: `scripts/config.json`
- Install wizard: `INSTALL_WIZARD.json`
- Hook installer: `scripts/install_post_operation_hook.py`
- Hook templates: `scripts/hooks/post_operation_obsidian_memory.{sh,py}`

When installed via `askill`, the installer prompts for machine-specific paths and writes `scripts/config.json`. It also offers an opt-in action to install and enable the Codex post-operation hook locally (`~/.codex/hooks` + `~/.codex/config.toml`). You can still edit any file manually later.

## Standard usage

From this skill directory:

```bash
python3 scripts/capture_session_answers.py
```

Optional explicit session:

```bash
python3 scripts/capture_session_answers.py --session-id "$CODEX_THREAD_ID"
```

Dry run preview:

```bash
python3 scripts/capture_session_answers.py --dry-run
```

## Post-Operation Hook (recommended)

If you opt in during `askill` installation, hook files and config are installed automatically.
Manual setup is still supported. Add to `~/.codex/config.toml`:

```toml
notify = ["~/.codex/hooks/post_operation_obsidian_memory.sh"]
notifications = ["agent-turn-complete"]
```

Hook scripts:

- `~/.codex/hooks/post_operation_obsidian_memory.sh`
- `~/.codex/hooks/post_operation_obsidian_memory.py`

## Rules

- `00-Inbox` is raw capture only; do not normalize here.
- Default project slug is `obsidian-memory`.
- The script ingests assistant messages from Codex session JSONL and appends only unseen entries.
- The script must be called at the end of each answered turn when this memory workflow is active.
- In interactive use, prefer the post-operation hook so capture happens automatically after each answer.

