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 skills/borda/ai-rig/code-remediatenpx skills add Borda/AI-Rig --skill code-remediategit clone --depth 1 https://github.com/Borda/AI-RigWrote 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/borda/ai-rig/code-remediate)<a href="https://agentmods.dev/skills/borda/ai-rig/code-remediate"><img src="https://agentmods.dev/badge/skills/borda/ai-rig/code-remediate.svg" alt="Measured on agentmods" 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.00028 | $0.14800 |
| Opus 5 | $0.00014 | $0.07400 |
| Sonnet 5 | $0.00006 | $0.02960 |
| Haiku 4.5 | $0.00003 | $0.01480 |
Grade A, and why
code-remediate scanned grade A with 1 finding 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 today.
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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
- Never inspect/edit PR code from `curl`, `raw.githubusercontent.com`, or copied `head-files/` snapshots; raw-file snapshot rejection: snapshots are rejected. How it starts
The opening of the file, as written. The whole thing — 581 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Code Remediate
See the fixed recurrence and root-cause policy and reasoning-progress escalation policy for repeated-obstacle handling; record and validate reasoning-progress.json before another cycle after an escalation trigger.
Run linear code remediation to close findings.
Input Schema
{
"findings_source": "optional path, explicit list, review for the current-session assessed review, or +review/+report/report/latest to auto-select the newest matching PR review report; omit with a bare PR target to use current online review items",
"mode": "optional report|pr|auto; infer pr for bare number, #number, or PR URL",
"target": "optional shorthand target number, issue/PR URL, path, or current branch",
"pr_target": "optional PR number, PR URL, or current branch PR when mode=pr",
"remediation_scope": "optional all|critical|high|medium|low|comma-separated severities|comma-separated selection indexes; ask before editing when omitted",
"target_scope": "required path/module",
"done_when": "selected findings are fixed/resolved and unselected critical/high findings are explicitly deferred"
}
Workflow (Exact Commands)
01: Create Run Directory
Run create_run.py --skill code-remediate per ../../shared/helper-cli-contract.md.
02: Normalize input and optional report findings
Shorthand rules:
- Canonical in-session report:
$code-remediate review=>mode=report,REQUESTED_REPORT=true,FINDINGS_SOURCE=latest-assessed-current-session-review. It resolves to the latest assessedcode-reviewresult created in the current session. Reuse the exact prior artifact path recorded in this session; do not scan reports or infer a PR target. Do not collect PR evidence or fetch online review comments. If no assessed current-session review result is available, fail withcurrent-session-review-report-requiredand instruct the user to run$code-review <target>first or supply a report path. - Canonical online-only PR:
$code-remediate #123=>mode=pr,PR_TARGET=123,REQUESTED_REPORT=false,FINDINGS_SOURCE=none. Accepted bare PR forms are: bare number,#number, PR URL, and natural-language bare PR targets; they collect current online items and verified local checkout without a prior review report. - Natural-language online-only aliases:
remediate 123,remediate #123,remediate PR 123, andremediate <github-pr-url>use the same bare-PR route. - Canonical report-backed PR:
$code-remediate #123 +review=>mode=pr,PR_TARGET=123,REQUESTED_REPORT=true,FINDINGS_SOURCE=latest-matching-review-report. matching-review-incomplete:<run-directory>means an identified review retained notes but never produced a promoted result or candidate. Lead withReview handoff blocked, link that retained run, and explain that preliminary evidence exists but the review did not complete. Return to the producer completion checkpoint; do not claim no review was performed, consume notes as a validated result, select an older verdict, or switch to online-only intake. This applies across sessions as well as within one session. A newer malformed result similarly blocks stale assessed fallback.- Compatibility alias:
$code-remediate #123 +report=>mode=pr,PR_TARGET=123,REQUESTED_REPORT=true,FINDINGS_SOURCE=latest-matching-review-report;$code-remediate #123 +report compatibility aliashas same report lookup. - Natural-language aliases:
remediate 123 report,remediate #123 report, andremediate PR 123 report=>mode=pr,PR_TARGET=123,REQUESTED_REPORT=true,FINDINGS_SOURCE=latest-matching-review-report. remediate <github-pr-url> report=>mode=pr,PR_TARGET=<github-pr-url>,REQUESTED_REPORT=true,FINDINGS_SOURCE=latest-matching-review-report.- An explicit review result path combined with a PR target sets
REQUESTED_REPORT=true; a bare PR target has no implicit report path. - Bare PR and report-backed PR routing are distinct: explicit
+review,+report, report aliases, and report paths retain report-plus-online behavior; absence of a report source selects online-only intake and never falls back to report lookup. - If
+review,+report,report,latest,latest-report, orreview-reportreplaces a path, find the newest matching result across canonical.reports/codex/code-review/pr-<number>/run-<NNN>/result.jsonand legacy flat.reports/codex/code-review/<timestamp>/result.jsonartifacts whose siblingpr.jsonhas the same PR number/URL asPR_TARGET. - When
REQUESTED_REPORT=true, no matching code-review report => fail with direct instruction to run$code-review <target>first or supply report path. Amatching-review-unavailable-rerun-code-reviewresult means PR collection failed before any assessed review; do not use it as findings input, and rerun$code-review <target>after resolving the collection failure. Amatching-review-closed-not-remediableresult is a terminal close disposition with no source findings; do not remediate it or fall back to an older assessed report. Amatching-review-candidate-unpromoted:<path>result requires the bounded same-session recovery below; do not fall back to an older assessed report. - When canonical matching PR runs exist, select the greatest parsed numeric
run-<NNN>index. Otherwise select the greatest parsed legacy flat timestamp. Never rely on lexical glob order, modification time, or directory traversal order; record the selected path in<run-directory>/findings-input.txt.
What ships with it
2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- today Changed · -10 lines a91a5cea4dc3
- 2d ago First seen · 591 lines · 28 tokens per session scan A 9d3d2ccc5478
code-remediate is a skill published in the GitHub repository Borda/AI-Rig (26 stars, last pushed today), licensed Apache-2.0. It adds 28 tokens to every session and 14,800 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other skills, from other repositories
troubleshooting-investigator
Structured troubleshooting and bug investigation workflow for something failing NOW. Use when debugging failing tests, production issues, regressions, flaky behavior, errors, logs, broken builds, performance problems, or unclear symptoms. For tracing why a past failure really happened use root-cause; for understanding…
root-cause
Causal-chain analysis after something already happened: trace a symptom to its systemic cause using evidence-backed Five Whys and first-principles constraint challenges. Use for root cause, why did this really happen, underlying or systemic cause, and incident causal analysis once the immediate failure is understood.…
transcript-grep
Search a Claude Code session transcript for a string or regex pattern and show every matching message with surrounding context. Reads /api/sessions/:id/transcript and resolves sessions via /api/sessions?limit= from the Agent Monitor dashboard. Use when hunting for a specific message, prompt, tool call, or error inside…
anomaly-alert
Identify anomalous sessions using Agent Monitor data — cost outliers from the pricing engine, token anomalies (cache miss spikes, compaction baseline surges), unusual event type ratios (PreToolUse/PostToolUse gaps, APIError clusters), behavioral deviations from workflow intelligence (complexity score outliers, error…
audit
Project health audit and health check — architecture, performance, tests, dependencies, code quality. Use when assessing overall project health, before releases, or after refactors.
regression-watch
Detect quality and efficiency regressions over time using Agent Monitor data — rising error rate (APIError events), falling cache hit rate, growing compaction frequency, and climbing cost-per-session. Splits history into an earlier baseline window and a recent window and reports which metrics are getting worse, by how…