ctx

ctx is a skill for Claude Code, Codex from agentis-tools/ctx. It costs 60 tokens per session (1,556 once invoked), scanned A, a copy of ctx, Apache-2.0.

A codebase exploration and governance guide built around the indexed ctx command-line tool. It uses symbols and relationships in the code to examine structure, dependencies, duplication, hotspots, and quality rules.

In plain words
What is it for?
Use it to map a repository, locate code and callers, estimate impact, find similar code, inspect hotspots, and run quality checks.
Why use it?
It reduces guesswork when changing an unfamiliar repository and helps check whether a change increases maintenance or breaks stated rules.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is ctx sql --snapshots=../snapshots/snapshots ".

Good fit Use it to map a repository, locate code and callers, estimate impact, find similar code, inspect hotspots, and run quality checks.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/agentis-tools/ctx
agentmods
npx agentmods add skills/agentis-tools/ctx/templates

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for ctx

README.md
[![agentmods](https://agentmods.dev/badge/skills/agentis-tools/ctx/templates/github.svg)](https://agentmods.dev/skills/agentis-tools/ctx/templates)
Your own site
<a href="https://agentmods.dev/skills/agentis-tools/ctx/templates"><img src="https://agentmods.dev/badge/skills/agentis-tools/ctx/templates/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ctx

Your own site · 80×15
<a href="https://agentmods.dev/skills/agentis-tools/ctx/templates"><img src="https://agentmods.dev/badge/skills/agentis-tools/ctx/templates.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 60 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,556 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00060 $0.01556
Opus 5.5 $0.00024 $0.00622
Sonnet 5.5 $0.00012 $0.00311
Haiku 4.5 $0.00006 $0.00156

Measured 27d ago against content hash ce63393cc602, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

ctx 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 27d ago.

The scan reads SKILL.md. This mod also ships 6 executable files (codex-post-tool-use.sh, codex-session-start.sh, codex-stop.sh, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Origin

This is a copy

100% identical to ctx — 2 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

src/harness/templates/SKILL.md · 140 lines

How it starts

The opening of the file, as written. The whole thing — 140 lines — stays where its author put it; the contents beside it link to each section on GitHub.

ctx — code intelligence and governance

Use ctx's indexed symbol and relationship model before text-only search. Treat its quality metrics as evidence to investigate, not automatic proof that code is wrong.

Exit codes are 0 clean, 1 findings, 2 operational error, and 3 only for an unmet ctx harness compat version requirement. Never report a gate as passed after an operational error.

Keep the index fresh

ctx index            # incremental; run after pulling or material edits
ctx index --force    # full rebuild after schema changes or corruption

Route the question

Question Start with
How is this repository organized? ctx map --budget 2000
Where is a symbol or concept? ctx query find, ctx search, ctx source
What depends on this code? ctx query callers, ctx query impact
Does an implementation already exist? ctx similar, then ctx duplicates
Did this branch make quality worse? ctx score --against <base>
Does this change violate policy? ctx check --against <base>
Where is current maintenance pressure? ctx hotspots
Is health changing across commits? ctx sql --snapshots=<dir>

Load the verified recipe for the problem

The cookbook pages are executable workflows with observed limitations, not command advertisements. Open the matching page when the task needs more than the routing command:

Symptom Recipe
Unfamiliar repository Orientation
Context is too large or incomplete Smallest useful context
Behavior may already exist Existing implementations
A small edit may have hidden consumers Blast radius
Implementing with an uncertain working set Evidence-backed implementation
Failing test in a large subsystem Focused debugging
Large branch review Risk-routed review
PR gate inherits old debt PR governance
Gate blocks a legitimate change Gate recovery
Fork PR needs a published report Untrusted CI
Boundaries are eroding Architecture drift
The same code keeps changing Chronic hotspots
High complexity may be intentional Intentional complexity
Duplication is growing Duplication trajectories
Health direction or release decision Continuous health and release health

Read the full file on GitHub · 140 lines

Changes

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.

  1. 27d ago Changed ce63393cc602
  2. 1mo ago First seen · 140 lines · 60 tokens per session scan A b2f16f049637

Subscribe to this mod's changes

ctx is a skill published in the GitHub repository agentis-tools/ctx (13 stars, last pushed 5d ago), licensed Apache-2.0. It adds 60 tokens to every session and 1,556 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 100% identical to ctx, differing in 2 lines, and is treated as a copy.

Related

Other skills, from other repositories

diagnose-windows-sandbox-acl

Use on Windows for unexpected ALEGO sandbox access denials: workspace writes or listing fail, or an ordinarily readable path cannot be read. One bundled command inspects the path and every ancestor and repairs the ACL problems it proves in that same run. Expected confinement denials need no ACL repair.

singula-ai/alego · 67 tokens

md-audit

Read-only code quality audit — scan the current working directory for common issues (bugs, dead code, security hotspots, missing error handling) and return a prioritised findings report. No files are edited. Use when asked to "audit the code", "quick audit", "find issues", "code scan", or "what's wrong with this…

chaitanyagiri/munder-difflin · 85 tokens

monitoring-observability

OpenTelemetry, structured logging, distributed tracing, alerting, and dashboards. Use when instrumenting services, designing logs/traces/metrics, defining SLOs and alerts, or debugging production behavior from telemetry.

travisjneuman/.claude · 48 tokens

aster-fix-workflow

Pipe aster review findings into aster fix to generate and apply patches safely, using review --json, fix --findings-json, dry-run inspection, --apply, and permission gating. Use when asked to auto-fix review findings, apply aster's suggested edits, or build a review-then-fix pipeline.

Zfinix/aster · 71 tokens

debug-systematic

Systematic 4-phase debugging methodology for complex, intermittent, or mysterious issues. Use when investigating bugs, race conditions, or unexplained failures.

travisjneuman/.claude · 33 tokens

office-docx

Create, read, edit, and validate Word documents (.docx).

singula-ai/alego · 18 tokens