/second-brain:devlogfrom second-brain
Appends point-in-time work commentary to a devlog vault when finishing features, fixing bugs, or discovering non-obvious gotchas. Writes immediately without asking permission.
Ships in second-brain. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Devlog is continuous, point-in-time work commentary: what happened, why, and anything surprising, captured as it happens instead of reconstructed from memory at the end of a session. One narrative session note accumulates every entry from the current session — no separate "learnings" system, no til/cursed split, everything worth remembering goes in the same place.
Processing (routing, connecting, daily-linking) happens later via
/second-brain:process-inbox. This skill only ever appends to the inbox.
Write the entry now, in the same turn as whatever triggered it. Don't
ask "should I log this?" and don't offer to — just write it. Asking is
exactly the failure mode that made the old distill-conversation flow get
skipped: by the time a session ends, you're mentally done, and a skip-able
step gets skipped.
/second-brain:process-inboxsecond-brain:captureDon't preflight-check sb availability — just run it:
npx @techpickles/sb config default && npx @techpickles/sb config vaults
If this fails, run ${CLAUDE_PLUGIN_ROOT}/scripts/diagnose-sb.sh and follow
its guidance rather than re-deriving the checks by hand.
Then pick the vault for this session's note:
${CLAUDE_PLUGIN_ROOT}/scripts/resolve-vault.sh
It prints a vault name, or nothing. Use that name as --vault <name> on every
sb call below that takes it (note create, vault obsidian, inbox list).
When it prints nothing, omit --vault and let sb use its default. The name comes
from SB_NOTE_VAULT if set (a per-project override), else from whichever
registered vault contains the working directory. Never write a session's note
to a different vault than the one the session is working in or for: a vault can
have rules about what may be written to it.
If no default vault is configured:
Second brain not configured. Run /second-brain:setup first.
Every entry from the current session lands in ONE note. Never create a second devlog note for a session that already has one.
claude-code session {short-id} ({repo}, branch {branch}, {tracker} {id})
(omit fields that don't apply)This plugin doesn't know or assume an issue tracker. If your context names a tracked work item for this session (a ticket, issue, or task ID), record it; otherwise leave it out. It can arrive two ways:
Work items this session ({tracker}):
- {id} ({status}): {title}
A PreToolUse hook on the Skill tool can emit this as
additionalContext for second-brain:devlog.If there are several candidates, pick the one(s) this entry is actually about. A follow-up item filed during the session is usually not what the session was about. If none fit, or nothing names a work item, omit it. Don't guess one from the branch name.
Check your own memory first. If you already created or appended to
this session's devlog note earlier in this same conversation, you
already have its path in context — go straight to Step 2a and append.
No CLI search needed: this is the same mechanism
second-brain:insight uses for its own accumulating session note
("if the session file already exists, was created in an earlier call
in this same conversation, append").
If this is the first devlog entry this session, go to Step 2b to create the note, and keep its path in mind for the rest of the session.
Fallback, only if you've genuinely lost track of the note's path (e.g. a context compaction wiped your memory of this session) — resolve a real path instead of guessing:
npx @techpickles/sb vault obsidian (add --vault <name> when step 1 picked one) — parse the JSON for the
top-level inbox field (the inbox subfolder name, e.g. 📫 Inbox).
This is the precomputed field sb note create itself resolves the
inbox folder from — don't parse app.newFileFolderPath directly,
since that skips the Zettelkasten Prefixer plugin's folder override
(inbox is zkPrefixer?.folder ?? app?.newFileFolderPath) and can
point at the wrong folder.npx @techpickles/sb inbox list --detail — parse the JSON, look for
the entry with type: session-notes whose source field contains
the current short session id, and take its filename~/.claude/vaults/{vault-name}/{inbox}/{filename} is the
real, readable/editable path. inbox list --detail only ever
returns a bare filename, never a resolvable path on its own.inbox list --detail search finds no entry matching the current
session id (genuinely nothing to recover), fall through to Step 2b
and create the note instead.Read the note, append one new bullet to the end of its body (format below) using the Edit tool. Don't touch its frontmatter.
Staged and written in one Bash call:
VAULT={vault name from resolve-vault.sh, or empty}
STAGE=$(mktemp)
cat > "$STAGE" <<'EOF'
- {HH:MM} {entry}
EOF
npx @techpickles/sb note create \
${VAULT:+--vault "$VAULT"} \
--title "Session: {topic}" \
--source "claude-code session {short-id} ({repo}, branch {branch}, {tracker} {id})" \
--content "$(cat "$STAGE")"
rm -f "$STAGE"
Run it sandboxed first. It works sandboxed when the vault's real path is in
the sandbox's allowWrite (for example ~/Vaults/<vault>/**/*.md). Name
the real directory, not a symlink to it: the sandbox matches the resolved
path. If the call fails with Operation not permitted on the vault path,
the vault isn't allowlisted. Re-run the whole call with the Bash tool's
dangerouslyDisableSandbox: true, not just the sb line: $TMPDIR
resolves to a different path unsandboxed, so staging and reading have to
happen in the same call under the same mode or the read can miss the file.
Either way, the staged file must be a fresh mktemp path,
not a fixed filename: $TMPDIR is shared across every Claude Code
session on the machine, and a fixed-name file can be overwritten or read
by a stale write from a different session.
sb note create prints JSON with a path field. If stdout has anything
before the { (e.g. a stray npm warn ... line from the caller's own
.npmrc), extract the JSON substring starting at the first { rather
than parsing the whole stdout blob.
sb note create only ever writes captured, source, repo, branch,
commit to frontmatter — it has no --type/--status flag, and repo/
branch come out as the literal none/none (devlog's --source format
doesn't match sb's own conversation:repo=...,branch=... parsing
convention). Read the file back at the path just parsed to preserve the
exact frontmatter sb wrote, then Edit it:
status: rawtype: session-notesrepo: none line sb wrote with repo: {repo-name} (from
git context if available) — don't add a second repo: linebranch: none line sb wrote with branch: {branch-name}
(from git context if available) — don't add a second branch: lineissue: {id} if there's a current work item (see
Work items); a YAML list if the entry covers several.
Omit the line entirely otherwisesource as sb wrote it — the claude-code session ... string
already covers provenance for devlog's formatcaptured as sb wrote itWithout this fixup, the note is invisible both to this skill's own
"check memory / find existing note" logic (Step 2, above) and to
process-inbox's stage 3a filter, which requires exactly status: raw +
type: session-notes to ever pick the note up.
One bullet per entry, each with a wall-clock timestamp:
- {HH:MM} {what happened, why, anything surprising — one to three
sentences, standalone enough to make sense without the surrounding
conversation}
Prose, not a title. Write it like a short journal line, not a commit message.
A record somewhere else doesn't replace the devlog entry. Claude Code's memory is what future sessions act on, an issue or ticket is the tracked work, and the devlog is the vault's record of what happened. When the discovery was also saved to one of those, write the entry anyway and say where it went:
- 14:05 The VM's guest DNS drifts off its DHCP lease after the host
sleeps, so image pulls time out until it's reset. Saved as a memory
(`~/.claude/projects/<project>/memory/reference_vm_dns_drift.md`).
Point at it, don't paste it: one or two sentences of what happened, then the pointer. The other record holds the details. Which trackers count beyond memory (and how to cite them) is up to your own instructions or the hook that nudged you here; this skill doesn't assume any.
process-inbox's job, later.status: raw, type: session-notes for the life of
the session. process-inbox owns every status transition after that.What SKILL.md sets; muted values are Claude Code's defaults
Bashpython3 "${CLAUDE_PLUGIN_ROOT}"/hooks/check-sb-before-call.pyThree short reads, in order
npx claudepluginhub technicalpickles/pickled-claude-plugins --plugin second-brain10 skills in this plugin
/captureUse when the user asks to read a source and make a note for it, create or find an atomic note, or check whether a note already exists or add to one that does. Triggers on "read <url> and make a note", "make a note for", "create (or find) an atomic note", "do we have notes about X?", "check if we have a note for", "capture this", "put together a note", "distill this", and on a bare URL/PDF/tweet/thread handed over with intent to write it up. Use inside an Obsidian vault or anywhere a vault is configured. Do NOT use for draining an accumulated inbox backlog (that is process-inbox), for extracting insights from the current conversation (that is devlog), or for routing already-captured notes to their homes (that is route)./connectFind related notes via semantic search and weave links. Stage 4 of the processing pipeline./distill-rulesOther plugins' skills for the same job