update-context

update-context is a command for Claude Code from keychain-io/trustable-ai. It costs 0 tokens per session (989 once invoked), scanned A, original, MIT.

A documentation updater for projects that use CLAUDE.md and README.md files to describe directories. It refreshes the structure of those files while preserving custom content when merging.

In plain words
What is it for?
Previewing documentation changes, generating or merging directory context files, and rebuilding the documentation index.
Why use it?
It keeps directory documentation aligned with the project as folders change, reducing stale or missing guidance.

Command for Claude Code

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.

agentmods
npx agentmods add commands/keychain-io/trustable-ai/update-context
Clone the repo
git clone --depth 1 https://github.com/keychain-io/trustable-ai

Made for: Claude Code.

Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 989 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00000 $0.00989
Opus 5 $0.00000 $0.00495
Sonnet 5 $0.00000 $0.00198
Haiku 4.5 $0.00000 $0.00099

Measured 3d ago against content hash 9ec0a91f6f4c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

update-context 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 3d 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.

.claude/commands/update-context.md · 173 lines

How it starts

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

Update Context Files

Automatically update the hierarchical CLAUDE.md and README.md documentation structure for trusted-ai-development-workbench.

What This Does

This workflow updates your project's context documentation:

  • README.md files: Human-readable documentation for each directory
  • CLAUDE.md files: Context directives for Claude Code

Existing files are merged - your custom content is preserved while the structure is updated.

Quick Start

Run these commands to update your context files:

# Update all CLAUDE.md files (merges with existing)
trustable-ai context generate --merge

# Or regenerate everything (overwrites)
trustable-ai context generate --force

# Rebuild the context index after updating
trustable-ai context index

Step-by-Step Instructions

Step 1: Preview Changes

First, see what directories will be updated:

trustable-ai context generate --dry-run

This shows which directories have CLAUDE.md files and which need creation.

Step 2: Update Context Files

Option A: Merge with existing files (recommended)

trustable-ai context generate --merge

This updates the front matter (keywords, children, priorities) while keeping your custom content.

Option B: Create new files only (skip existing)

trustable-ai context generate

This creates CLAUDE.md for directories that don't have one.

Option C: Regenerate all files

trustable-ai context generate --force

This overwrites all files with fresh content.

Step 3: Rebuild Context Index

After updating files, rebuild the search index:

trustable-ai context index

Step 4: Verify Context Loading

Test that context loads correctly for common tasks:

# Test different task types
trustable-ai context directed implementation
trustable-ai context directed testing
trustable-ai context directed --keywords api --keywords endpoint

# View the context tree
trustable-ai context directed --tree

Read the full file on GitHub · 173 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. 3d ago First seen · 173 lines · 0 tokens per session scan A 9ec0a91f6f4c

Subscribe to this mod's changes

update-context is a command published in the GitHub repository keychain-io/trustable-ai (2 stars, last pushed 6mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 989 tokens. 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.