kb-edit

Applies single mechanical mutations to existing knowledge-base notes via a bundled Node helper.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Editing knowledge-base notes by hand risks inconsistent frontmatter, broken supersession chains, and writes into read-only vaults. This Skill applies one well-defined mutation at a time through a guarded helper that validates the note, canonicalizes tags, and writes atomically. ## Core Features & Use Cases - Six single-purpose operations: Bump updated:, mark a note verified, append a body section, replace tags with canonicalization, append addressed-by references across multiple notes, or supersede a note with its replacement in a two-file atomic write. - Guardrailed writes: The helper refuses read-only KBs, unparseable notes, combined operation flags, and half-finished supersede chains, returning structured JSON error codes for each failure mode. - Use Case: After fixing a recurring incident, run --add-addressed-by against every related event note so the fix note surfaces whenever those incidents are recalled later. ## Quick Start Ask the agent to mark the note at docs/kb/how-to-avoid-x.md as verified using kb-edit.

Frequently Asked Questions about kb-edit

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

FAQPage Schema
How do I edit an existing knowledge-base note safely?

Invoke the bundled kb-edit.mjs helper with the note path and exactly one operation flag such as --verify, --retag, or --append. The helper validates the note as an assertion record, applies the change, and writes atomically, returning a JSON result.

How do I mark a knowledge-base note as superseded by another note?

Run the helper with --supersede-with pointing at the replacement note. Both files are updated atomically: the old note gets superseded-by and the deprecated tag, while the new note gets supersedes. The target note must already exist.

Can I combine multiple edit operations in one invocation?

No, the helper rejects combined operation flags with an invalid-args error. Each mutation, such as a retag plus an append, must run as a separate invocation so every change stays atomic and auditable.

Why does kb-edit refuse to write to my knowledge base?

The helper returns readonly-kb when the note resolves into a KB whose kb.yaml entry sets readonly: true. It also fails with no-kb-resolvable if the note path is not inside any discoverable .kb directory.

Which operations update the note's updated timestamp?

Append, add-addressed-by, and supersede-with bump updated because they change content or lifecycle state. Retag and verify leave updated unchanged since they only affect findability or re-confirmation, while --bump-updated is the explicit escape hatch.