second-brain

Capture, compile, query, and lint a markdown-based personal knowledge vault.

Updated Aug 13, 2026
One-click install
npx skills add https://github.com/imMamdouhaboammar/marketing-skills --skill second-brain-immamdouhaboammar
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: second-brain
Source: https://github.com/imMamdouhaboammar/marketing-skills/tree/main/skills/second-brain
Command: npx skills add https://github.com/imMamdouhaboammar/marketing-skills --skill second-brain-immamdouhaboammar

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Personal knowledge scattered across articles, highlights, and notes becomes unusable when it is never processed into a connected, searchable knowledge base. This Skill automates the capture-to-compilation workflow for an Obsidian or markdown vault so raw sources become interlinked wiki pages. ## Core Features & Use Cases - Capture and Compile: Save URLs, text, and files into a typed raw/ folder, then compile unprocessed sources into interlinked wiki/ topic pages with an updated INDEX.md. - Query and Search: Answer questions using only your personal wiki corpus with citations, saving results to outputs/, or run quick grep-style lookups. - Lint and Connect: Detect orphan pages, stale content, unprocessed raw files, contradictions, and suggest missing wikilinks between related pages. - Use Case: After saving a dozen articles on longevity into raw/, run compile to merge them into existing wiki pages, then query "what does my brain say about microplastics detox" to get a cited answer saved as an output artifact. ## Quick Start Ask the agent to capture this article into my second brain and then compile the wiki to process my unprocessed raw notes.

Frequently Asked Questions about second-brain

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a second brain with Obsidian and AI?

Organize the vault into three layers: raw/ for unprocessed sources, wiki/ for AI-compiled interlinked topic pages, and outputs/ for generated artifacts. Capture sources with type-prefixed filenames, then periodically compile them into wiki pages linked via wikilinks and indexed in INDEX.md.

How do I query my personal notes with an AI agent?

Run the query mode with a question; the agent reads wiki/INDEX.md, loads relevant pages, traverses wikilinks one to two hops, and composes a cited answer. The result is saved to outputs/ with the question, answer, and list of pages consulted.

Does this work with vaults other than Obsidian?

Yes, the design is tool-agnostic and works with any markdown-based vault. The vault path defaults to $HOME/Documents/SecondBrain but can be overridden with the SECOND_BRAIN_VAULT environment variable, and the schema is read from the vault's own CLAUDE.md.

What is the difference between capture and compile modes?

Capture is fast intake: it saves a URL, text, or file into raw/ with a type prefix and metadata, without touching the wiki. Compile is a separate deliberate pass that processes unprocessed raw files into interlinked wiki topic pages and updates INDEX.md.

Why are my wiki pages becoming orphaned or stale?

Orphans occur when pages are missing from INDEX.md or lack wikilinks to other pages, and staleness occurs when sources are over six months old in volatile topics. Run the lint mode to detect orphans, unprocessed raw files, contradictions, and topic gaps.