test-rename-drift

test-rename-drift is a skill for Claude Code, Codex from fabioc-aloha/Alex_Skill_Mall. It costs 23 tokens per session (600 once invoked), scanned A, original, MIT.

A checklist for checking tests after a function is renamed. It looks for the old and new names in calls, imports, test descriptions, comments, mocks, variables, and snapshot files.

In plain words
What is it for?
Use it after renaming functions to find lingering references and confirm that tests now use the intended name.
Why use it?
A rename can update code while leaving outdated names in test text and related files, causing confusion or incomplete cleanup.

Skill for Claude CodeCodex

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

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is node scripts/check-rename-drift.cjs oldFunctionName newFunctionName.

Good fit Use it after renaming functions to find lingering references and confirm that tests now use the intended name.

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/fabioc-aloha/Alex_Skill_Mall
agentmods
npx agentmods add skills/fabioc-aloha/alex_skill_mall/test-rename-drift

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 test-rename-drift

README.md
[![agentmods](https://agentmods.dev/badge/skills/fabioc-aloha/alex_skill_mall/test-rename-drift/github.svg)](https://agentmods.dev/skills/fabioc-aloha/alex_skill_mall/test-rename-drift)
Your own site
<a href="https://agentmods.dev/skills/fabioc-aloha/alex_skill_mall/test-rename-drift"><img src="https://agentmods.dev/badge/skills/fabioc-aloha/alex_skill_mall/test-rename-drift/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 test-rename-drift

Your own site · 80×15
<a href="https://agentmods.dev/skills/fabioc-aloha/alex_skill_mall/test-rename-drift"><img src="https://agentmods.dev/badge/skills/fabioc-aloha/alex_skill_mall/test-rename-drift.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 23 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 600 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00023 $0.00600
Opus 5.5 $0.00009 $0.00240
Sonnet 5.5 $0.00005 $0.00120
Haiku 4.5 $0.00002 $0.00060

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

Security

Grade A, and why

test-rename-drift 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 2mo 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.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

const { execSync } = require('child_process');
plugins/code-quality/test-rename-drift/skills/test-rename-drift/SKILL.md · 92 lines

How it starts

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

Test Rename Drift

The Problem

When renaming a function, test files have references that survive find-and-replace:

// Old function: calculateTotal()
// New function: computeTotal()

// Find-and-replace catches: calculateTotal(
// But misses:
describe('calculateTotal', () => {  // Describe block
  // tests for calculateTotal    // Comment
  it('calculateTotal returns sum', () => { // It block text

The Solution

Grep for BOTH the old AND new name after renaming.

# After renaming calculateTotal → computeTotal

# Find remaining old references
grep -rn "calculateTotal" . --include="*.test.*" --include="*.spec.*"

# Verify new references exist
grep -rn "computeTotal" . --include="*.test.*" --include="*.spec.*"

Checklist

Location Find Pattern Replace?
Function calls oldName( ✅ Auto
Import statements import { oldName } ✅ Auto
Describe blocks describe('oldName' ❌ Manual
It block text it('oldName should' ❌ Manual
Comments // oldName does X ❌ Manual
Variable names const oldNameResult Depends
Mock names jest.mock('oldName') ❌ Manual
Snapshot files Contains "oldName" ❌ Manual

Automated Check

// scripts/check-rename-drift.cjs
const oldName = process.argv[2];
const newName = process.argv[3];

const { execSync } = require('child_process');

const oldRefs = execSync(
  `grep -rn "${oldName}" . --include="*.test.*" --include="*.spec.*" || true`,
  { encoding: 'utf8' }
);

if (oldRefs.trim()) {
  console.error(`Found ${oldRefs.split('\n').length - 1} remaining references to "${oldName}":`);
  console.error(oldRefs);
  process.exit(1);
}

console.log(`No remaining references to "${oldName}" in test files.`);

Verification

# Run after any rename
node scripts/check-rename-drift.cjs oldFunctionName newFunctionName

# Should report: "No remaining references"

When to Apply

  • After any function/class/method rename
  • Before committing renamed code
  • During code review of renames

Read the full file on GitHub · 92 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. 2mo ago First seen · 92 lines · 23 tokens per session scan A 049b5be74e52

Subscribe to this mod's changes

test-rename-drift is a skill published in the GitHub repository fabioc-aloha/Alex_Skill_Mall (6 stars, last pushed yesterday), licensed MIT. It adds 23 tokens to every session and 600 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

test-rename-drift compared with skills from other repositories

test-rename-drift next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
test-rename-driftfabioc-aloha/Alex_Skill_MallSkill6yesterdayMITA23Claude Code, Codex
eval-agentsFlorianBruniaux/claude-code-ultimate-guideSkill7.6ktodayCC-BY-SA-4.0A80Claude Code
land-and-deployFlorianBruniaux/claude-code-ultimate-guideSkill7.6ktodayCC-BY-SA-4.0A41Claude Code
git-ai-archaeologyFlorianBruniaux/claude-code-ultimate-guideSkill7.6ktodayCC-BY-SA-4.0A82Claude Code
prFlorianBruniaux/claude-code-ultimate-guideSkill7.6ktodayCC-BY-SA-4.0A16Claude Code
commitFlorianBruniaux/claude-code-ultimate-guideSkill7.6ktodayCC-BY-SA-4.0A10Claude Code
source-command-ccguide-dailyFlorianBruniaux/claude-code-ultimate-guideSkill7.6ktodayCC-BY-SA-4.0A23Claude Code, Codex