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/auditgit 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.01103 |
| Opus 5 | $0.00000 | $0.00551 |
| Sonnet 5 | $0.00000 | $0.00221 |
| Haiku 4.5 | $0.00000 | $0.00110 |
Grade A, and why
audit 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 — 190 lines — stays where its author put it; the contents beside it link to each section on GitHub.
ctx audit
Run automated code quality analysis with scoring for CI integration.
Synopsis
ctx audit [OPTIONS]
Description
The audit command analyzes your codebase for quality metrics and generates a report with scores. Use it to:
- Quality gates - Block commits/deploys below a threshold
- CI integration - Automated quality checks in pipelines
- Progress tracking - Monitor code quality over time
- Pre-commit hooks - Catch issues before committing
Prerequisites
Index your codebase first:
ctx index
For full analysis (complexity, modularity), the index creates the analytics database automatically.
Options
| Option | Description | Default |
|---|---|---|
-o, --output <FORMAT> |
Output format: text, json, markdown | text |
--min-score <SCORE> |
Minimum score threshold (0.0-10.0) | none |
--categories <LIST> |
Categories to check (comma-separated) | all |
--incremental |
Only audit changed files | false |
Categories
| Category | Weight | Description |
|---|---|---|
complexity |
25% | Function complexity (fan-out) |
duplication |
20% | Code duplication patterns |
coverage |
20% | Documentation coverage |
modularity |
20% | Module coupling |
naming |
15% | Naming convention adherence |
Examples
Basic Audit
ctx audit
Output:
Code Quality Audit
==================
Overall Score: 7.8/10
Categories:
Complexity: 7.5/10 (5 issues)
Duplication: 8.0/10 (2 issues)
Coverage: 6.5/10 (12 issues)
Modularity: 9.0/10 (1 issues)
Naming: 8.5/10 (3 issues)
Critical Issues (2):
[CRIT] src/parser.rs:142 - extract_symbols: fan-out 48 (threshold: 20)
[CRIT] src/main.rs:809 - run_query: fan-out 45 (threshold: 20)
Warnings (8):
[WARN] src/db.rs:234 - High coupling: 25 outgoing dependencies
...
Quality Gate
# Fail if score below 7.0
ctx audit --min-score 7.0
# In CI, this returns exit code 1 if below threshold
echo $? # 0 = passed, 1 = failed
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 · 190 lines · 0 tokens per session scan A 72a00f9b9857
audit 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,103 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.