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/checkgit 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.01157 |
| Opus 5 | $0.00000 | $0.00579 |
| Sonnet 5 | $0.00000 | $0.00231 |
| Haiku 4.5 | $0.00000 | $0.00116 |
Grade A, and why
check 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 — 153 lines — stays where its author put it; the contents beside it link to each section on GitHub.
ctx check
Enforce architecture rules from .ctx/rules.toml against the code intelligence index.
Synopsis
ctx check [OPTIONS]
Description
The check command loads a declarative rules file, builds a file-level dependency set from the index (resolved call/implements/extends/uses edges plus resolved imports), evaluates the rules, and reports every violation. Use it to:
- Enforce layering - e.g. the domain layer must never import infrastructure
- Freeze legacy code - forbid new dependents of modules slated for removal
- Cap complexity - fail when fan-in, fan-out, complexity, or file symbol counts exceed limits
- Gate PRs - with
--against, only violations touching changed files are reported
Prerequisites
Index your codebase first:
ctx index
Rules File
Rules live in .ctx/rules.toml (override with --rules):
version = 1
[layers] # layer name -> globs over indexed files
domain = ["src/domain/**"]
application = ["src/app/**"]
infrastructure = ["src/infra/**", "src/db/**"]
[[rules.forbidden]] # `from` must not depend on `to`
from = "domain"
to = "infrastructure"
reason = "Domain layer must stay persistence-agnostic"
[[rules.allowed_dependents]] # only `only` may depend on `layer`
layer = "infrastructure" # (files in no layer are exempt)
only = ["application"]
[[rules.limit]] # metric thresholds
metric = "fan_in" # fan_in | fan_out | complexity | file_symbols
scope = "symbol" # symbol | file
max = 25
exclude = ["src/core/**"]
[[rules.no_new_dependents]] # frozen paths
paths = ["src/legacy/**"]
reason = "Legacy module is frozen; do not add new callers"
Layers must not overlap: a file matching two layers' globs is a configuration error.
Options
| Option | Description | Default |
|---|---|---|
--rules <PATH> |
Path to the rules file | .ctx/rules.toml |
--against <REF> |
Only report violations where at least one endpoint's file changed since REF (for no_new_dependents: where the new dependent changed) |
none |
--list |
Print the parsed rules and layer membership counts, then exit 0 | false |
--json |
Machine-readable output (global flag) | false |
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 · 153 lines · 0 tokens per session scan A 875057e3848e
check 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 1,157 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.