--- name: brain-capture description: "Quick capture - zero friction, saves a fact, pattern, or idea to concepts/ and links it from today's session note Triggers: remember that, capture this, note this down, keep this in mind. Use proactively: trigger this whenever the conversation produces something worth capturing, without waiting to be asked." --- > **Plugin root.** This skill ships inside the Wicked Brain plugin. `` means the folder two levels above this `SKILL.md` (the folder that contains `skills/`, `references/` and `scripts/`). Resolve every `/...` path below from this file's own location. The vault itself is wherever `WICKED_BRAIN_VAULT_PATH` (or `~/.config/wicked-brain/.env`) points; if neither is set, run `$brain-setup` first. Use the wicked-brain skill. Execute `$brain-capture `: The optional argument is the text to capture. If not provided, pull the most recent worthwhile fact or idea from the conversation. 1. Read `_CLAUDE.md` (or `AGENTS.md`) first if it exists in the vault root. 2. Take the argument as the capture, or pull it from recent conversation context. 3. Search `concepts/` for a related existing note. If found, append to it (with today's date) rather than creating a near-duplicate. 4. If new: create `concepts/Title.md` with the minimal capture schema (`type: concept`, `date`, `tags: [concept]`, `ai-first: true`, `status: captured`, one-line body) - the documented capture exception in `/references/ai-first-rules.md`: full enrichment happens later, not at capture time. 5. Add a brief link to it from today's session note (`sessions/YYYY-MM-DD.md`), creating that note if it doesn't exist yet. Each write in steps 3-5 (the concept note, the session note) is a separate note - wrap each one individually with the shared vault lock per `/references/write-rules.md`'s "Concurrent-safe writes" section, not the whole command. 6. **Version history (if enabled):** if `.git/` exists at the vault root, `git -C add -A && git -C commit -q -m "capture: "`. Skip silently if there is no `.git/` directory. (Claude Code users get this automatically via `hooks/validate-ai-first.sh` - this step is the Codex CLI / no-hook-system path.) --- **AI-first rule:** Every note created or updated by this command MUST follow `<plugin-root>/references/ai-first-rules.md`. The capture exception applies: minimal schema now, full enrichment later - but the preamble, `ai-first: true`, and a `date` are never optional even at capture time. **Anti-fabrication:** Never invent context that wasn't actually said. If the source is ambiguous, capture it as stated and mark confidence `speculation` rather than upgrading it to `stated`.