Firstbrain

Second Brain - Obsidian Edition - Personal Knowledge Management System

Obsidian Claude Code Node.js

Firstbrain

AI-Native Second Brain for Obsidian
Claude thinks. You create.

Version License: CC BY-NC 4.0 Stars Issues 11 Skills

Quick StartSkillsArchitectureTemplatesMemoryContributing


What is Firstbrain?

Firstbrain transforms a plain Obsidian vault into an AI-native knowledge management system. Claude Code acts as the cognitive layer — scanning your vault, creating notes from templates, discovering connections, searching by meaning, triaging your inbox, synthesizing knowledge, and maintaining consistency — all while remembering your context across sessions.

Without Claude Code, it's a beautifully structured Obsidian starter vault with PARA folders, 12 templates, and 8 Maps of Content.

With Claude Code, it becomes a second brain that actively works for you.

"Create a tool note about Docker"       → Claude picks the template, fills metadata, suggests links
"What did I write about productivity?"   → Semantic search finds notes by meaning, not keywords
"Triage my inbox"                        → Classifies notes, suggests folders, auto-tags high-confidence items
"Give me a briefing"                     → Calm daily summary of changes, priorities, and suggestions

Features

FeatureDescription
11 Claude Code Skills/create, /daily, /connect, /health, /scan, /search, /memory, /briefing, /triage, /synthesize, /maintain
Zero-Dependency CoreAll scanning, parsing, and indexing runs on Node.js built-ins — no npm install required for core
Incremental ScanningSHA-256 content hashing detects changes without re-reading the entire vault
Semantic SearchLocal embeddings via Transformers.js + SQLite — your notes never leave your machine
Four-Layer MemorySession → Working → Long-term Summary → Project-specific context persistence
Proactive IntelligenceDaily briefings, inbox triage, knowledge synthesis, and vault maintenance — Claude works for you
Evolution GovernanceThree zones (AUTO / PROPOSE / NEVER) control what Claude can do autonomously
12 Note TemplatesProject, Area, Resource, Tool, Zettel, Person, Decision, Meeting, Code Snippet, Daily, Weekly Review, Monthly Review
8 Maps of ContentNavigation hubs for Projects, Areas, Resources, Tools, People, Code, Meetings, Decisions
Full Obsidian CompatibilityGraph view, search, Properties panel, Dataview queries — everything works

Quick Start

Prerequisites

ToolVersionRequired
ObsidianLatestYes
Claude CodeLatestYes (for AI features)
Node.js>= 22Yes (for AI features)

Step 1: Clone & Open in Obsidian

git clone https://github.com/BEKO2210/Firstbrain.git

Open Obsidian → Open folder as vault → select the Firstbrain folder.

Step 2: Install Dataview Plugin

In Obsidian: Settings → Community Plugins → Browse → search "Dataview" → Install → Enable.

Dataview powers the automatic lists on MOC pages and the Home dashboard.

Step 3: Install Semantic Search (optional)

cd Firstbrain
npm install

This installs @huggingface/transformers for local embeddings. Semantic search runs 100% locally — no API calls, no data leaves your machine. If you skip this, /search falls back to keyword matching.

Step 4: Start Claude Code

Open a terminal in the Firstbrain folder and start Claude Code:

cd Firstbrain
claude

Claude automatically reads CLAUDE.md on startup and understands the vault structure, templates, rules, and all 11 skills. No configuration needed — it's ready immediately.

Step 5: Initialize the Vault Index

In the Claude Code session, type:

/scan

This scans all markdown files and builds the indexes (vault-index.json, link-map.json, tag-index.json). Takes ~15ms. After this, all skills have full vault awareness.

Step 6: Start Using It

Try these commands in your Claude Code session:

/briefing                              → Daily summary of your vault
/create a project note: Learn Rust     → Creates note from template
/health                                → Find orphan notes and broken links
/search productivity                   → Semantic search across all notes
/triage                                → Classify and file inbox notes
/daily                                 → Create today's daily note

Or just talk naturally:

"Create a zettel about why deadlines improve creativity"
"What do I know about Docker?"
"Show me my open tasks"
"Synthesize what I know about marketing"
"Run a maintenance check on my vault"

Skills

Firstbrain ships with 11 Claude Code skills organized in two tiers.

Core Skills (v1.0)

SkillWhat it does
/createCreates notes from 12 templates. Picks the right template, fills frontmatter, substitutes variables, suggests wiki-links, places file in the correct folder.
/dailyCreates today's daily note. Rolls over open tasks from the past 7 days with provenance links.
/connectDiscovers connections between notes via shared tags and link adjacency. Returns scored suggestions with evidence.
/healthDetects orphan notes (0-1 connections) and broken wiki-links. Suggests fixes with Levenshtein matching.
/scanIncrementally scans all markdown files. Builds vault-index.json, link-map.json, tag-index.json. Only re-parses changed files (SHA-256).
/searchFinds notes by meaning using local embeddings (Transformers.js + SQLite). Falls back to keyword matching if embeddings aren't installed.
/memoryMemory dashboard — shows active projects, recent insights, organizational patterns across all four memory layers.

Proactive Intelligence Skills (v1.1)

SkillWhat it does
/briefingCalm daily executive summary — recent changes, current priorities, neglected items, and actionable suggestions. Read-only, never modifies your vault.
/triageInbox classification — scans 00 - Inbox/, classifies each note by type, suggests target folder. High-confidence items get auto-tagged, structural changes are proposed for review.
/synthesizeTopic-based knowledge synthesis — finds all notes related to a topic (by tags, title, semantic similarity), generates a summary zettel with wiki-link citations and AI provenance metadata.
/maintainVault consistency auditing — detects frontmatter issues, tag inconsistencies, stale projects, outdated references. Proposes fixes respecting governance zones. Can auto-fix low-risk issues.

Architecture

Vault Structure

Firstbrain/
├── 00 - Inbox/              Landing zone for new notes and daily notes
├── 01 - Projects/            Active projects (time-bound, has end date)
├── 02 - Areas/               Life areas (ongoing, no end date)
├── 03 - Resources/           Knowledge, references, learning material
├── 04 - Archive/             Completed or inactive items
├── 05 - Templates/           12 note templates (read-only)
├── 06 - Atlas/MOCs/          8 Maps of Content (navigation hubs)
├── 07 - Extras/              Attachments, Kanban boards, media
├── .agents/skills/           Claude Code skill definitions + utilities
│   ├── briefing/             Daily executive summary
│   ├── connect/              Connection discovery engine
│   ├── create/               Template-based note creation
│   ├── daily/                Daily note with task rollover
│   ├── health/               Orphan + broken link detection
│   ├── maintain/             Vault consistency auditing
│   ├── memory/               Four-layer memory management
│   ├── scan/                 Incremental vault scanner + indexer
│   ├── search/               Semantic + keyword search
│   ├── synthesize/           Topic-based knowledge synthesis
│   └── triage/               Inbox classification and filing
├── .claude/                  AI system config, rules, memory
│   ├── memory/               Working memory + insights + project state
│   └── rules/                Governance rules (naming, linking, frontmatter)
├── CLAUDE.md                 AI-native instructions (loaded on startup)
├── Home.md                   Central dashboard
├── START HERE.md             User onboarding guide
└── Workflow Guide.md         Daily workflow instructions

Scanning Pipeline

Markdown Files
     │
     ▼
┌─────────┐    ┌──────────┐    ┌───────────────┐
│ parser  │───▶│ scanner  │────│ vault-index   │
│   .cjs  │    │   .cjs   │    │   .json       │
└─────────┘    └──────────┘    └───────────────┘
                    │               │
                    │          ┌────┴────┐
                    │          ▼         ▼
                    │    ┌──────────┐ ┌──────────┐
                    │    │ link-map │ │ tag-index│
                    │    │  .json   │ │  .json   │
                    │    └──────────┘ └──────────┘
                    │
                    ▼
              ┌──────────┐    ┌──────────────┐
              │ embedder │───▶│ embeddings   │
              │   .cjs   │    │   .db        │
              └──────────┘    └──────────────┘

Zero-Dependency Core

The scanning engine, parser, indexer, and all core skills use only Node.js built-ins — no external packages. This means:

  • No npm install needed for core functionality
  • No ESM/CJS compatibility issues
  • No supply chain risk
  • Fast startup (~15ms full scan, ~5ms incremental)

The only optional dependency is @huggingface/transformers for semantic search embeddings, loaded via dynamic import() with graceful degradation.


Memory System

Firstbrain implements a four-layer memory architecture that gives Claude persistent context across sessions.

┌─────────────────────────────────────────────────┐
│  Layer 4: Project-Specific Memory               │
│  .claude/memory/project-{name}.md               │
│  Per-project state, decisions, blockers          │
├─────────────────────────────────────────────────┤
│  Layer 3: Long-term Summary Memory              │
│  .claude/memory/insights.md                      │
│  Distilled patterns, confidence-scored insights  │
├─────────────────────────────────────────────────┤
│  Layer 2: Working Memory                         │
│  MEMORY.md + .claude/memory/ topic files         │
│  Active projects, recent changes, priorities     │
├─────────────────────────────────────────────────┤
│  Layer 1: Session Memory                         │
│  Current conversation context                    │
│  Automatic, no persistence needed                │
└─────────────────────────────────────────────────┘
LayerPersistenceUpdates
SessionCurrent session onlyContinuous
WorkingMEMORY.md + topic filesOn significant actions
Long-terminsights.mdAfter 10+ note changes or topic density triggers
Projectproject-{name}.mdPer project interaction

Long-term insights use confidence scoring (0.0-1.0) with decay. Entries below 0.3 are pruned. Only insights >= 0.5 are surfaced to the user.


Governance

Claude's autonomy is governed by three zones:

ZoneAUTOPROPOSENEVER
ContentFix broken links, fill frontmatterEdit body text
StructureAdd note to MOC, fix MOC linksNew folders, restructure, new MOCsDelete folders
SystemUpdate memory, log to changelogModify CLAUDE.md, rules, configDelete system files

Hard boundaries (no exceptions):

  • Never delete any file
  • Never merge notes
  • Never change note body content without explicit request
  • Never rename files without explicit approval

Templates

12 templates with correct frontmatter, clean structure, and a Connections section:

TemplateTarget FolderUse Case
Project01 - Projects/Active projects with tasks and deadlines
Area02 - Areas/Life areas and ongoing responsibilities
Resource03 - Resources/Books, courses, articles, references
Tool03 - Resources/Software, services, and utilities
Zettel03 - Resources/Atomic ideas in your own words
Person03 - Resources/Contacts and network
Decision01 - Projects/Decisions with pros, cons, and outcomes
Meeting01 - Projects/Meeting notes with participants and actions
Code Snippet03 - Resources/Code with language, context, and explanation
Daily Note00 - Inbox/Daily Notes/Daily journal with task rollover
Weekly Review00 - Inbox/Weekly retrospective and planning
Monthly Review00 - Inbox/Monthly reflection and goal tracking

Recommended Plugins

PluginPurposeRequired?
DataviewAutomatic lists and tables on MOC pagesYes
TemplaterAdvanced template variables and scriptingNo
CalendarVisual calendar for Daily NotesNo

Tech Stack

ComponentTechnologyPurpose
VaultObsidian + MarkdownKnowledge storage
AI LayerClaude CodeCognitive engine (11 skills)
ScannerNode.js built-insFile parsing + indexing
EmbeddingsTransformers.js (optional)Semantic vector generation
Vector StoreSQLite (node:sqlite)Embedding storage + search
SearchCosine similarity + keyword fallbackNote discovery

Roadmap

  • v1.0 MVP — Foundation, scanning, core skills, semantic search, memory (shipped 2026-03-07)
  • v1.1 Proactive Intelligence/briefing, /triage, /synthesize, /maintain (shipped 2026-03-08)
  • v2.0 — Knowledge graph, emergent structure proposals, advanced connection intelligence

Contributing

Ideas, bugs, or new templates? See CONTRIBUTING.md.

# Fork → Clone → Branch → Commit → PR
git clone https://github.com/YOUR_USERNAME/Firstbrain.git
cd Firstbrain
git checkout -b feature/my-feature
# Make changes
git commit -m "feat: add my feature"
git push origin feature/my-feature
# Open PR on GitHub

License

CC BY-NC 4.0 — Free for personal and non-commercial use. For commercial licensing, contact the author.


Built with Obsidian + Claude Code

Related

How to Install

  1. Download the ZIP or clone the repository
  2. Open the folder as a vault in Obsidian (File → Open Vault)
  3. Obsidian will prompt you to install required plugins

Stats

Stars

11

Forks

1

License

NOASSERTION

Last updated 1mo ago

Tags

knowledge-managementmarkdownnotesobsidianpkmsecond-brainvaultzettelkasten