Skip to content
Back to skills

Refactoring Patterns

ASecurity

Safe, behavior-preserving refactoring moves with a test safety net

  • 7 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 30, 2026
ai-agentsrefactoringapi

Works with

  • api

Security analysis

A100/100

Scanned November 30, 2026

npx -y skills add ansh44233/forge --skill refactoring-patterns --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Refactoring Patterns?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Refactoring Patterns
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ansh44233-refactoring-patterns/badge)](https://www.skillsdirectory.com/skills/ansh44233-refactoring-patterns)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
description: Safe, behavior-preserving refactoring moves with a test safety net
profile: standard
tags: refactor
---

# Refactoring Patterns
- Establish a green test baseline first; add characterization tests for untested code.
- Prefer small named moves: extract function, inline variable, move module, replace conditional with polymorphism, introduce parameter object.
- One move per commit; run tests after each.
- Separate refactors from behavior changes in different commits or PRs.

## Verify
The full test suite passes after every move, and the diff contains no behavior change (same public API and outputs; snapshot or characterization tests unchanged).

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.