keystone: Command for Claude Code

.claude/commands/keystone-synthesize.md

keystone-synthesize is a command for Claude Code from tacoda/keystone. It costs 14 tokens per session (741 once invoked), scanned A, a copy of synthesize, MIT.

A command for turning learning notes into lasting project rules, coding guidance, process rules, or review checks.

In plain words
What is it for?
Use it to process files in the learning inbox and propose or create the appropriate documentation and sensor updates.
Why use it?
It prevents useful lessons from incidents or reviews from remaining as isolated notes.

Command for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions subagents.

This is tacoda/keystone's own configuration. It tells Claude Code how to work on keystone itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything keystone configures →

Reuse

Borrowing it

Nothing to install: this file belongs to tacoda/keystone. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/tacoda/keystone/main/.claude/commands/keystone-synthesize.md
Clone the repo
git clone --depth 1 https://github.com/tacoda/keystone

Made for: Claude Code.

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 keystone-synthesize

README.md
[![agentmods](https://agentmods.dev/badge/commands/tacoda/keystone/keystone-synthesize.svg)](https://agentmods.dev/commands/tacoda/keystone/keystone-synthesize)
Your own site
<a href="https://agentmods.dev/commands/tacoda/keystone/keystone-synthesize"><img src="https://agentmods.dev/badge/commands/tacoda/keystone/keystone-synthesize.svg" alt="Measured on agentmods" height="20"></a>
Per session 14 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 741 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 100% copy Near-identical to another mod 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.00014 $0.00741
Opus 5 $0.00007 $0.00370
Sonnet 5 $0.00003 $0.00148
Haiku 4.5 $0.00001 $0.00074

Measured 4d ago against content hash 1f6742190325, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

keystone-synthesize 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 4d 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.

Origin

This is a copy

100% identical to synthesize — 4 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.claude/commands/keystone-synthesize.md · 36 lines

How it starts

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

synthesize

Promote learning-inbox candidates into the right corpus or guide layer. Read .charter/learning/README.md.

Activities

For each file in .charter/learning/inbox/:

  1. Read the candidate. Note its proposed-layer and (if present) proposed-globs: frontmatter.
  2. Decide the destination:
    • Universal principle → .charter/corpus/principles/<name>.md and .charter/guides/principles/<name>.md
    • Stack idiom → .charter/corpus/idioms/<stack>/<name>.md and .charter/guides/idioms/<stack>/<name>.md
    • Process rule → .charter/guides/process/<name>.md
    • Sensor → .charter/sensors/<name>.md
  3. Author the corpus and guide pair. Corpus explains the why; guide states the rule.
  4. Propose globs: for the guide. If the candidate carries proposed-globs:, use those as the starting point. Otherwise, infer from the evidence: regional surprise → narrow globs that match the touched region (consult corpus/state/CODEBASE_STATE.md's region map); cross-cutting surprise → no globs:. Always show the proposed globs: to the user as part of the guide-write diff — it is part of the rule, not a side detail.
  5. Choose the rule tier. Default: regular rule. Iron law / golden rule only when deviation is genuinely non-negotiable.
  6. Move the candidate from inbox/ to promoted/ (kept), or rejected/ (with a one-line reason in the moved file).
  7. Regenerate .charter/corpus/state/GLOBS_INDEX.md if any guide was written with globs:. Walk every guide, invert the globs, replace the ## Index table (same procedure as bootstrap step 6).
  8. Regenerate Cursor projections if .cursor/rules/ exists. For each newly promoted guide that declares globs:, write .cursor/rules/keystone-<topic>-<name>.mdc mirroring the guide's globs and pointing at the source guide. For any guide whose globs: changed during this synthesize, rewrite the corresponding .mdc. Delete any .cursor/rules/keystone-*.mdc whose guide no longer exists or no longer declares globs:.

Read the full file on GitHub · 36 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. 4d ago First seen · 36 lines · 14 tokens per session scan A 1f6742190325

Subscribe to this mod's changes

keystone-synthesize is a command published in the GitHub repository tacoda/keystone (44 stars, last pushed 2mo ago), licensed MIT. It adds 14 tokens to every session and 741 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to synthesize, differing in 4 lines, and is treated as a copy.