claude-second-brain 1.0.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "claude-second-brain",
3
- "version": "1.0.0",
4
- "description": "The fastest way to start your personal knowledge base powered by Obsidian, Claude Code, qmd, and GitHub.",
3
+ "version": "1.2.0",
4
+ "description": "The fastest way to start your personal knowledge base powered by Obsidian, any AI coding agent (Claude Code, Codex, Cursor, Copilot, …), qmd, and git.",
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "claude-second-brain": "./bin/create.js",
@@ -0,0 +1,9 @@
1
+ # AGENTS.md
2
+
3
+ This vault is a personal knowledge wiki maintained by an AI agent. The full schema and operating instructions live in [`CLAUDE.md`](./CLAUDE.md) — they apply to every agent, not just Claude.
4
+
5
+ **Before doing any wiki work, read `CLAUDE.md` and follow it exactly.** In particular:
6
+
7
+ - Never modify anything in `raw-sources/`.
8
+ - The wiki lives only in `wiki/`; always append to `wiki/log.md`, never overwrite it.
9
+ - Use the ingest, query and lint workflows defined there (also available as the `brain-ingest`, `brain-search`, `lint`, `brain-refresh` and `brain-rebuild` skills).
@@ -4,7 +4,7 @@ built using [claude-second-brain](https://github.com/jessepinkman9900/claude-sec
4
4
 
5
5
  **Your notes don't compound. This wiki does.**
6
6
 
7
- Drop in a source. Claude reads it, extracts what matters, cross-links it to everything you already know, and files it. Query it six months later and get cited answers — not a list of files to re-read.
7
+ Drop in a source. Your agent reads it, extracts what matters, cross-links it to everything you already know, and files it. Query it six months later and get cited answers — not a list of files to re-read.
8
8
 
9
9
  Inspired by [Andrej Karpathy's approach to LLM-powered knowledge management](https://x.com/karpathy/status/2040470801506541998?s=20).
10
10
 
@@ -16,8 +16,8 @@ Inspired by [Andrej Karpathy's approach to LLM-powered knowledge management](htt
16
16
  # 1. Generate vector embeddings (first run downloads ~2GB of GGUF models — once per machine)
17
17
  pnpm qmd:reindex
18
18
 
19
- # 2. Open Claude Code
20
- claude
19
+ # 2. Open your agent in this folder (Claude Code, Codex, Cursor, Copilot, …)
20
+ claude # or: codex, cursor ., gemini, opencode, …
21
21
  ```
22
22
 
23
23
  qmd collections are already registered by the CLI during scaffolding — `pnpm qmd:reindex` just needs to build the index.
@@ -26,13 +26,13 @@ qmd collections are already registered by the CLI during scaffolding — `pnpm q
26
26
 
27
27
  ---
28
28
 
29
- ## Your Claude Code skills
29
+ ## Your agent skills
30
30
 
31
31
  ### Daily workflow
32
32
 
33
- **`/brain-ingest`** — Add a file to `raw-sources/articles/`, `raw-sources/pdfs/`, or `raw-sources/personal/`, then run `/brain-ingest`. Claude summarizes the source, asks what aspects matter most, updates related wiki pages, flags contradictions, and logs everything.
33
+ **`/brain-ingest`** — Add a file to `raw-sources/articles/`, `raw-sources/pdfs/`, or `raw-sources/personal/`, then run `/brain-ingest`. Your agent summarizes the source, asks what aspects matter most, updates related wiki pages, flags contradictions, and logs everything.
34
34
 
35
- **`/brain-search`** — Ask anything: `what do I know about [topic]?` Claude searches the wiki semantically and returns a cited answer. If it synthesizes multiple pages in a useful way, it offers to file it as a permanent `wiki/qa/` entry.
35
+ **`/brain-search`** — Ask anything: `what do I know about [topic]?` Your agent searches the wiki semantically and returns a cited answer. If it synthesizes multiple pages in a useful way, it offers to file it as a permanent `wiki/qa/` entry.
36
36
 
37
37
  **`/lint`** — Health-check the wiki. Finds orphan pages, broken links, unresolved contradictions, and data gaps. Reports findings and fixes what it can.
38
38
 
@@ -46,7 +46,7 @@ qmd collections are already registered by the CLI during scaffolding — `pnpm q
46
46
 
47
47
  ## How it works
48
48
 
49
- Sources flow in on the left, Claude synthesizes them into the wiki, qmd indexes every page into a local hybrid search index, and GitHub makes the whole vault editable from Obsidian and Claude Code on any device.
49
+ Sources flow in on the left, your agent synthesizes them into the wiki, qmd indexes every page into a local hybrid search index, and git makes the whole vault editable from Obsidian and your agent on any device.
50
50
 
51
51
  ```mermaid
52
52
  flowchart TB
@@ -57,7 +57,7 @@ flowchart TB
57
57
  S3[personal/]
58
58
  end
59
59
 
60
- subgraph Skills["Claude Code skills"]
60
+ subgraph Skills["Agent skills"]
61
61
  direction LR
62
62
  I["/brain-ingest"]
63
63
  Q["/brain-search"]
@@ -74,14 +74,14 @@ flowchart TB
74
74
 
75
75
  QMD[("qmd.sqlite<br/>vector + BM25<br/>hybrid index")]
76
76
 
77
- subgraph Remote["GitHub — source of truth"]
77
+ subgraph Remote["Git remote — source of truth"]
78
78
  GH[private repo]
79
79
  end
80
80
 
81
81
  subgraph Read["Read / edit anywhere"]
82
82
  direction LR
83
83
  OB["Obsidian<br/>graph · backlinks · mobile"]
84
- CC["Claude Code<br/>desktop + mobile"]
84
+ CC["Your agent<br/>desktop, web + mobile"]
85
85
  end
86
86
 
87
87
  User((you))
@@ -127,12 +127,12 @@ All pages cross-link with Obsidian `[[wikilinks]]`. Contradictions are flagged w
127
127
 
128
128
  ```
129
129
  claude-second-brain/
130
- ├── CLAUDE.md ← The schema. Claude reads this every session.
131
- ├── raw-sources/ ← Your raw inputs. Claude never modifies these.
130
+ ├── CLAUDE.md ← The schema. Your agent reads this every session.
131
+ ├── raw-sources/ ← Your raw inputs. The agent never modifies these.
132
132
  │ ├── articles/ ← Web articles saved as markdown
133
133
  │ ├── pdfs/ ← PDFs or extracted text
134
134
  │ └── personal/ ← Brain dumps, rough notes
135
- ├── wiki/ ← Claude owns this entirely.
135
+ ├── wiki/ ← The agent owns this entirely.
136
136
  │ ├── index.md ← Master index
137
137
  │ ├── log.md ← Append-only activity log
138
138
  │ ├── overview.md ← Evolving synthesis
@@ -145,7 +145,13 @@ claude-second-brain/
145
145
 
146
146
  ## Installing and updating skills
147
147
 
148
- Skills are slash commands Claude Code loads from `.claude/skills/[name]/SKILL.md` in this vault. The wiki ships with `/brain-ingest`, `/brain-search`, `/brain-refresh`, `/brain-rebuild`, and `/lint` pre-installed.
148
+ Skills are [Agent Skills](https://agentskills.io) — `SKILL.md` folders your agent loads (slash commands in Claude Code). Claude Code reads them from `.claude/skills/`; Codex, Cursor, Copilot and others read `.agents/skills/`. The wiki ships with `/brain-ingest`, `/brain-search`, `/brain-refresh`, `/brain-rebuild`, and `/lint` pre-installed.
149
+
150
+ They follow the [Agent Skills](https://agentskills.io/specification) format, so other agents can use them too. The global skills (`/brain-ingest`, `/brain-search`, `/brain-refresh`) live in `~/.agents/skills/`, with symlinks from agent-specific folders such as `~/.claude/skills/`. The vault-local skills (`/brain-rebuild`, `/lint`) are copied into `.agents/skills/` (and other agent folders) for each agent you picked at setup. To add an agent later:
151
+
152
+ ```bash
153
+ npx claude-second-brain skills --agent codex,cursor
154
+ ```
149
155
 
150
156
  ### Update built-in wiki skills
151
157
 
@@ -175,19 +181,26 @@ After a bulk ingest session, re-index to keep search current:
175
181
  /brain-refresh
176
182
  ```
177
183
 
178
- This wraps `pnpm qmd:reindex` — you can also run that command directly if you're not inside Claude Code. Pass `force` to `/brain-refresh` to re-embed every chunk (e.g. after changing the embedding model).
184
+ This wraps `pnpm qmd:reindex` — you can also run that command directly if you're not inside an agent. Pass `force` to `/brain-refresh` to re-embed every chunk (e.g. after changing the embedding model).
179
185
 
180
186
  ---
181
187
 
182
188
  ## Managing brains
183
189
 
184
- From anywhere:
190
+ From anywhere (`csb` is the short alias — use `npx claude-second-brain` if not installed globally):
185
191
 
186
192
  ```bash
187
- npx claude-second-brain ls # list all brains
188
- npx claude-second-brain rm <name> # remove a brain
193
+ csb ls # list all brains (default marked with *)
194
+ csb use <name> # switch the default brain
195
+ csb rm <name> # remove a brain
196
+ csb path qmd # print the default brain's qmd index
197
+ csb qmd query -c wiki "<terms>" # run qmd against the default brain
198
+ csb exec -- pnpm qmd:reindex # run any command inside the default brain
199
+ csb doctor # verify tools, config, and each brain
189
200
  ```
190
201
 
202
+ Run `csb help <command>` (or `csb <command> --help`) for per-command details.
203
+
191
204
  ---
192
205
 
193
206
  ## License