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 skills add The-AI-Directory-Company/agents-and-skills --skill refactoring-checklistgit clone --depth 1 https://github.com/The-AI-Directory-Company/agents-and-skillsWrote 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/the-ai-directory-company/agents-and-skills/refactoring-checklist)<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.
<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>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.00029 | $0.01383 |
| Opus 5 | $0.00015 | $0.00691 |
| Sonnet 5 | $0.00006 | $0.00277 |
| Haiku 4.5 | $0.00003 | $0.00138 |
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.
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:
- What are you refactoring? — Specific file, module, function, or pattern
- Why? — Performance, readability, removing duplication, enabling a new feature, reducing complexity
- What is the current test coverage? — Run coverage report on the target code
- What depends on this code? — Callers, importers, API consumers, downstream services
- What is the blast radius? — If this breaks, who is affected?
- 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
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.
- 9d ago First seen · 151 lines · 29 tokens per session scan A 83fe62e3a812
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.
Other skills, from other repositories
go-testing
Trigger: Go tests, go test coverage, Bubbletea teatest, golden files. Apply focused Go testing patterns.
refactor
Refactors code for quality and maintainability. Triggers: refactor, clean up, restructure, improve code, modernize.
coverage
Compute code coverage for active track or module. Targets 95%+ coverage with report and justification for uncovered lines. Complements TDD workflow.
improving-tests
Improve test design, speed, and coverage with behavior-focused tests, useful seams, characterization tests, TDD, and test refactoring. Use when improving tests, optimizing slow suites, adding coverage, refactoring brittle tests, removing test waste, or working test-first. NOT for fixing production bugs (use…
review
Review Playwright tests for quality. Use when user says "review tests", "check test quality", "audit tests", "improve tests", "test code review", or "playwright best practices check".
testing-laravel
Writes Laravel tests using PHPUnit. Use when "write tests", "add tests", "phpunit", "laravel test", "feature test", "unit test", "mock", "factory", or testing controllers, models, services, actions, jobs, artisan commands, or API endpoints.