From agents
Create, repair, query, audit, and migrate Obsidian-native knowledge bases with layered raw/wiki structure, provenance, indexes, logs, and safe vault overhauls. Use for git-friendly KBs and persistent llm-wiki-style vaults. NOT for docs sites or generic notes.
npx claudepluginhub wyattowalsh/agents --plugin agentsThis skill uses the workspace's default tool permissions.
Build, query, and maintain Obsidian-native, git-friendly, agent-managed knowledge bases that separate raw evidence from synthesized wiki knowledge. Nerdbot is for layered KBs with provenance, indexes, schema/config, shared vault conventions, and append-only activity logging.
assets/activity-log-template.mdassets/comparison-page-template.mdassets/concept-page-template.mdassets/entity-page-template.mdassets/kb-bootstrap-template.mdassets/overview-page-template.mdassets/source-summary-template.mdevals/audit-mode.jsonevals/derive-mode.jsonevals/empty-args-headless.jsonevals/enrich-mode.jsonevals/evals.jsonevals/explicit-invocation.jsonevals/generic-notes-negative-control.jsonevals/implicit-trigger.jsonevals/improve-mode.jsonevals/ingest-mode.jsonevals/large-source-stub-ingest.jsonevals/migrate-safety.jsonevals/missing-reference-fallback.jsonCreates isolated Git worktrees for feature branches with prioritized directory selection, gitignore safety checks, auto project setup for Node/Python/Rust/Go, and baseline verification.
Executes implementation plans in current session by dispatching fresh subagents per independent task, with two-stage reviews: spec compliance then code quality.
Dispatches parallel agents to independently tackle 2+ tasks like separate test failures or subsystems without shared state or dependencies.
Build, query, and maintain Obsidian-native, git-friendly, agent-managed knowledge bases that separate raw evidence from synthesized wiki knowledge. Nerdbot is for layered KBs with provenance, indexes, schema/config, shared vault conventions, and append-only activity logging.
NOT for: freeform note-taking, docs site maintenance (docs-steward), database-backed knowledge systems (database-architect), or one-off research that does not maintain a repository (research).
Input: $ARGUMENTS — mode keywords, topics, repo paths, or natural-language KB requests.
$ARGUMENTS | Workflow | First move |
|---|---|---|
| (empty) | Interview | Show mode menu; if headless, run inventory-only planning and do not mutate files |
create <topic> | Create | Establish an Obsidian-native KB root, layered structure, shared vault surfaces, starter indexes, and activity log |
ingest <source-or-path> | Ingest | Add sources to raw/, preserve originals, then update indexes and provenance stubs |
enrich <page-or-topic> | Enrich | Improve wiki/ pages from raw or canonical inputs with traceable synthesis |
audit [path] | Audit | Run inventory + lint read-only; report structure, provenance, and drift findings |
query <question-or-topic> | Query | Answer from wiki/ + indexes/ first, inspect raw/ only to verify citations or confirm gaps, and stay read-only |
derive <artifact-or-target> | Derive | Generate reproducible outputs from the current KB without replacing canonical material |
improve <path> | Existing repo | Start with inventory-first, Obsidian-native overhaul planning before any expansion or refinement |
migrate <path-or-scope> | Migration | Run the risky-change interview + inversion before any move, rename, cutover, or replacement |
| Natural language: "create a knowledge base / vault for ..." | Create | Treat the remainder as topic and scope; default to an Obsidian-native vault |
| Natural language: "ingest/import these sources" | Ingest | Route sources into raw/ and update indexes |
| Natural language: "improve/fix this knowledge base/repo/vault" | Existing repo | Start with a read-only inventory, vault classification, and additive-first repair plan |
| Natural language: "query/search/ask this KB/wiki/vault about ..." | Query | Read maintained wiki/ + indexes/, answer with provenance, and recommend enrich or ingest if the KB has a gap |
Natural language mentioning Obsidian, vault, .obsidian, [[wikilinks]], embeds, or Dataview | Create / Existing repo / Audit | Route to the matching workflow with Obsidian-native assumptions turned on |
| Natural language: "audit/lint/check the knowledge base" | Audit | Stay read-only unless the user explicitly asks for fixes |
| Requests for generic notes or docs-site work | Refuse + redirect | Redirect to the correct workflow or specialized skill |
Present this menu:
raw/wiki/ pagesIf clarifying exchange is unavailable, default to inventory-only planning with no destructive changes.
[[wikilinks]], embeds, aliases, and shared .obsidian/ surfaces before deeper synthesis.obsidian/ that should stay user-localUse these terms exactly throughout:
| Term | Meaning | Default rule |
|---|---|---|
raw | Source captures, imports, transcripts, extracts, and normalized evidence | Append-only; preserve source metadata and originals |
wiki | Synthesized markdown knowledge for humans and agents | Every substantive claim traces to raw or declared canonical material |
schema | Structural contracts: naming, frontmatter, required fields, taxonomies | Change deliberately and version consciously |
config | Operational settings for ingest, derive, lint, or publish flows | Keep separate from content |
indexes | Coverage maps, navigation pages, source-to-page maps, inventories | Update in the same batch as related content changes |
activity log | Append-only record of decisions, mutations, imports, and known gaps | Update after every mutating batch |
provenance | Trace from a wiki or derived claim back to raw evidence | Mandatory for enrich and derive flows |
canonical material | User-authored pages or files that remain authoritative | Preserve unless explicitly told to rewrite, move, or delete |
derived output | Rebuildable exports generated from the KB | Never treat as the sole source of truth |
imperfect repo | Existing repo with mixed docs, partial layers, or unclear ownership | Use inventory-first, additive-first repair |
migration | Move, rename, replace, or cut over existing KB structure | Requires interview + explicit approval |
vault | The Obsidian-facing working surface around the KB, including note syntax and shared .obsidian/ conventions | Default to Obsidian-native note shapes for create and improve |
shared vault config | Project-safe .obsidian/ surfaces such as templates, snippets, and documented shared conventions | Manage deliberately; do not mix with volatile workspace state |
Dataview metadata | YAML fields such as tags, aliases, kind, status, updated, and source_count | Keep consistent across maintained wiki pages |
Teach and prefer this layered shape unless the repository has a stronger existing convention:
<kb-root>/
.obsidian/
templates/
snippets/
raw/
assets/
sources/
captures/
extracts/
wiki/
index.md
topics/
schema/
config/
obsidian-vault.md
indexes/
coverage.md
source-map.md
activity/
log.md
Notes:
raw/ stores evidence, including downloaded assets when they materially support the KB.wiki/ stores synthesis, schema/ + config/ store contracts, indexes/ stores navigational and coverage maps, and activity/ stores the append-only operating history..obsidian/ is part of the working surface when the repo is a vault. Manage shared templates and snippets there, but keep volatile workspace state out of scope by default.Use gates for every multi-step flow. Stop at the first blocked gate.
| Gate | Goal | Output |
|---|---|---|
| Gate 0 — Classify | Decide whether this is Create, Ingest, Enrich, Audit, Query, Derive, Existing repo, or Migration | Safe workflow selection |
| Gate 1 — Inventory | Map layers, canonical material, vault state, source surfaces, risky paths, and existing automation | Read-only inventory |
| Gate 2 — Plan | Propose the smallest additive, reviewable batch or migration plan | File-level plan with explicit non-goals |
| Gate 3 — Confirm | Require approval for destructive or high-impact changes | Approval or downgrade to plan-only |
| Gate 4 — Execute | Change one layer at a time: raw -> wiki -> indexes -> activity | Small reviewable edit set |
| Gate 5 — Verify | Check provenance, index freshness, schema/config consistency, and activity logging | Lint/audit results |
| Gate 6 — Handoff | Record next steps, unresolved gaps, and missing dependencies | Activity-log entry + follow-up plan |
For Query, stop after Gate 2 unless the user explicitly asks to turn a KB gap into enrich, ingest, or derive work.
Use when the user wants a new KB for a topic or scope.
references/kb-architecture.md first.references/obsidian-vaults.md before choosing note metadata, link style, or shared vault conventions..obsidian/, raw/, wiki/, schema/, config/, indexes/, and activity/.scripts/kb_bootstrap.py, or copy the manual starter packet in assets/kb-bootstrap-template.md.Use when sources already exist and the KB needs trustworthy evidence capture.
raw/; add normalized extracts beside them, not instead of them. For sources over 50 MB, a raw/ pointer or stub that records checksum, size, original location, and import notes is acceptable when vendoring the binary into git is impractical.raw/assets/ when local files or clipped media support the source.raw/.Use when wiki/ needs new or improved synthesized pages.
references/kb-operations.md and references/page-templates.md before creating new page shapes.references/obsidian-vaults.md when choosing frontmatter, [[wikilink]] usage, aliases, embeds, or Dataview metadata.raw/ or explicitly identified canonical material only.Use for read-only diagnosis, linting, and confidence checks.
[[wikilinks]], broken embeds, alias collisions, and .obsidian/ shared-surface drift.scripts/kb_lint.py --root <path> --include-unlayered when the repo mixes KB files with adjacent markdown that still participates in the knowledge graph.Use when the user wants an answer from the maintained KB without mutating it.
references/kb-architecture.md first.wiki/ and indexes/ first; inspect raw/ only to verify citations or confirm that the KB still has a gap.[[wikilinks]], provenance references, and an explicit confidence level.answered, partial, or gap.enrich, ingest, or derive) instead of mutating content during query.Use when the user wants generated artifacts from the maintained KB.
raw/, wiki/, schema/, and config/ without replacing them.activity/.Use when the repo already contains notes, docs, or a partial KB and the safe path is not obvious.
obsidian_native_vault, mixed_vault, or legacy_markdown_repo..obsidian/ surfaces, and volatile editor-state files.Use this pattern for any rename, move, replace, re-root, or cutover.
Even when the user explicitly says migrate, do a quick additive-repair check first. If a small in-place repair cannot satisfy the request, continue into the interview instead of forcing a full repair pass before migration planning.
Ask or determine:
Assume the migration will fail in the most likely ways, then design against them:
| Failure to prevent | Safe response |
|---|---|
| Canonical material gets overwritten | Preserve originals and write companion pages or stubs instead |
| Links and agent references break | Add indexes, aliases, redirects, mapping pages, and stable note names before cutover |
| Provenance becomes unverifiable | Capture raw evidence and source maps before restructuring wiki pages |
| Schema/config change invalidates pages | Stage compatibility updates and lint before switching defaults |
| Dataview queries or Obsidian navigation drift | Normalize frontmatter, aliases, and [[wikilinks]] in the same batch as note moves |
| Rollback is unclear | Stop after the plan; do not execute the migration |
If any answer is unknown and clarification is unavailable, halt at Gate 2 and return a plan only.
Require explicit confirmation before:
.obsidian/ surfaces that existing navigation depends on6+ files, 3+ KB layers in one execution, any canonical-material rewrite, any path-stability change, or any batch where the blast radius is not yet explicitWhen confirmation is unavailable:
Load references on demand; do not load all at once. If a listed reference, script, or asset is not scaffolded yet, follow this core contract and report the missing dependency instead of inventing its contents.
| File | Content | Load When |
|---|---|---|
references/kb-architecture.md | Canonical KB layer model, directory semantics, provenance contract, and safe default layouts | Create, Query, Existing Imperfect Repo, Migration planning |
references/obsidian-vaults.md | Obsidian syntax contract, shared .obsidian/ surfaces, Dataview metadata, and vault-safe migration rules | Create, Existing Imperfect Repo, Migration, Enrich when note metadata or linking changes |
references/kb-operations.md | Detailed create/ingest/enrich/derive procedures, ordering rules, and verification steps | Create, Ingest, Enrich, Derive |
references/audit-checklist.md | Audit rubric for structure, provenance, coverage, drift, stale indexes, and activity logging | Audit, post-change verification, pre-migration checks |
references/migration-playbooks.md | Additive repair patterns, phased restructure plans, cutover sequencing, and rollback playbooks | Existing Imperfect Repo when additive repair is insufficient, all Migration flows |
references/page-templates.md | Canonical page shapes for wiki pages, source notes, indexes, and activity-log entries | Create, Enrich, Derive, additive repair that adds missing pages |
| Script | Purpose | Use When |
|---|---|---|
scripts/kb_inventory.py | Inventory layers, canonical material, risky paths, source surfaces, vault signals, and missing shared vault structure | Gate 1 for Audit, Existing Imperfect Repo, and every Migration |
scripts/kb_lint.py | Check provenance, index freshness, schema/config drift, wikilinks, embeds, aliases, required files, and activity-log coverage | Gate 5 after any mutating batch and before declaring work complete |
scripts/kb_bootstrap.py | Scaffold the approved layered structure, shared .obsidian/ surfaces, and default starter files | Create and additive repair after Gate 3 approval; never for cutover or overwrite-by-default |
Run from the skill root:
python3 scripts/kb_inventory.py --root .python3 scripts/kb_lint.py --root . --fail-on warningpython3 scripts/kb_lint.py --root . --include-unlayered for mixed repos where important markdown still lives outside the default layerspython3 scripts/kb_bootstrap.py --root ./knowledge-base --dry-run| Asset path | Use When |
|---|---|
assets/kb-bootstrap-template.md | Manual starter packet for wiki/index.md, indexes/source-map.md, indexes/coverage.md, and activity/log.md when scripted scaffolding is not the right fit |
assets/activity-log-template.md, assets/*-page-template.md | Optional activity-log and wiki-page starters during Create, Enrich, or additive repair; never overwrite existing user-authored files by template expansion without explicit approval |
/nerdbot create "field guide to agentic knowledge bases"
Expected flow:
references/kb-architecture.md.raw/, wiki/, schema/, config/, indexes/, and activity/.wiki/index.md, indexes/source-map.md, indexes/coverage.md, and activity/log.md with scripts/kb_bootstrap.py or the manual packet in assets/kb-bootstrap-template.md./nerdbot improve ./client-repo
Expected flow:
scripts/kb_inventory.py first.indexes/ and activity/, establish a safe raw/ intake area, normalize note metadata, introduce shared vault surfaces, and map existing docs into the wiki/ layer without destructive rewrites.scripts/kb_lint.py, adding --include-unlayered when adjacent markdown still participates in the repo's knowledge graph./nerdbot query "What do we know about vendor pricing risk?"
Expected flow:
references/kb-architecture.md.wiki/ and indexes/ first to locate the maintained synthesis and its coverage state.raw/ only if a citation needs verification or the KB appears incomplete.[[wikilinks]], provenance references, and an explicit confidence level.partial or has a gap, recommend enrich or ingest as the next safe follow-up instead of mutating content during the query./nerdbot improve ./client-repo turn this into an Obsidian vault before you expand it
Expected flow:
scripts/kb_inventory.py first and classify the repo's vault state..obsidian/ shared config.scripts/kb_lint.py after each approved batch to verify [[wikilinks]], embeds, aliases, provenance, indexes, and the activity log.wiki/ content without provenance to raw/ or declared canonical material.raw/ append-only; preserve originals and store normalization as separate artifacts, or use a provenance-rich pointer/stub for sources over 50 MB when vendoring the binary is impractical.wiki/ + indexes/ before mining raw/; use raw/ to verify citations or confirm gaps, not to bypass missing synthesis.indexes/ and the activity log in the same batch as content or structure changes.enrich, ingest, or derive instead of mutating content in place.[[wikilinks]], and shared vault conventions before expanding the wiki surface..obsidian/ as a shared working surface only for project-safe templates, snippets, and documented conventions; do not rewrite volatile workspace state by default.raw, wiki, schema, config, indexes, activity log, provenance, canonical material, derived output, imperfect repo, migration, vault, shared vault config, Dataview metadata.