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 skills add amitvijapur/cortex --skill cortex-reroutegit clone --depth 1 https://github.com/amitvijapur/cortexWrote 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.
[](https://agentmods.dev/skills/amitvijapur/cortex/cortex-reroute)<a href="https://agentmods.dev/skills/amitvijapur/cortex/cortex-reroute"><img src="https://agentmods.dev/badge/skills/amitvijapur/cortex/cortex-reroute/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.
<a href="https://agentmods.dev/skills/amitvijapur/cortex/cortex-reroute"><img src="https://agentmods.dev/badge/skills/amitvijapur/cortex/cortex-reroute.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00052 | $0.00767 |
| Opus 5.5 | $0.00021 | $0.00307 |
| Sonnet 5.5 | $0.00010 | $0.00153 |
| Haiku 4.5 | $0.00005 | $0.00077 |
Grade A, and why
cortex-reroute 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 6d 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 — 77 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/cortex-reroute
Flag the most recent route in the current project and agent session as outcome=corrected and record the route the user wanted instead. This is the highest-quality training signal for Phase 3 (similarity bias) when it activates.
When to invoke
- User types
/cortex-reroute "<corrected route>"explicitly - User says "reroute" / "actually use X" / "we should've used Y" right after a routing line
- User says "the right route was..." / "should've been..." / "redo with..."
- Any clear post-hoc correction of the last logged route
What to do
Step 1 — Mark the last entry as corrected
Resolve the state directory from CORTEX_HOME, then CLAUDE_DIR, then
$HOME/.claude, matching the CLI and installer. Keep a custom override exported
in the agent's environment.
cortex_state_dir="${CORTEX_HOME:-${CLAUDE_DIR:-$HOME/.claude}}"
python3 "$cortex_state_dir/bin/cortex" reroute --to "<the route the user wanted>"
The CLI:
- Appends a correction for the latest route in the current project and session
- Stores the user's preferred route in
user_correction - Prints the before → after delta
If the CLI cannot identify that session, inspect cortex history <task_hash> and
pass the intended route's exact ID with --ref. Never pick another project's
route or infer a target from an ambiguous legacy ID.
Step 2 — Log the new route
If the user wants the corrected route to actually run now, log it as a fresh entry with --redirect-from so the two are linked:
cortex_state_dir="${CORTEX_HOME:-${CLAUDE_DIR:-$HOME/.claude}}"
python3 "$cortex_state_dir/bin/cortex" log \
--task "<same task as before>" \
--class <class> \
--system <new system> \
--pattern <new pattern> \
--agent "<new agent>" \
--tier <new tier> \
--tier-reason "<...>" \
--system-reason "User redirected from <old route>" \
--redirect-from "<old route>"
The redirect_from field links the corrected entry to the new one — Phase 3 uses this to learn "Cortex picked X, user wanted Y" deltas.
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.
- 6d ago Changed · +6 lines 1a9469b597b3
- 1mo ago Changed · +5 lines 95335dc8780f
- 1mo ago First seen · 66 lines · 52 tokens per session scan A e05f7c31a03c
cortex-reroute is a skill published in the GitHub repository amitvijapur/cortex (5 stars, last pushed 3d ago), licensed MIT. It adds 52 tokens to every session and 767 once invoked, about $0.0002 per session on Opus 5.5. 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-31.
Other skills, from other repositories
accelerated-computing-cudf
Official NVIDIA-authored guidance for NVIDIA cuDF GPU DataFrames, pandas acceleration, dask-cuDF, ETL, joins, groupby, CSV/Parquet I/O, nullable semantics, and multi-GPU DataFrame workloads.
cuopt-routing-api-python
Vehicle routing (VRP, TSP, PDP) with cuOpt — Python API only. Use when the user is building or solving routing in Python.
mcore-linting-and-formatting
Linting and formatting for Megatron-LM. Covers running autoformat.sh, tools (ruff, black, isort, pylint, mypy), and code style rules.
holoscan-module-lifecycle
Develop external Holoscan Modules with the Holoscan CLI and use them in Holoscan applications: scaffold, test, Python bindings, DEB/WHEEL packaging, and clean-consumer proof.
cuopt-numerical-optimization-api
LP, MILP, and QP (beta) with cuOpt — Python, C, and CLI. Use when the user is solving LP, MILP, or QP with any cuOpt interface.
holoscan-install-wheel
Install Holoscan SDK 5.x CUDA 13 Python wheels in an isolated environment, choosing the full stack or version-matched components.