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/sql_schemagit 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.01934 |
| Opus 5 | $0.00000 | $0.00967 |
| Sonnet 5 | $0.00000 | $0.00387 |
| Haiku 4.5 | $0.00000 | $0.00193 |
Grade A, and why
sql_schema 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 yesterday.
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 — 180 lines — stays where its author put it; the contents beside it link to each section on GitHub.
ctx sql — Public Schema (v1)
ctx sql runs read-only SQL against the code-intelligence index through DuckDB.
The query surface is the versioned v1 schema: a set of stable views over
the physical index. Query v1.* — not the underlying tables.
Stability contract
v1.*is the contract. Columns and views may be added withinschema_version1. Renaming or removing anything incrementsv1.meta.schema_versionand is noted in the changelog.- Everything outside
v1.*is internal and unstable. The raw index is reachable ascode.*, but its shape can change at any time and it is excluded from all compatibility guarantees. Do not depend on it. - Access is read-only and engine-hardened. Filesystem access, extension loading, and attaching other databases are disabled; the index cannot be modified.
Views
v1.symbols — one row per symbol
| Column | Type | Description |
|---|---|---|
id |
VARCHAR | Stable symbol identifier |
name |
VARCHAR | Symbol name |
qualified_name |
VARCHAR | Fully-qualified name, when known |
kind |
VARCHAR | function, method, struct, enum, trait, … |
file |
VARCHAR | Path of the file that defines the symbol |
line_start |
BIGINT | First line of the symbol |
line_end |
BIGINT | Last line of the symbol |
is_public |
BOOLEAN | Whether the symbol is publicly visible |
complexity |
BIGINT | fan_out * 2 + fan_in heuristic complexity score |
fan_in |
BIGINT | Number of resolved incoming calls edges |
fan_out |
BIGINT | Number of outgoing calls edges |
doc |
VARCHAR | Docstring or brief, when present |
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.
- yesterday First seen · 180 lines · 0 tokens per session scan A a4581d8cf2ea
sql_schema 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,934 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.