kb-add

Capture new notes into a structured knowledge base with agent-guided classification and taxonomy placement.

1|1|Updated Feb 25, 2026
One-click install
npx skills add https://github.com/williamthorsen/codeassembly --skill kb-add-williamthorsen
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: kb-add
Source: https://github.com/williamthorsen/codeassembly/tree/main/packages/agents/content/skills/kb-add
Command: npx skills add https://github.com/williamthorsen/codeassembly --skill kb-add-williamthorsen

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Adding notes to a structured knowledge base requires consistent placement, tagging, and cross-referencing, which is error-prone when done manually. This Skill splits the work: a bundled helper handles the mechanical write (atomic file creation, tag canonicalization, taxonomy updates) while the agent handles judgment calls like folder selection, Diátaxis labeling, and cross-references. ## Core Features & Use Cases - Confirm-by-default capture flow: Proposes KB destination, folder, Diátaxis label, title, tags, and body for user review before writing, with an --auto escape hatch for unattended capture. - Taxonomy-aware placement: Surveys the destination KB's declared domains and on-disk folders, flags undeclared folders as drift, and records new domains as provisional when unconfirmed. - Guardrailed writes: The helper refuses invalid titles, never overwrites existing files, canonicalizes known tag aliases, and reports structured JSON results with error codes like collision and no-kb-resolvable. - Use Case: After a debugging session, ask the agent to capture the resolution as a how-to note; it surveys the KB, cross-references related notes via kb-retrieve, proposes placement under the right domain, and writes the note atomically after your confirmation. ## Quick Start Ask the agent to capture a new knowledge-base note about your topic, for example: "Use kb-add to save a how-to note about configuring pnpm workspaces."

Frequently Asked Questions about kb-add

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

FAQPage Schema
How do I add a note to a knowledge base with an AI agent?

Invoke the kb-add skill with a title and note body; the agent surveys the destination KB, proposes a folder, Diátaxis label, and tags, then writes the note after your confirmation. Use the --auto flag to skip the proposal step and write immediately.

How does kb-add decide which folder a note belongs in?

It surveys the KB's declared taxonomy in .kb/taxonomy.yaml plus folders found on disk, then prefers a declared reviewed domain that fits the topic. New domains are proposed only when the topic is genuinely new, and auto mode never creates top-level domains.

What happens if a note with the same title already exists?

The helper never overwrites existing files and returns a collision error code. You can then re-title the note, append the new material to the existing note after reading it, or abort the capture.

Can I write to a specific knowledge base instead of the discovered one?

Yes, pass --kb with a registry name to override .kb directory discovery, or --kb @default to use the registry's configured default_kb. Without a discovered .kb folder or an explicit --kb, the helper refuses to write.

What runtime does the kb-add helper require?

The bundled helper requires Node.js version 24 or later, inheriting the version floor of the @williamthorsen/kb package. The note body is piped to the helper via stdin, and results are returned as structured JSON.