Skip to content
Back to skills

Strata Capture

ASecurity

What to capture into the Strata knowledge base and how to finish it before you stop — capture triggers, the capture command, filing each capture (strata file --into/--new/--defer/--drop), typed shard templates, linking a new shard, duplicates and distinct_from, corrections, shard anatomy (frontmatter, sections, sources, trust, size), and good vs bad examples. Use when you learned something non-obvious, the user corrected you, you have inbox items to file, or you are writing or editing a shard.

  • 2 stars
  • 0 votes
  • 0 copies
  • 5 views
  • Added November 29, 2026
developmentrustgogitapidatabase

Works with

  • api

Security analysis

A100/100

Scanned November 30, 2026

npx -y skills add zbmowrey/strata --skill strata-capture --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Strata Capture?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Strata Capture
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/zbmowrey-strata-capture/badge)](https://www.skillsdirectory.com/skills/zbmowrey-strata-capture)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: strata-capture
description: What to capture into the Strata knowledge base and how to finish it before you stop — capture triggers, the capture command, filing each capture (strata file --into/--new/--defer/--drop), typed shard templates, linking a new shard, duplicates and distinct_from, corrections, shard anatomy (frontmatter, sections, sources, trust, size), and good vs bad examples. Use when you learned something non-obvious, the user corrected you, you have inbox items to file, or you are writing or editing a shard.
tags: [strata, knowledge]
---

# Capturing and filing knowledge

The session that writes knowledge finishes it. Capture is the cheap mid-task note; before
you stop, every capture you made is filed and every shard you created is filled in and
linked. `stop` and `commit` block on your own unfinished knowledge (legacy gaps only warn).

## 1. Capture when you learn it

Capture **immediately** when you learn something non-obvious and reusable:
a gotcha (symptom → cause → fix), a decision and its reason, how something really works,
a fact you had to dig for, a correction from the user. Do **not** capture what the code or
git history already says, transient state, or secrets (record _where_ a secret lives).

```
strata capture "pytest hangs at exit: session-scoped db fixture never closes its pool; add teardown" \
  --type gotcha --tags pytest,database --source file:tests/conftest.py --project ci-flake
strata capture "user: deploys happen Tuesdays only, never Fridays" --type correction \
  --shard deploy-schedule --source "user:said in session"
```

The item lands in `knowledge/_inbox/` and is searchable at once. Capture prints its path,
up to three `related:` shards (merge candidates) and the `strata file` reminder.
`--type correction --shard <id>` also bumps that shard's `occurrences` (promotion input).

## 2. File each capture before you stop

Search for a home first: `strata search '<key terms>' kind:shard`, plus the `related:` lines.

| Situation                                           | Do                                                                                                                                       |
| --------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| An existing shard holds the idea, or should         | Edit that shard (sharpen the claim, add the evidence), then `strata file <item> --into <id>`: it appends the item's sources, deletes it. |
| A new idea                                          | `strata file <item> --new <domain>/<topic>/<id> --title "…" --summary "…"` (prefilled from the item), then finish it (§3).               |
| Needs a decision or evidence you can't get now      | `strata file <item> --defer "<what is missing>"`: it stays for the gardener and counts as garden debt.                                   |
| Not worth keeping (wrong, transient, already known) | `strata file <item> --drop "<why>"`: deletes it; the reason goes to telemetry.                                                           |

- `--into` refuses a shard you did not edit this session; add `--note-only` when the item
  adds evidence but no wording.
- Prefer `--into` over a new near-duplicate. Defer only for a real blocker, never to save
  time: every deferral is reported as a lapse. Drop what you would not keep.
- Many items at once (a project close, a long session): give the item paths to the
  `strata:scribe` agent; it follows this recipe.

## 3. Finish a new shard

`strata file --new` and `strata new shard <domain>/<topic>/<id> --type <type> --title "…"
--summary "…"` write the type's template (`status: active`, `trust: inferred`). Replace
**every** `<!-- fill: … -->` marker; `shard/placeholder` blocks until you do.

- Every type: first paragraph = the claim in ≤ 3 sentences.
- gotcha: `## Symptom` / `## Cause` / `## Fix` · decision: `## Context` / `## Decision` /
  `## Alternatives` / `## Consequences` · standard: `## Rule` / `## Rationale` /
  `## Enforcement` (`none yet` = a promotion signal) · howto: numbered steps (≤ 10; longer
  → playbook) · reference: cite the material in `sources` · fact, glossary, correction:
  the claim only.

**Link it** (`link/orphan` blocks an unlinked shard you wrote). Add `[[new-id]]` to the
`## See also` of the shard the claim refines or depends on, else of a sibling in the same
topic (`strata search '<terms> domain:<domain> topic:<topic>'`). Edit that shard, not a
hub: hubs are generated and do not count. Then link out from the new shard to what it
builds on. An id in a playbook's, project.md's or script manifest's `shards:` also counts.

**Duplicates.** `strata new shard` and `file --new` refuse a likely duplicate (similar
title, alias or body) and list the candidates. Extend the existing shard instead
(`--into`); only if it really is a different claim, pass `--distinct-from <id>` (recorded
as `distinct_from`, so the pair is never flagged again). `--force` is a last resort.

`strata check --changed` must be clean before you stop.

## Fix the record in place

A shard is wrong → correct it now: fix the claim, add the evidence to `sources`, bump
`updated` (and `verified_at` if you confirmed it). Never overwrite `trust: user-stated` —
`strata questions ask "<question>" --blocking <id>` and tell the user. Precedence:
user-stated > verified > observed > inferred. When the user corrects a shard: fix it (if
not user-stated), capture `--type correction --shard <id>`, then file that `--into <id>`.

## Shard anatomy

- One idea per shard; filename stem == `id` (kebab-case, globally unique).
- Required: `id, title (≤ 80), summary (≤ 160, one line), type, tags (≥ 1), status, trust,
created, updated`; `sources` (kind ∈ user/url/file/commit/session/script/doc, `ref`, `at`)
  for trust ≥ observed. Prefer existing tags (`tag/new` warns on a new one).
- Cite the `file` that backs each concrete value (version, size, count, IP, setting). A value
  with no file behind it can't be re-checked. When you re-verify a shard, bump that source's
  `at`. The garden's `reverify-drift` task flags file sources that changed after their `at`.
- Useful: `aliases` (other names people search), `applies_to` (code globs → pre-edit
  advisory), `scripts:`/`gates:` (enforcement), `verify: {script: …}`, `review_after`,
  `expires: YYYY-MM-DD` (a dated claim; archived after that day).
- Body after the claim: only sections that add value: `## Why`, `## How to apply`,
  `## Evidence`, `## See also` (`[[id]]` links).
- Limits: body ≤ 120 lines, ≤ 6 KB. Longer → split into linked shards; long procedures →
  playbook; long code → script.

## Good vs bad

Good: _"Session-scoped DB fixtures leak connections unless torn down; tests then hang at
exit."_ — specific, causal, sourced, tagged, `applies_to: ["tests/**/conftest.py"]`, linked
from `[[hanging-test-diagnosis]]`.

Bad: _"Be careful with fixtures."_ (vague) · a pasted 300-line log (state the finding, cite
the log) · _"The API uses JWT"_ when `auth/jwt.go` says so plainly (the code already tells)
· a capture left in the inbox at stop, or deferred with "later".

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.