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.
npx agentmods add commands/keychain-io/trustable-ai/context-generationgit clone --depth 1 https://github.com/keychain-io/trustable-aiWrote 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.
[](https://agentmods.dev/commands/keychain-io/trustable-ai/context-generation)<a href="https://agentmods.dev/commands/keychain-io/trustable-ai/context-generation"><img src="https://agentmods.dev/badge/commands/keychain-io/trustable-ai/context-generation.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00000 | $0.04879 |
| Opus 5 | $0.00000 | $0.02440 |
| Sonnet 5 | $0.00000 | $0.00976 |
| Haiku 4.5 | $0.00000 | $0.00488 |
Grade A, and why
context-generation 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.
How it starts
The opening of the file, as written. The whole thing — 595 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Context Generation Workflow
Generate hierarchical CLAUDE.md and README.md documentation structure with directed context loading for trusted-ai-development-workbench.
Purpose
This workflow analyzes your repository structure and creates:
- README.md files for human-readable documentation
- CLAUDE.md files with YAML front matter for directed context loading
Each file is tailored to the directory's actual contents, not generic templates.
Prerequisites
- Repository initialized with
trustable-ai init - Claude Code running in project root directory
Workflow Steps
Step 1: Analyze Repository Structure
Use Glob and Read tools to analyze the project:
from pathlib import Path
import os
# Project root
root = Path.cwd()
# Directories to skip
skip_dirs = {
'node_modules', 'venv', '.venv', 'env', '.env',
'__pycache__', '.git', '.svn', '.hg',
'dist', 'build', 'out', 'target', 'bin', 'obj',
'.idea', '.vscode', '.vs',
'coverage', '.coverage', 'htmlcov',
'.pytest_cache', '.mypy_cache', '.ruff_cache',
}
# Find significant directories (have source files)
def is_significant(directory):
"""Check if directory has source code files."""
code_extensions = {'.py', '.js', '.ts', '.tsx', '.go', '.rs', '.java', '.cpp', '.c', '.rb'}
files = list(directory.glob('*'))
code_files = [f for f in files if f.is_file() and f.suffix in code_extensions]
return len(code_files) >= 2 # At least 2 source files
def analyze_directory(dir_path):
"""Analyze a directory's contents."""
files = []
subdirs = []
for item in dir_path.iterdir():
if item.name.startswith('.') and item.name != '.claude':
continue
if item.name in skip_dirs:
continue
if item.is_dir():
subdirs.append(item.name)
elif item.is_file():
files.append({
'name': item.name,
'extension': item.suffix,
'size': item.stat().st_size
})
# Detect directory type
dir_type = 'module'
dir_name = dir_path.name.lower()
type_patterns = {
'src': 'source', 'lib': 'source', 'app': 'source', 'pkg': 'source',
'tests': 'tests', 'test': 'tests', 'spec': 'tests', '__tests__': 'tests',
'docs': 'documentation', 'documentation': 'documentation',
'api': 'api', 'apis': 'api',
'core': 'core',
'config': 'configuration', 'configs': 'configuration',
'scripts': 'scripts', 'bin': 'scripts',
'.claude': 'claude_config',
}
dir_type = type_patterns.get(dir_name, 'module')
# Count file types
py_files = len([f for f in files if f['extension'] == '.py'])
js_files = len([f for f in files if f['extension'] in ['.js', '.ts', '.tsx']])
go_files = len([f for f in files if f['extension'] == '.go'])
primary_lang = 'mixed'
if py_files > js_files and py_files > go_files:
primary_lang = 'python'
elif js_files > py_files and js_files > go_files:
primary_lang = 'javascript'
elif go_files > 0:
primary_lang = 'go'
return {
'path': str(dir_path),
'relative_path': str(dir_path.relative_to(root)),
'type': dir_type,
'files': files,
'subdirs': subdirs,
'primary_language': primary_lang,
'has_readme': (dir_path / 'README.md').exists(),
'has_claude_md': (dir_path / 'CLAUDE.md').exists(),
}
# Scan repository (max depth 3)
directories_to_document = []
# Always include root
directories_to_document.append(analyze_directory(root))
# Scan subdirectories
for item in root.rglob('*'):
if not item.is_dir():
continue
relative = item.relative_to(root)
# Check depth
if len(relative.parts) > 3:
continue
# Skip ignored directories
if any(skip in relative.parts for skip in skip_dirs):
continue
# Check if significant
if is_significant(item):
directories_to_document.append(analyze_directory(item))
print(f"📁 Found {len(directories_to_document)} directories to document:")
for d in directories_to_document:
status = "✓ has docs" if d['has_claude_md'] else "○ needs docs"
print(f" {d['relative_path']:<30} {status} | {len(d['files'])} files | {d['type']}")
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.
- 3d ago First seen · 595 lines · 0 tokens per session scan A c6fa89bf9573
context-generation 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 4,879 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.
Other commands, from other repositories
git
Git operations with intelligent commit messages and workflow optimization.
checklist
Generate a custom checklist for the current feature based on user requirements.
clarify
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.
specify
Create or update the feature specification from a natural language feature description.
analyze
Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation.
converge
Assess the current codebase against the feature's spec, plan, and tasks, then append any remaining unbuilt work as new tasks to tasks.md so implement can complete it.