audit-codemod-safety

audit-codemod-safety is a skill for Claude Code from kensaurus/cursor-kenji. It costs 60 tokens per session (1,839 once invoked), scanned A, original, MIT.

A read-only guide for checking whether a bulk code transformation preserves the program's behavior, not just whether the changed code still compiles.

In plain words
What is it for?
Use it to review codemods and mass find-and-replace changes for missing edits, inconsistent results, and behavior changes. It does not rerun the transformation or edit the diff.
Why use it?
Large automated edits can look correct in every file while quietly changing what the software does.

Skill for Claude Code

Written for Claude Code: effort in frontmatter.

Part of the cursor-kenji plugin — 132 skills, 63 commands, 6 agents, 1 hook, 3 MCP servers shipped together

Good fit Use it to review codemods and mass find-and-replace changes for missing edits, inconsistent results, and behavior changes. It does not rerun the transformation or edit the diff.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kensaurus/cursor-kenji/audit-codemod-safety
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.

Any agent
npx skills add kensaurus/cursor-kenji --skill audit-codemod-safety
Clone the repo
git clone --depth 1 https://github.com/kensaurus/cursor-kenji

Made for: Claude Code.

Or install cursor-kenji, the plugin that ships this one along with the rest of its 132 skills, 63 commands, 6 agents, 1 hook, 3 MCP servers.

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 audit-codemod-safety

README.md
[![agentmods](https://agentmods.dev/badge/skills/kensaurus/cursor-kenji/audit-codemod-safety/github.svg)](https://agentmods.dev/skills/kensaurus/cursor-kenji/audit-codemod-safety)
Your own site
<a href="https://agentmods.dev/skills/kensaurus/cursor-kenji/audit-codemod-safety"><img src="https://agentmods.dev/badge/skills/kensaurus/cursor-kenji/audit-codemod-safety/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 audit-codemod-safety

Your own site · 80×15
<a href="https://agentmods.dev/skills/kensaurus/cursor-kenji/audit-codemod-safety"><img src="https://agentmods.dev/badge/skills/kensaurus/cursor-kenji/audit-codemod-safety.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,839 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 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.00060 $0.01839
Opus 5.5 $0.00024 $0.00736
Sonnet 5.5 $0.00012 $0.00368
Haiku 4.5 $0.00006 $0.00184

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

Security

Grade A, and why

audit-codemod-safety 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 1mo 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.

skills/audit-codemod-safety/SKILL.md · 160 lines

How it starts

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

audit-codemod-safety — Compiles and lints is not behaves the same

Degree of freedom: MIXED — Phases 0–2 [HIGH freedom]; Phase 3 high-risk hand-trace [LOW freedom — run exactly]. Do not re-run the transform.

Read-only. A codemod's danger is scale plus plausibility: it touches hundreds of files and each diff looks trivially correct, so review fatigue waves it through. A mechanical transform proves syntax, not semantics.

Present findings. Do not re-run the transform or edit the diffs. Hand fixes to a follow-up session.

This skill vs neighbors

Skill Owns
audit-codemod-safety (this) Source-transform correctness at scale — behavior, completeness, consistency
audit-code-review General PR / diff quality on a named change set
plan-data-integrity Data / SQL / destructive migrations — not JS/TS source mods
audit-code-quality Repo-wide anti-patterns, not one mechanical pass
burndown-full Drive a leftover MATCH pattern to zero — this audits whether the pass was safe
audit-gate-logic If size defeated review and syntax defeated linters, that is also a gate-logic finding

How to reason

  1. Observe — quote the rule, the before/after AST or text, and a concrete diff hunk
  2. Interpret — does the swap change runtime meaning, or only spelling?
  3. Classify — silent behavior change / incomplete migration / consistent-as-is / needs-a-probe
  4. Severity — silent runtime change on a hot path = critical

Worked example

Observe: codemod rewrote value || fallback → value ?? fallback in pricing.ts. Tests still pass. Interpret: 0 and '' now keep the left side; price 0 no longer falls back. Syntax-clean; semantics changed. Classify: silent behavior change (truthiness vs nullish). Severity: critical if money path; else major. Finding: pricing.ts:41 | ||→?? | critical | 0 no longer defaults


Phase 0 — Characterize the transform [HIGH freedom]

Read the full file on GitHub · 160 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. 1mo ago Changed · +1 lines · -16 tokens per session adc86f9132c0
  2. 1mo ago First seen · 159 lines · 76 tokens per session scan A bfde04399ff1

Subscribe to this mod's changes

audit-codemod-safety is a skill published in the GitHub repository kensaurus/cursor-kenji (9 stars, last pushed 26d ago), licensed MIT. It adds 60 tokens to every session and 1,839 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-09-03.