
Second Brain
- 2.4k installs
- 652 repo stars
- Updated April 7, 2026
- nicholasspisak/second-brain
second-brain is an agent skill that >.
About
Set up a new Obsidian knowledge base using the LLM Wiki pattern The LLM acts as librarian reading raw sources compiling them into a structured interlinked wiki and maintaining it over time Guide the user through these 5 steps Ask ONE question at a time Each step has a sensible default the user can accept it or provide their own value Ask What would you like to name your knowledge base This will be the folder name Default second brain Accept any user provided name This becomes the folder name and the title in the agent config The second brain skill documents workflows prerequisites and usage patterns grounded in its repository SKILL md Agents should follow the documented steps respect safety and permission notes and cite only capabilities described in the source It triggers on phrases matching the skill description and integrates with the agent toolchain for the tasks outlined in the documentation
- Set up a new Obsidian knowledge base with the LLM Wiki pattern. Use when
- the user wants to create a second brain, initialize a vault, set up a
- personal knowledge base, or says "onboard". Guides through an interactive
- See SKILL.md for second-brain operational details.
- See SKILL.md for second-brain operational details.
Second Brain by the numbers
- 2,351 all-time installs (skills.sh)
- +54 installs in the week ending Aug 5, 2026 (Skillselion tracking)
- Ranked #419 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
- Security screen: MEDIUM risk (skills.sh audit)
- Data as of Aug 5, 2026 (Skillselion catalog sync)
second-brain capabilities & compatibility
- Capabilities
- set up a new obsidian knowledge base with the ll · the user wants to create a second brain, initial · personal knowledge base, or says "onboard". guid · see skill.md for second brain operational detail
- Use cases
- orchestration
What second-brain says it does
Set up a new Obsidian knowledge base with the LLM Wiki pattern. Use when
the user wants to create a second brain, initialize a vault, set up a
personal knowledge base, or says "onboard". Guides through an interactive
npx skills add https://github.com/nicholasspisak/second-brain --skill second-brainAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 2.4k |
|---|---|
| repo stars | ★ 652 |
| Security audit | 2 / 3 scanners passed |
| Last updated | April 7, 2026 |
| Repository | nicholasspisak/second-brain ↗ |
What does second-brain help with and when should an agent load it?
>
Who is it for?
Developers using second-brain as documented in the skill repository.
Skip if: Skip when the task falls outside the second-brain documented scope.
When should I use this skill?
>
What you get
Agent actions aligned with the second-brain SKILL.md workflow and documented deliverables.
- CLAUDE.md vault onboarding file
- AGENTS.md with wiki schemas
- Domain tag and rule templates
Files
Second Brain — Onboarding Wizard
Set up a new Obsidian knowledge base using the LLM Wiki pattern. The LLM acts as librarian — reading raw sources, compiling them into a structured interlinked wiki, and maintaining it over time.
Wizard Flow
Guide the user through these 5 steps. Ask ONE question at a time. Each step has a sensible default — the user can accept it or provide their own value.
Step 1: Vault Name
Ask:
"What would you like to name your knowledge base? This will be the folder name."
Default: second-brainAccept any user-provided name. This becomes the folder name and the title in the agent config.
Step 2: Vault Location
Ask:
"Where should I create it? Give me a path, or I'll use the default."
Default: ~/Documents/Accept any absolute or relative path. Resolve ~ to the user's home directory. The final vault path is {location}/{vault-name}/.
Step 3: Domain / Topic
Ask:
"What's this knowledge base about? This helps me set up relevant tags and describe the vault's purpose."
>
Examples: "AI research", "competitive intelligence on fintech startups", "personal health and fitness"
Accept free text. Use this to:
- Write a one-line domain description for the agent config
- Generate 5-8 suggested domain-specific tags
Step 4: Agent Config
Auto-detect which agent is running this skill. State it clearly:
"I'm running in [Agent Name], so I'll generate a [config file] for this vault."
Then ask:
"Do you use any other AI agents you'd like config files for? Options: Claude Code, Codex, Cursor, Gemini CLI — or skip."
Skip the agent that was auto-detected. Generate configs for all selected agents.
Agent detection logic:
- If the
CLAUDE.mdconvention is being used or the Skill tool is Claude Code's → Claude Code - If the environment indicates Codex → Codex
- If
.cursor/exists in the working directory → Cursor - If
GEMINI.mdconvention is being used → Gemini CLI - If unsure, ask the user which agent they're using
Step 5: Optional CLI Tools
Ask:
"These tools extend what the LLM can do with your vault. All optional but recommended:"
>
1. summarize — summarize links, files, and media from the CLI
2. qmd — local search engine for your wiki (helpful as it grows)
3. agent-browser — browser automation for web research
>
"Install all, pick specific ones (e.g. '1 and 3'), or skip?"
Post-Wizard: Scaffold the Vault
After collecting all answers, execute these steps in order:
1. Create directory structure
Run the onboarding script, passing the full vault path:
bash <skill-directory>/scripts/onboarding.sh <vault-path>This creates all directories and the initial wiki/index.md and wiki/log.md files.
2. Generate agent config file(s)
For each selected agent, read the corresponding template from <skill-directory>/references/agent-configs/:
| Agent | Template | Output File | Output Location |
|---|---|---|---|
| Claude Code | claude-code.md | CLAUDE.md | Vault root |
| Codex | codex.md | AGENTS.md | Vault root |
| Cursor | cursor.md | second-brain.mdc | <vault>/.cursor/rules/ |
| Gemini CLI | gemini.md | GEMINI.md | Vault root |
For each template, replace the placeholders:
{{VAULT_NAME}}→ the vault name from Step 1{{DOMAIN_DESCRIPTION}}→ a one-line description derived from Step 3{{DOMAIN_TAGS}}→ generate 5-8 domain-relevant tags as a bullet list based on the domain from Step 3{{WIKI_SCHEMA}}→ read<skill-directory>/references/wiki-schema.mdand insert everything from## Architectureonward
Write the generated config to the vault.
3. Update wiki/log.md
Append the setup entry:
## [YYYY-MM-DD] setup | Vault initialized
Created vault "{{VAULT_NAME}}" for {{DOMAIN_DESCRIPTION}}.
Agent configs: {{list of generated config files}}.4. Install CLI tools (if selected)
For each tool the user selected in Step 5, run the install command:
- summarize:
npm i -g @steipete/summarize - qmd:
npm i -g @tobilu/qmd - agent-browser:
npm i -g agent-browser && agent-browser install
After each install, verify with <tool> --version. Report success or failure for each.
5. Print summary
Show the user:
1. What was created — directory tree and config files 2. Required next step — install the Obsidian Web Clipper browser extension:
Install the Obsidian Web Clipper to easily save web articles into your vault:
https://chromewebstore.google.com/detail/obsidian-web-clipper/cnjifjpddelmedmihgijeibhnjfabmlf
3. How to start — open the vault folder in Obsidian, clip an article to raw/, then run /second-brain-ingest
Reference Files
These files are bundled with this skill and available at <skill-directory>/references/:
wiki-schema.md— canonical wiki rules (single source of truth for all agent configs)tooling.md— CLI tool details, install commands, and verification stepsagent-configs/claude-code.md— CLAUDE.md templateagent-configs/codex.md— AGENTS.md templateagent-configs/cursor.md— Cursor rules templateagent-configs/gemini.md— GEMINI.md template
Next Steps
After setup is complete, the user's workflow is:
1. Clip articles to raw/ using the Obsidian Web Clipper 2. Ingest sources with /second-brain-ingest — processes raw files into wiki pages 3. Ask questions with /second-brain-query — searches and synthesizes from the wiki 4. Health-check with /second-brain-lint — run after every 10 ingests or monthly
Claude Code Agent Config Template
This template generates a CLAUDE.md file at the vault root.
Output File
- Filename:
CLAUDE.md - Location: Vault root
Template
The onboarding skill should generate a file with this structure, replacing all {{placeholder}} values with the user's wizard answers:
---
{{VAULT_NAME}}
{{DOMAIN_DESCRIPTION}}
Suggested Tags
{{DOMAIN_TAGS}}
Knowledge Base Rules
You are a librarian and wiki maintainer for a personal knowledge base. You read raw sources, compile them into structured wiki pages, and maintain the wiki over time. You never improvise structure — you follow these rules exactly.
{{WIKI_SCHEMA}}
Placeholder Definitions
{{VAULT_NAME}}— the vault name from wizard step 1{{DOMAIN_DESCRIPTION}}— the domain/topic from wizard step 3, formatted as a one-line description{{DOMAIN_TAGS}}— a bullet list of 5-8 suggested tags relevant to the domain, generated by the LLM based on the domain description{{WIKI_SCHEMA}}— the full contents ofreferences/wiki-schema.md, starting from the## Architecturesection
Codex Agent Config Template
This template generates an AGENTS.md file at the vault root.
Output File
- Filename:
AGENTS.md - Location: Vault root
Template
The onboarding skill should generate a file with this structure, replacing all {{placeholder}} values with the user's wizard answers:
---
{{VAULT_NAME}}
{{DOMAIN_DESCRIPTION}}
Suggested Tags
{{DOMAIN_TAGS}}
Knowledge Base Rules
You are a librarian and wiki maintainer for a personal knowledge base. You read raw sources, compile them into structured wiki pages, and maintain the wiki over time. You never improvise structure — you follow these rules exactly.
{{WIKI_SCHEMA}}
Placeholder Definitions
{{VAULT_NAME}}— the vault name from wizard step 1{{DOMAIN_DESCRIPTION}}— the domain/topic from wizard step 3, formatted as a one-line description{{DOMAIN_TAGS}}— a bullet list of 5-8 suggested tags relevant to the domain, generated by the LLM based on the domain description{{WIKI_SCHEMA}}— the full contents ofreferences/wiki-schema.md, starting from the## Architecturesection
Cursor Agent Config Template
This template generates a .cursor/rules/second-brain.mdc file in the vault.
Output File
- Filename:
second-brain.mdc - Location:
.cursor/rules/(relative to vault root)
Template
The onboarding skill should create the .cursor/rules/ directory if it doesn't exist, then generate a file with this structure, replacing all {{placeholder}} values with the user's wizard answers:
---
--- description: Knowledge base librarian rules for {{VAULT_NAME}} globs: alwaysApply: true ---
{{VAULT_NAME}}
{{DOMAIN_DESCRIPTION}}
Suggested Tags
{{DOMAIN_TAGS}}
Knowledge Base Rules
You are a librarian and wiki maintainer for a personal knowledge base. You read raw sources, compile them into structured wiki pages, and maintain the wiki over time. You never improvise structure — you follow these rules exactly.
{{WIKI_SCHEMA}}
Placeholder Definitions
{{VAULT_NAME}}— the vault name from wizard step 1{{DOMAIN_DESCRIPTION}}— the domain/topic from wizard step 3, formatted as a one-line description{{DOMAIN_TAGS}}— a bullet list of 5-8 suggested tags relevant to the domain, generated by the LLM based on the domain description{{WIKI_SCHEMA}}— the full contents ofreferences/wiki-schema.md, starting from the## Architecturesection
Gemini CLI Agent Config Template
This template generates a GEMINI.md file at the vault root.
Output File
- Filename:
GEMINI.md - Location: Vault root
Template
The onboarding skill should generate a file with this structure, replacing all {{placeholder}} values with the user's wizard answers:
---
{{VAULT_NAME}}
{{DOMAIN_DESCRIPTION}}
Suggested Tags
{{DOMAIN_TAGS}}
Knowledge Base Rules
You are a librarian and wiki maintainer for a personal knowledge base. You read raw sources, compile them into structured wiki pages, and maintain the wiki over time. You never improvise structure — you follow these rules exactly.
{{WIKI_SCHEMA}}
Placeholder Definitions
{{VAULT_NAME}}— the vault name from wizard step 1{{DOMAIN_DESCRIPTION}}— the domain/topic from wizard step 3, formatted as a one-line description{{DOMAIN_TAGS}}— a bullet list of 5-8 suggested tags relevant to the domain, generated by the LLM based on the domain description{{WIKI_SCHEMA}}— the full contents ofreferences/wiki-schema.md, starting from the## Architecturesection
Tooling Reference
CLI tools that extend the LLM's capabilities when working with a second-brain vault.
Required
Obsidian Web Clipper
Browser extension that saves web articles as clean markdown files directly into your vault's raw/ directory.
- Install: Chrome Web Store — https://chromewebstore.google.com/detail/obsidian-web-clipper/cnjifjpddelmedmihgijeibhnjfabmlf
- Setup: After installing, configure the default vault location to point to your vault's
raw/directory - Why required: This is the primary way to feed source material into the vault without manual copy-paste
Optional (Recommended)
summarize
Summarize turns links, files, and media into sharp summaries with a real extraction pipeline. Use the CLI for automation or the Chrome Side Panel for one-click summaries.
- Install:
npm i -g @steipete/summarize - Verify:
summarize --version - Usage:
summarize --helpfor full feature list - When to use: Summarizing web pages, PDFs, videos, or any media before or during ingestion
qmd
QMD (Query Markup Documents) is a local search engine for markdown files with hybrid BM25/vector search and LLM re-ranking, all on-device.
- Install:
npm i -g @tobilu/qmd - Verify:
qmd --version - Usage:
qmd --helpfor full feature list - When to use: When the wiki grows beyond what
wiki/index.mdcan efficiently navigate (~100+ pages)
agent-browser
Browser automation CLI for AI agents. Fast native Rust CLI. Use for web research and scraping when native web_search, web_fetch, or computer use tools fail.
- Install:
npm i -g agent-browser && agent-browser install - Verify:
agent-browser --version - Usage:
agent-browser --helpfor full feature list - When to use: Web research tasks where built-in tools fail or return incomplete results
Wiki Schema
Canonical rules for LLM-maintained knowledge base wikis. This is the single source of truth — agent config templates pull from this document.
Architecture
Three directories, three roles:
- raw/ — immutable source documents. The LLM reads from here but NEVER modifies these files.
- wiki/ — the LLM's workspace. Create, update, and maintain all files here.
- output/ — reports, query results, and generated artifacts go here.
Wiki subdirectories:
wiki/sources/— one summary page per ingested sourcewiki/entities/— pages for people, organizations, products, toolswiki/concepts/— pages for ideas, frameworks, theories, patternswiki/synthesis/— comparisons, analyses, cross-cutting themes
Two special files:
wiki/index.md— master catalog of every wiki page, organized by category. Update on every ingest.wiki/log.md— append-only chronological record. Never edit existing entries.
Page Format
Every wiki page MUST include YAML frontmatter:
--- tags: [tag1, tag2] sources: [source-filename-1.md, source-filename-2.md] created: YYYY-MM-DD updated: YYYY-MM-DD ---
Use [[wikilink]] syntax for all internal links. When you mention a concept, entity, or source that has its own page, link it.
Operations
Ingest (processing a new source)
When the user adds a file to raw/ and asks you to process it:
1. Read the source completely 2. Discuss key takeaways with the user 3. Create a source summary page in wiki/sources/ with: title, source metadata, key claims, and a structured summary 4. Identify all entities and concepts mentioned. For each:
- If a wiki page exists: update it with new information from this source, noting the source
- If no wiki page exists: create one in the appropriate subdirectory
5. Add [[wikilinks]] between all related pages 6. Update wiki/index.md with any new pages 7. Append to wiki/log.md: ## [YYYY-MM-DD] ingest | Source Title
A single source may touch 10-15 wiki pages. That is normal.
Query (answering questions)
When the user asks a question:
1. Read wiki/index.md to find relevant pages 2. Read the relevant wiki pages 3. Synthesize an answer with [[wikilink]] citations to wiki pages 4. If the answer produces a valuable artifact (comparison, analysis, new connection), offer to save it as a new page in wiki/synthesis/ 5. If you save a new page, update the index and log
Lint (health check)
When the user asks you to lint or health-check the wiki:
1. Scan for contradictions between pages 2. Find stale claims that newer sources have superseded 3. Identify orphan pages (no inbound links) 4. Find important concepts mentioned but lacking their own page 5. Check for missing cross-references 6. Suggest data gaps that could be filled with a web search 7. Report findings and offer to fix issues 8. Log the lint pass: ## [YYYY-MM-DD] lint | Summary of findings
Index Format
Each entry in wiki/index.md is one line:
- [[Page Name]] — one-line summary
Organized under category headers: Sources, Entities, Concepts, Synthesis.
Log Format
Each entry in wiki/log.md:
[YYYY-MM-DD] operation | Title
Brief description of what was done.
Page Naming
Filenames use kebab-case with .md extension. Page titles inside the file use Title Case.
- Source pages:
wiki/sources/article-title-here.md→# Article Title Here - Entity pages:
wiki/entities/entity-name.md→# Entity Name - Concept pages:
wiki/concepts/concept-name.md→# Concept Name - Synthesis pages:
wiki/synthesis/comparison-topic.md→# Comparison Topic
When creating [[wikilinks]], use the page title (Title Case), not the filename:
- Correct:
[[Entity Name]] - Wrong:
[[entity-name]]
To slugify a title into a filename: lowercase, replace spaces with hyphens, remove special characters, trim to reasonable length.
Image Handling
Web-clipped articles often include images. Handle them as follows:
1. Download images locally. In Obsidian Settings → Files and links, set "Attachment folder path" to raw/assets/. Then use "Download attachments for current file" (bind it to a hotkey like Ctrl+Shift+D) after clipping an article. 2. Reference images from wiki pages using standard markdown: . Keep the image in raw/assets/ — never copy images into wiki/. 3. During ingestion, note any images in the source. If an image contains important information (diagrams, charts, data), describe its contents in the wiki page so the knowledge is captured in text form.
Lint Frequency
Run a lint pass (/second-brain-lint) on this schedule:
- After every 10 ingests — catches cross-reference gaps while they're fresh
- Monthly at minimum — catches stale claims and orphan pages that accumulate over time
- Before any major query or synthesis — ensures the wiki is healthy before you rely on it for analysis
Tools
You have access to these CLI tools — use them when appropriate:
- summarize — summarize links, files, and media. Run
summarize --helpfor usage. - qmd — local search engine for markdown files. Run
qmd --helpfor usage. Use when the wiki grows beyond what index.md can efficiently navigate. - agent-browser — browser automation for web research. Use when web_search or web_fetch fail.
Rules
1. Never modify files in raw/. They are immutable source material. 2. Always update wiki/index.md when you create or delete a page. 3. Always append to wiki/log.md when you perform an operation. 4. Use [[wikilinks]] for all internal references. Never use raw file paths in page content. 5. Every wiki page must have YAML frontmatter with tags, sources, created, and updated fields. 6. When new information contradicts existing wiki content, update the wiki page and note the contradiction with both sources cited. 7. Keep source summary pages factual. Save interpretation and synthesis for concept and synthesis pages. 8. When asked a question, search the wiki first. Only go to raw sources if the wiki doesn't have the answer. 9. Prefer updating existing pages over creating new ones. Only create a new page when the topic is distinct enough to warrant it. 10. Keep wiki/index.md concise — one line per page, under 120 characters per entry.
#!/bin/bash
set -e
# Second Brain — Onboarding Script
# Scaffolds vault directory structure and verifies CLI tooling.
#
# Usage: bash onboarding.sh <vault-path>
# Output: JSON summary to stdout. Progress messages to stderr.
VAULT_ROOT="${1:-.}"
echo "=== Second Brain Onboarding ===" >&2
# 1. Create directory structure
echo "Creating directory structure..." >&2
mkdir -p "$VAULT_ROOT/raw/assets"
mkdir -p "$VAULT_ROOT/wiki/sources"
mkdir -p "$VAULT_ROOT/wiki/entities"
mkdir -p "$VAULT_ROOT/wiki/concepts"
mkdir -p "$VAULT_ROOT/wiki/synthesis"
mkdir -p "$VAULT_ROOT/output"
# 2. Create wiki/index.md if it doesn't exist
if [ ! -f "$VAULT_ROOT/wiki/index.md" ]; then
cat > "$VAULT_ROOT/wiki/index.md" << 'EOF'
# Index
Master catalog of all wiki pages. Updated on every ingest.
## Sources
## Entities
## Concepts
## Synthesis
EOF
echo "Created wiki/index.md" >&2
else
echo "wiki/index.md already exists, skipping" >&2
fi
# 3. Create wiki/log.md if it doesn't exist
if [ ! -f "$VAULT_ROOT/wiki/log.md" ]; then
cat > "$VAULT_ROOT/wiki/log.md" << 'EOF'
# Log
Chronological record of all operations.
EOF
echo "Created wiki/log.md" >&2
else
echo "wiki/log.md already exists, skipping" >&2
fi
# 4. Check tooling
echo "" >&2
echo "Checking tooling..." >&2
TOOLS_JSON="[]"
check_tool() {
local name="$1"
local cmd="$2"
local install_cmd="$3"
local status="missing"
if command -v "$cmd" &> /dev/null; then
status="installed"
echo " [ok] $name" >&2
else
echo " [missing] $name — install with: $install_cmd" >&2
fi
TOOLS_JSON=$(echo "$TOOLS_JSON" | python3 -c "
import sys, json
tools = json.load(sys.stdin)
tools.append({'name': '$name', 'status': '$status', 'install': '$install_cmd'})
print(json.dumps(tools))
" 2>/dev/null || echo "$TOOLS_JSON")
}
check_tool "summarize" "summarize" "npm i -g @steipete/summarize"
check_tool "qmd" "qmd" "npm i -g @tobilu/qmd"
check_tool "agent-browser" "agent-browser" "npm i -g agent-browser && agent-browser install"
echo "" >&2
echo "Onboarding complete." >&2
# 5. Output JSON result to stdout
VAULT_ABS=$(cd "$VAULT_ROOT" && pwd)
cat << JSONEOF
{
"status": "complete",
"vault_root": "$VAULT_ABS",
"directories": [
"raw/",
"raw/assets/",
"wiki/",
"wiki/sources/",
"wiki/entities/",
"wiki/concepts/",
"wiki/synthesis/",
"output/"
],
"files": [
"wiki/index.md",
"wiki/log.md"
],
"tools": $TOOLS_JSON
}
JSONEOF
Related skills
How it compares
Use second-brain to scaffold agent onboarding for a new personal vault; use general CLAUDE.md editing when you only need minor config tweaks without wiki schema generation.
FAQ
What is second-brain?
>
When should I use second-brain?
>
Is second-brain safe to install?
Review the Security Audits panel on this page before installing in production.