From productionos
Scaffold and wire a persistent SecondBrain (Obsidian vault + LLM wiki) for cross-session knowledge management. Creates PARA structure, wiki domains/entities/concepts, cross-project references, and RAG integration. Runs once per user, then the wiki compounds over time. Triggers on: "setup secondbrain", "create knowledge base", "setup wiki", "persistent memory", "second brain", "/setup-secondbrain".
npx claudepluginhub shaheerkhawaja/productionos --plugin productionosThis skill uses the workspace's default tool permissions.
Scaffold a SecondBrain vault that persists knowledge across all Claude Code sessions and projects. Uses the PARA method (Projects, Areas, Resources, Archive) combined with an LLM-powered wiki layer.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Guides agent creation for Claude Code plugins with file templates, frontmatter specs (name, description, model), triggering examples, system prompts, and best practices.
Scaffold a SecondBrain vault that persists knowledge across all Claude Code sessions and projects. Uses the PARA method (Projects, Areas, Resources, Archive) combined with an LLM-powered wiki layer.
The wiki is the product. Chat is just the interface.
git available (for vault version control)Ask the user these questions (one at a time, adapt based on answers):
~/SecondBrainDerive user identity from git config (NEVER hardcode):
USERNAME=$(git config --global user.name 2>/dev/null || echo "User")
EMAIL=$(git config --global user.email 2>/dev/null || echo "")
$VAULT_PATH/
.raw/ # Immutable source documents (hidden in Obsidian)
.obsidian/ # Obsidian config
snippets/
wiki/ # LLM-generated knowledge base
index.md # Master catalog
log.md # Chronological operation log
hot.md # Hot cache (~500 words, recent context)
overview.md # Executive summary
sources/ # One summary per raw source
entities/ # Products, people, orgs, repos
_index.md
concepts/ # Patterns, frameworks, mental models
_index.md
domains/ # Top-level topic areas
_index.md
comparisons/ # Side-by-side analyses
questions/ # Filed answers
meta/ # Dashboards, lint reports
00-Inbox/ # PARA: temporary capture
01-Projects/ # PARA: active initiatives (one folder per project)
02-Areas/ # PARA: ongoing responsibilities
03-Resources/ # PARA: reference materials
04-Archive/ # PARA: completed/inactive
05-Templates/ # Note templates
Daily/ # Daily notes
Sessions/ # Claude Code session logs
Handoffs/ # Session handoff documents
_attachments/ # Images, PDFs
Use this template (substitute user values):
# $VAULT_NAME: LLM Wiki + PARA Second Brain
Mode: D (Personal) + C (Business)
Purpose: Persistent knowledge base for $USERNAME
Owner: $USERNAME
Created: $TODAY
## Structure
[paste folder map]
## Conventions
- All notes use YAML frontmatter: type, status, created, updated, tags (minimum)
- Wikilinks use [[Note Name]] format: filenames are unique, no paths needed
- .raw/ contains source documents: never modify them
- wiki/index.md is the master catalog: update on every ingest
- wiki/log.md is append-only: never edit past entries
- New log entries go at the TOP of the file
## Operations
- Ingest: drop source in .raw/, say "ingest [filename]"
- Query: ask any question -- Claude reads index first, then drills in
- Lint: say "lint the wiki" to run a health check
- Save: "/save" to file current conversation as a wiki note
For each domain the user listed, create wiki/domains/<slug>.md:
---
type: domain
title: "$DOMAIN_NAME"
created: $TODAY
updated: $TODAY
tags: [domain, $TAG1, $TAG2]
status: active
---
# $DOMAIN_NAME
[User's description]
## Products
- [[Product 1]] -- description
- [[Product 2]] -- description
## Key Architecture
[Populated from user's answers or left as TODO]
For each project/product, create wiki/entities/<slug>.md:
---
type: entity
title: "$ENTITY_NAME"
created: $TODAY
updated: $TODAY
tags: [entity, product, $TAG1]
status: active
entity_type: product
---
# $ENTITY_NAME
## Overview
| Field | Value |
|-------|-------|
| Repo | $REPO_PATH |
| Stack | $STACK |
| Domain | [[$DOMAIN]] |
| Status | $STATUS |
02-Areas/<area>.md for each ongoing responsibility03-Resources/<resource>.md for reference materials01-Projects/<project>/ folder for each active projectCreate 05-Templates/ with: entity.md, concept.md, domain.md, source.md, question.md, comparison.md, daily-note.md, session-log.md, handoff.md, research-note.md, project.md
For EACH project that has a CLAUDE.md, append:
## Wiki Knowledge Base
Path: $VAULT_PATH
When you need context not already in this project:
1. Read wiki/hot.md first (recent context, ~500 words)
2. If not enough, read wiki/index.md (full catalog)
3. If you need domain specifics, read wiki/domains/<relevant-domain>.md
4. Only then read individual wiki pages
Do NOT read the wiki for:
- General coding questions or language syntax
- Things already in this project's files or conversation
- Tasks unrelated to the current project
Register the vault path in ProductionOS config:
# In ~/.productionos/config/settings.json
{
"secondbrain_path": "$VAULT_PATH",
"secondbrain_auto_session_log": true,
"secondbrain_hot_cache_update": "session_end"
}
Update stop-session-handoff.sh to:
$VAULT_PATH/Sessions/wiki/hot.md ONLY if session produced meaningful work (>3 commits or >5 file edits)$VAULT_PATH/Handoffs/cd $VAULT_PATH
git init
echo ".obsidian/workspace.json" >> .gitignore
echo ".obsidian/cache/" >> .gitignore
echo ".trash/" >> .gitignore
git add -A
git commit -m "chore: scaffold SecondBrain vault"
Run these checks:
Report results as pass/fail table.
After initial scaffold, the wiki grows through:
.raw/, say "ingest [filename]"wiki/questions/git config, not hardcoded values.gitignore excludes workspace state and cache