agentsclimarketplace

Sb

Skill prajwalmahajan101/claude-skills-pack/skills/sb

Second-brain skill — captures every Claude Code conversation into the ai-mind Obsidian vault, scoped by project (cwd). Use proactively when the user mentions 'lesson', 'topic note', 'kanban', 'tasks', 'second brain', 'remember this', or asks about past conversations / decisions / action items. Subcommands: /sb:status /sb:analyze /sb:lesson /sb:topic /sb:tasks /sb:task /sb:kanban /sb:connect /sb:tag /sb:search /sb:project /sb:backfill /sb:consolidate /sb:health /sb:bases.From its SKILL.md

Install
npx -y skills add prajwalmahajan101/claude-skills-pack --skill sb

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 1 stars1 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

10.7 KB, as published. Nobody here has run it

Second Brain (sb)

Persistent second brain for Claude Code, backed by the ai-mind Obsidian vault.

What it does

  • Captures every conversation automatically (Stop hook → conversations/<project>/<session>.md).
  • Scopes notes by project — one project per cwd. Each gets INDEX.md, kanban.md, lessons.md, plans/.
  • Analyzes unprocessed conversations into lessons, takeaways, action items, and tags (via claude -p → Haiku, JSON schema).
  • Tracks project tasks via Kanban markdown boards.
  • Connects notes across projects (tag overlap + keyword similarity).
  • Topic notes for evergreen reference (CRUD, observability, k8s, etc.).
  • Auto-tags notes from rules + LLM suggestions.
  • AI-first notes — lessons/topics carry a ## For future Claude preamble + ai-first: true; a non-blocking Write/Edit validator warns on notes that miss it.
  • Self-maintenance — /sb:consolidate dedupes lessons, archives stale conversations, and promotes durable lessons to memory (manual, dry-run by default); /sb:health audits the vault.
  • Obsidian Bases — /sb:bases generates database views (Lessons, Projects, Conversations, Tasks, Memory) in 00_Dashboard/.
  • External memory bridges — promotes durable lessons into the harness file-memory (~/.claude/projects/.../memory) and logs activity to the ~/.remember rolling history; new-session INDEX surfaces both.

Subcommands

CommandPurpose
/sb:statusProject + brain dashboard
/sb:analyze [sid?]Mine un-analyzed conversations → lessons/takeaways/actions/tags
/sb:lesson "<title>"Capture a lesson from the current conversation
/sb:topic <slug>Create or extend a study/topic note
/sb:tasks [--project] [--all]List pending kanban tasks
/sb:task add "<text>" [...]Add task to project kanban
/sb:task done <n|prefix>Mark task done
/sb:kanban [--project] [--open]Render/open project kanban
/sb:connect [--current]Suggest links between notes
/sb:tag [path?]Auto-tag notes
/sb:search <query>Vault full-text search via Obsidian CLI; --semantic fuses precomputed-vector neighbors with lexical (RRF, key-free)
/sb:project [<slug>]List projects / show project INDEX
/sb:backfill [--days N|--all]Import historical conversations
/sb:consolidate [--apply]Dedupe lessons, archive stale convos, promote durable→memory, import global lessons (dry-run unless --apply)
/sb:health [--json]Read-only vault audit (orphans, duplicates, stale tasks, malformed frontmatter)
/sb:bases(Re)generate Obsidian Bases views into 00_Dashboard/
/sb:ingest [--payload <f>]Write a supplied JSON note payload into 02_Projects/<slug>/ (generic; the sutra orchestrator feeds it parsed repo artifacts)
/sb:decision "<title>" [--from-council]Capture an ADR (Context/Decision/Consequences/Usage) into 02_Projects/<slug>/decisions + global 11_Decisions
/sb:lessons-import [--push]Import ~/.claude/lessons into the vault; --push writes sb lessons back to the global INDEX
/sb:graph [--project <slug>]Build a knowledge graph via graphify + mirror graphify-out/ into 09_Exports/graph
/sb:zettel "<claim>"Atomic permanent Zettelkasten note (claim-title, related/sources) in 14_Zettelkasten
/sb:meeting "<title>" [--attendees a,b]Meeting note; attendees auto-linked to People + interaction-logged
/sb:person <name> [--log "..."]People/CRM note + interaction log in 12_People
/sb:habit "<name>" [--done|--list]Habit tracker with streaks in 15_Habits
/sb:verify <slug>Mark an AI-drafted note human-verified (clears the [!ai] callout + review queue)
/sb:challenge <slug>Append a skeptical ## Challenge pass using your own related notes
/sb:ask-highlights "<query>"Verbatim-only retrieval (quotes + file:line), never generated prose
/sb:dashboardRegenerate the Life-Dashboard homepage (00_Dashboard/Home.md)
/sb:eval [--rebuild] [--sample N]Measure retrieval quality — recall@1/3/5/10 + MRR per type over a Haiku-paraphrased held-out question set (_meta/eval-set.json)
/sb:distill "<note>"Distill a note into atomic, source-anchored claims (each (src: Bn)); unsourced claims dropped + reported; verified:false note in 08_Insights
/sb:related "<note>" [--k N]Semantically nearest notes via smart-connections precomputed vectors (key-free, note-to-note cosine)
/sb:init(Re)generate _CLAUDE.md + index.md (folder map, note types, rules, command list, counts, Base links) — idempotent, sentinel-bounded
/sb:emerge [--apply] [--min N]Cluster lessons/zettels/topics by shared tag/title-token; draft type:synthesis, verified:false pages in 08_Insights (dedup via _meta/synthesis-seen.json)
/sb:idea "<title>" [--body "a; b"]Capture an idea into 16_Ideas (status:captured); bullets become the graduation checklist
/sb:graduate "<idea>" [--project <slug>]Promote an idea → 02_Projects/<slug>/ + seed kanban cards from its bullets; idea status:graduated + backlink

Note: /sb:task new "<title>" [--parent <slug>] supports hierarchical sub-tasks. Haiku-drafted notes (/sb:lesson, /sb:decision, /sb:zettel --draft) are written verified: false with a visible [!ai] callout and appear in unverified.base until /sb:verify.

Note: /sb:lesson "<title>" [--memory] — --memory (or a model durable:true flag) also promotes the lesson to harness file-memory.

Note: facts that change over time (a person's role/company/relationship, a project's status) are recorded bi-temporally via lib/timeline.js — a timeline: frontmatter list of field|value|from|source entries. Values are never overwritten; the first change also seeds the prior value (source: initial) so no history is lost. currentValue/historyOf read it back.

When to invoke

  • User mentions "lesson learned", "remember this", "note this decision" → /sb:lesson
  • User asks "what's on my plate?", "show tasks", "todos" → /sb:tasks or /sb:status
  • User wants to study a topic or build reference notes → /sb:topic
  • User asks "what did we figure out about X?" → /sb:search
  • After a significant decision, root-cause discovery, or pivot → /sb:lesson then /sb:connect --current
  • User says "set up second brain" or "install sb" → point them at ~/Desktop/git_projects/my_work/main-project/secondbrain_obsidian_claude/README.md

Vault layout

~/Documents/vaults/ai-mind/
├── conversations/<project>/<session>.md   # auto
├── projects/<project>/{INDEX,kanban,lessons}.md + plans/
├── lessons/<YYYY-MM-DD>-<slug>.md
├── topics/<slug>.md
├── connections/<theme>.md
├── 08_Insights/          # distillation + synthesis (verified:false until /sb:verify)
├── 16_Ideas/<slug>.md    # captured ideas (status: captured|graduated)
├── inbox/
├── templates/
├── tags.md
└── _meta/{session-map,tag-rules}.json

Configuration env vars

VarDefaultPurpose
SB_VAULT_PATH~/Documents/vaults/ai-mindVault root
SB_VAULT_NAMEai-mindVault name for obsidian vault=… calls
SB_ANALYZER_MODELclaude-haiku-4-5-20251001Model for /sb:analyze
SB_ANALYZER_MAX_TURNS60Truncate longer convos
SB_CAPTURE_DEBOUNCE_MS5000Min gap between writes
SB_CLAUDE_BINclaudePath to claude CLI
SB_DISABLEunset1 to suppress all sb hooks
SB_VALIDATE_DISABLEunset1 to mute the AI-first Write/Edit validator
SB_CONSOLIDATE_STALE_DAYS90Age after which an analyzed conversation is archive-eligible
SB_MEMORY_DIR~/.claude/projects/<sanitized-home>/memoryHarness file-memory location
SB_MEMORY_PROMOTEunset0 to disable promoting durable lessons to memory
SB_REMEMBER_DIR~/.rememberRolling activity-history location
SB_LESSONS_DIR~/.claude/lessonsGlobal (canonical) lessons store for the bridge
SB_EMBED_CMDunsetOptional query-embedder command (query on stdin → JSON float array on stdout) for /sb:search --semantic. Unset → keyword-anchor fallback (key-free)
SB_EMBED_MODELTaylorAI/bge-micro-v2Which precomputed smart-connections model's vectors to read from .smart-env/multi/*.ajson
SB_EVAL_SAMPLE12Notes sampled when building the /sb:eval question set

Implementation

  • lib/vault.js — path/slug helpers, session-map I/O
  • lib/jsonl.js — parse session JSONL → ordered turns
  • lib/markdown.js — render turns; append-aware
  • lib/analyzer.js — claude -p wrapper, JSON-schema extraction
  • lib/tagger.js — rules + LLM tag merging
  • lib/kanban.js — Obsidian Kanban markdown CRUD
  • lib/connector.js — link suggestion engine
  • lib/ai-first.js — ## For future Claude preamble + frontmatter + note validation
  • lib/timeline.js — bi-temporal facts (timeline: history; never overwrite)
  • lib/provenance.js — numbered source blocks + source-anchored claim splitting (for /sb:distill)
  • lib/embeddings.js — key-free semantic layer over smart-connections precomputed vectors (cosine/nearest/anchor)
  • lib/memory-bridge.js — promote/list/mirror harness file-memory facts
  • lib/remember-bridge.js — append/read the ~/.remember rolling history
  • lib/git.js — tiny generic git repo-root helper
  • lib/lessons-bridge.js — import/list/push the global ~/.claude/lessons store
  • commands/_runners/{consolidate,health,bases,init,emerge,eval}.js — self-maintenance, Bases, entry docs, synthesis, retrieval eval
  • commands/_runners/{distill,related,idea,graduate}.js — provenance distillation, semantic neighbors, idea lifecycle
  • commands/_runners/{ingest,decision,lessons-import,graph}.js — vault-ingest + supporting runners
  • hooks/sb-capture.js — Stop/SubagentStop/PreCompact, writes conversation file (type: conversation)
  • hooks/sb-plan-mirror.js — PostToolUse, mirrors plans
  • hooks/sb-validate.js — PostToolUse (Write/Edit), non-blocking AI-first validator
  • hooks/sb-session-start.js — scaffolds project dir; injects Memory & Remember section

Keep looking

Skills are one crate of 627,801. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.