capture-rule

capture-rule is a skill for Claude Code from atman-33/workhub. It costs 63 tokens per session (1,252 once invoked), scanned A, original, MIT.

A tool for saving a reusable, non-obvious project insight as a rule that can be automatically added in relevant future sessions.

In plain words
What is it for?
Use it to record conventions, tooling quirks, design constraints, and the reasons behind decisions.
Why use it?
It prevents the same project-specific discovery or explanation from being lost or repeated.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Part of the workhub plugin — 22 skills, 1 agent shipped together

Good fit Use it to record conventions, tooling quirks, design constraints, and the reasons behind decisions.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/atman-33/workhub/capture-rule
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add atman-33/workhub --skill capture-rule
Clone the repo
git clone --depth 1 https://github.com/atman-33/workhub

Made for: Claude Code.

Or install workhub, the plugin that ships this one along with the rest of its 22 skills, 1 agent.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for capture-rule

README.md
[![agentmods](https://agentmods.dev/badge/skills/atman-33/workhub/capture-rule/github.svg)](https://agentmods.dev/skills/atman-33/workhub/capture-rule)
Your own site
<a href="https://agentmods.dev/skills/atman-33/workhub/capture-rule"><img src="https://agentmods.dev/badge/skills/atman-33/workhub/capture-rule/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for capture-rule

Your own site · 80×15
<a href="https://agentmods.dev/skills/atman-33/workhub/capture-rule"><img src="https://agentmods.dev/badge/skills/atman-33/workhub/capture-rule.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 63 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,252 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00063 $0.01252
Opus 5.5 $0.00025 $0.00501
Sonnet 5.5 $0.00013 $0.00250
Haiku 4.5 $0.00006 $0.00125

Measured 1mo ago against content hash 24bc3253a069, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

capture-rule scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/workhub/skills/capture-rule/SKILL.md · 120 lines

How it starts

The opening of the file, as written. The whole thing — 120 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Capture Rule

Route durable knowledge to the home where it will auto-inject when next relevant.

Step 1 — Qualify the insight

Capture only knowledge that is reusable and non-obvious from code, git history, or existing instruction files: gotchas, build/tooling quirks, design invariants, conventions, the "why" behind a decision.

Skip (and tell the user why) if it is: a one-off fact for this task only, already documented in the repo, or plainly derivable by reading the code. If it does not qualify, stop here.

Establish the target repository the insight is about. If unclear, infer from the files touched this session and confirm with the user.

Step 2 — Route to a home

Pick exactly one:

The question is when the insight has to reach a session, not what it is about. There are three answers, and they are exhaustive:

It has to arrive… Home
when a matching file is touched — a constraint about particular code that repo's .claude/rules/<slug>.md
the same, but the rule cannot live in that repo harness .claude/rules-ex/<slug>.md
when the question makes it relevant — everything else durable the vault's memory/notes/, as a typed note

A rule fires on a path and costs nothing until that path is opened; a memory note is found by searching and costs nothing until someone looks. Anything that does not need to arrive while a specific file is open belongs in memory, where it is typed, searchable, in git and checked by memory-doctor.

If the home is memory/notes/, do not write a rule file. Write the note (cli.mjs new lesson "…" from the memory plugin), or tell the user that is where it belongs and stop.

Auto-memory is deliberately not on this list. It is per-project, local, invisible and outside git — memory/notes/ does the same job better on every axis, and keeping both would mean choosing between them every time, which is a routing decision with no rule behind it.

Knowledge about the harness's own machinery is a memory note too, unless it has to fire on a path — the vault's .claude/rules/vault-harness-local.md is the home for the ones that do. Never write to vault-harness.md beside it: that file is app-managed, so an edit turns into a conflict on the next template update and ends up in a .bak nobody reads.

Read the full file on GitHub · 120 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago Changed · +19 lines 24bc3253a069
  2. 1mo ago First seen · 101 lines · 63 tokens per session scan A c4748d99ac2a

Subscribe to this mod's changes

capture-rule is a skill published in the GitHub repository atman-33/workhub (3 stars, last pushed 3d ago), licensed MIT. It adds 63 tokens to every session and 1,252 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

garden-tending

Tend the knowledge garden — diagnose vault health, condense project memos into project.md overviews, create/merge cross-project topics, fix broken links, archive superseded notes, extend trails. Trigger on "tend the garden", "condense", "update project overview", "check vault health", "where are we with X?", "what…

linxule/memex-plugin · 131 tokens

curator-practice

Operating philosophy for autonomous memex curator tending — orientation protocol, signal triage, bounded work units, initiative thresholds, logging conventions. Trigger on cron-launched runs with no user prompt, "use your judgment", "tend without instructions", "do a pass on the vault", "I'll be away — do what needs…

linxule/memex-plugin · 153 tokens

memo-writing

How to write effective session memos — format, frontmatter schema, observation extraction, topic-signal append. Trigger on /memex:save, "save this for later", "remember this", "save what we discussed", "document this session", "create a memo", or when the [memex] activity nudge appears in context. Do NOT trigger for…

linxule/memex-plugin · 125 tokens

recall

Retrieve session memory across 4 modes — TEMPORAL (date browsing), KEYWORD (FTS lookup), DEEP (cross-session synthesis), LOAD (specific file). Trigger on "what did I do yesterday/last week", "why did we...", "remind me...", "find the memo about...", "last time we...", "patterns across projects", "load the X topic". Do…

linxule/memex-plugin · 112 tokens

superbrain-distill

Internal SuperBrain skill — run by the detached capture child to distill a session-event delta into routed Obsidian notes. Not for direct user invocation.

m3talux/superbrain · 36 tokens

trellis-update-spec

Captures executable contracts and coding conventions into .trellis/spec/ documents. Use when learning something valuable from debugging, implementing, or discussion that should be preserved for future sessions.

fy-agent/fyagent · 40 tokens