refactoring-checklist

refactoring-checklist is a skill for Claude Code, Codex from The-AI-Directory-Company/agents-and-skills. It costs 29 tokens per session (1,383 once invoked), scanned A, original, MIT.

A cautious checklist for changing existing code without changing what it does, using tests and incremental steps to check the result.

In plain words
What is it for?
It helps assess refactoring scope, check test coverage, identify dependencies, and verify behavior before and after changes.
Why use it?
It reduces the risk of regressions—new bugs caused by changes to code that previously worked—especially when other code depends on it.

Skill for Claude CodeCodex

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

Good fit It helps assess refactoring scope, check test coverage, identify dependencies, and verify behavior before and after changes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/the-ai-directory-company/agents-and-skills/refactoring-checklist
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 The-AI-Directory-Company/agents-and-skills --skill refactoring-checklist
Clone the repo
git clone --depth 1 https://github.com/The-AI-Directory-Company/agents-and-skills

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 refactoring-checklist

README.md
[![agentmods](https://agentmods.dev/badge/skills/the-ai-directory-company/agents-and-skills/refactoring-checklist/github.svg)](https://agentmods.dev/skills/the-ai-directory-company/agents-and-skills/refactoring-checklist)
Your own site
<a href="https://agentmods.dev/skills/the-ai-directory-company/agents-and-skills/refactoring-checklist"><img src="https://agentmods.dev/badge/skills/the-ai-directory-company/agents-and-skills/refactoring-checklist/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 refactoring-checklist

Your own site · 80×15
<a href="https://agentmods.dev/skills/the-ai-directory-company/agents-and-skills/refactoring-checklist"><img src="https://agentmods.dev/badge/skills/the-ai-directory-company/agents-and-skills/refactoring-checklist.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 29 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,383 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.00029 $0.01383
Opus 5 $0.00015 $0.00691
Sonnet 5 $0.00006 $0.00277
Haiku 4.5 $0.00003 $0.00138

Measured 9d ago against content hash 83fe62e3a812, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

refactoring-checklist 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 9d 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/refactoring-checklist/SKILL.md · 151 lines

How it starts

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

Refactoring Checklist

Before you start

Gather the following before touching code:

  1. What are you refactoring? — Specific file, module, function, or pattern
  2. Why? — Performance, readability, removing duplication, enabling a new feature, reducing complexity
  3. What is the current test coverage? — Run coverage report on the target code
  4. What depends on this code? — Callers, importers, API consumers, downstream services
  5. What is the blast radius? — If this breaks, who is affected?
  6. Is there a deadline? — Refactoring without time pressure is safer. If rushed, reduce scope.

Do not refactor code you do not understand. Read it first, understand its intent and edge cases, then plan the change.

Procedure

1. Verify test coverage before changing anything

Run the existing test suite against the target code:

COVERAGE BEFORE:
- Statements: [X%]
- Branches: [X%]
- Functions: [X%]
- Lines: [X%]

If coverage is below 80%, write tests for the existing behavior BEFORE refactoring. These tests are your safety net — they verify the refactoring does not change behavior.

Tests to add before refactoring:

  • Happy path with typical inputs
  • Edge cases: empty input, null, boundary values
  • Error paths: what happens when things fail
  • Integration points: verify interactions with dependencies

2. Define the target state

Write down what the code should look like AFTER refactoring:

CURRENT: [describe current structure]
TARGET: [describe target structure]
REASON: [why target is better — measurable if possible]
SCOPE: [exactly which files/functions change]
NOT CHANGING: [explicitly list what stays the same]

3. Make a refactoring plan

Break the refactoring into small, independently verifiable steps. Each step should:

  • Be committable on its own
  • Pass all tests after completion
  • Not change external behavior

Common step sequences:

Extract: Identify code to extract -> Write tests for it -> Extract to new function/module -> Update callers -> Verify tests pass

Read the full file on GitHub · 151 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. 9d ago First seen · 151 lines · 29 tokens per session scan A 83fe62e3a812

Subscribe to this mod's changes

refactoring-checklist is a skill published in the GitHub repository The-AI-Directory-Company/agents-and-skills (2 stars, last pushed 5mo ago), licensed MIT. It adds 29 tokens to every session and 1,383 once invoked, about $0.0001 per session on Opus 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.