capture-event

Appends validated event records to a named knowledge store via a bundled Node helper.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When working with an AI agent, useful observations, workarounds, and solved problems are easily lost once the session ends. This Skill captures those events into a shared knowledge substrate as durable, validated records so they can be recalled and triaged later. ## Core Features & Use Cases - Atomic event capture: A bundled helper auto-fills a ULID id, timestamp, working directory, session, and repo, validates the record, and writes it atomically to a named store. - Tagging for recall: Tag solved problems with fix and skill-caused mistakes with mistake so related events can be recalled as groups later. - In-place amendment: Rewrite an existing event with --amend instead of creating near-duplicates, preserving provenance fields. - Use Case: After resolving a surprising API behavior in a project, capture the problem and its resolution with --tags fix into the project's knowledge base so future sessions can recall the fix. ## Quick Start Ask the agent to capture the problem you just solved and its resolution as an event into your project's knowledge store with a one-line summary and the fix tag.

Frequently Asked Questions about capture-event

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

FAQPage Schema
How do I capture an event into a knowledge base from an AI agent session?

Pipe the event body via stdin to the bundled capture-event.mjs helper with a one-line --summary and a --store naming the destination. The helper auto-fills the id, timestamp, working directory, session, and repo, then validates and writes the record atomically.

What is the difference between capture-event and kb-add?

capture-event is a pure append with no survey, no cross-referencing, and no deduplication, making it cheap to run inline. kb-add performs survey and retrieval-based dedup, while captured events are recalled and triaged later via kb-retrieve.

Why does capture-event refuse to write without a --store flag?

Every capture must name its destination explicitly so events never land in an unintended store. Omitting --store returns a missing-store error listing the registered stores; use --store @default only for environment-level lessons.

Can I edit an event after it has been captured?

Yes, pass --amend with the event id to rewrite the summary and body in place. Omitted optional fields keep their existing values, and provenance fields like id, captured-at, and repo are always preserved.

What runtime does the capture-event helper require?

The helper requires Node.js version 24 or later, inherited from the @williamthorsen/kb package. It also needs a kb.yaml registry in .agents/kb.yaml or ~/.agents/kb.yaml that declares the named store.