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/agentis-tools/ctx/diffgit clone --depth 1 https://github.com/agentis-tools/ctxWhat 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.00950 |
| Opus 5 | $0.00000 | $0.00475 |
| Sonnet 5 | $0.00000 | $0.00190 |
| Haiku 4.5 | $0.00000 | $0.00095 |
Grade A, and why
diff 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 2d 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 — 142 lines — stays where its author put it; the contents beside it link to each section on GitHub.
ctx diff
Generate context for changed files with their related dependencies.
Synopsis
ctx diff [REF] [PATTERNS]... [OPTIONS]
Description
The diff command identifies changed files compared to a git reference and includes context about the symbols and dependencies affected by those changes. This is useful for:
- Code review - Get context for reviewing a PR or commit
- Change impact - Understand what's affected by your changes
- Pre-commit - Verify changes before committing
Optional positional patterns restrict both changed files and graph-expanded
context. Literal files, directories, and globs are ORed together. Renames match
when either the old or new path is in scope; deletions remain visible in the
change summary. With no patterns, . includes all changed paths.
Options
| Option | Description | Default |
|---|---|---|
REF |
Git reference to compare against | HEAD |
--max-tokens <N> |
Maximum tokens in output | 8000 |
--depth <N> |
Depth for finding related symbols | 2 |
--summary |
Include a change summary on stderr | false |
--count-only |
Count selected, budgeted files instead of streaming contents | false |
--encoding <ENCODING> |
Tokenizer used for budgeting and counting (cl100k_base, o200k_base, or p50k_base) |
cl100k_base |
--stats |
Print count timing to stderr with --count-only |
false |
Examples
Changes Since Last Commit
# See what changed since HEAD
ctx diff
Compare with Branch
# Changes compared to main branch
ctx diff main
# Changes in feature branch
ctx diff origin/main
# Review only Rust sources and the public configuration contract
ctx diff origin/main "src/**/*.rs" docs/configuration.md
Review a Specific Commit
# Changes in the last commit
ctx diff HEAD~1
Token-Limited Output
# Limit output for smaller context windows
ctx diff --max-tokens 4000
# Count the files selected by that budget without streaming them
ctx diff --max-tokens 4000 --count-only --encoding o200k_base
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.
- 2d ago First seen · 142 lines · 0 tokens per session scan A f4df04fa7103
diff is a command published in the GitHub repository agentis-tools/ctx (11 stars, last pushed 15d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 950 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-30.
Other commands, from other repositories
coograph-review
Review the changes in scope for spec compliance, convention violations, logic bugs, and architectural issues. You review — you do not author. Never edit files.
coograph-verify
Verify that the described work is complete and correct. Provide evidence for every claim. You verify — you do not implement or fix style.
api-gen
Generate REST API endpoints with routes, validation, error handling, and tests.
component-gen
Generate React or Vue components with prop types, styling, accessibility, and tests.
code-review
Review staged git changes for bugs, security issues, and style violations.
pr-description
Generate a PR title and description from the current branch diff against main.