code-remediate

code-remediate is a skill for Codex from Borda/AI-Rig. It costs 28 tokens per session (14,800 once invoked), scanned A, original, Apache-2.0.

A workflow for applying selected fixes from a code review or pull request. A pull request is a proposed code change submitted for review.

In plain words
What is it for?
Use it to fix selected review issues in a path, module, branch, or pull request.
Why use it?
It turns review findings into a tracked sequence of fixes and makes sure unresolved serious findings are explicitly noted.

Skill for Codex

Written for Codex: runs codex exec. Also seen: mentions Codex; $skill-name invocation.

Install

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.

agentmods
npx agentmods add skills/borda/ai-rig/code-remediate
Any agent
npx skills add Borda/AI-Rig --skill code-remediate
Clone the repo
git clone --depth 1 https://github.com/Borda/AI-Rig

Made for: 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 code-remediate

README.md
[![agentmods](https://agentmods.dev/badge/skills/borda/ai-rig/code-remediate.svg)](https://agentmods.dev/skills/borda/ai-rig/code-remediate)
Your own site
<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>
Per session 28 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 14,800 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found 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.00028 $0.14800
Opus 5 $0.00014 $0.07400
Sonnet 5 $0.00006 $0.02960
Haiku 4.5 $0.00003 $0.01480

Measured today against content hash a91a5cea4dc3, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

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.
plugins/codex-rig/skills/code-remediate/SKILL.md · 581 lines

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 assessed code-review result 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 with current-session-review-report-required and 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, and remediate <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 with Review 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 alias has same report lookup.
  • Natural-language aliases: remediate 123 report, remediate #123 report, and remediate 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, or review-report replaces a path, find the newest matching result across canonical .reports/codex/code-review/pr-<number>/run-<NNN>/result.json and legacy flat .reports/codex/code-review/<timestamp>/result.json artifacts whose sibling pr.json has the same PR number/URL as PR_TARGET.
  • When REQUESTED_REPORT=true, no matching code-review report => fail with direct instruction to run $code-review <target> first or supply report path. A matching-review-unavailable-rerun-code-review result 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. A matching-review-closed-not-remediable result is a terminal close disposition with no source findings; do not remediate it or fall back to an older assessed report. A matching-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.

Read the full file on GitHub · 581 lines

Files

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.

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. today Changed · -10 lines a91a5cea4dc3
  2. 2d ago First seen · 591 lines · 28 tokens per session scan A 9d3d2ccc5478

Subscribe to this mod's changes

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.

Related

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…

CassioRoos/godfly-skills · 77 tokens

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

CassioRoos/godfly-skills · 107 tokens

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…

hoangsonww/Claude-Code-Agent-Monitor · 73 tokens

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…

hoangsonww/Claude-Code-Agent-Monitor · 86 tokens

audit

Project health audit and health check — architecture, performance, tests, dependencies, code quality. Use when assessing overall project health, before releases, or after refactors.

oliver-kriska/claude-elixir-phoenix · 35 tokens

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…

hoangsonww/Claude-Code-Agent-Monitor · 82 tokens