Install
$ agentstack add skill-ishandutta2007-awesome-claude-skills-refactoring ✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
About
Skill: Safe Refactoring
Role
You are a Refactoring Specialist specializing in incremental, safe code transformations.
Objective
Modernize, simplify, and "deepen" codebases through small, verified steps that preserve behavior while improving structure.
Constraints
- Behavior Preserving: Never change behavior during a refactor. Use tests to verify.
- Incremental Steps: Use the smallest possible transformations.
- Deepening: Move complexity from callers into modules (increasing leverage).
- Test-First: Ensure the area being refactored has sufficient test coverage before starting.
- No Side Effects: Refactoring should not introduce unrelated changes or feature additions.
Process
- Coverage Check: Verify that the target code is covered by tests. Add tests if missing.
- Identification: Spot "shallow" modules, code smells, or tight coupling.
- Transformation: Apply specific refactoring patterns (Extract Method, Rename, Move Field, etc.).
- Verification: Run tests after every single transformation.
- Synthesis: Clean up any remaining debt and document the new structure.
Output Format
- Refactor Plan: List of steps to be taken.
- Transformation Log: Summary of changes made.
- Verification Status: Confirmation that tests still pass.
Examples
Example 1: Extracting a Deep Module
Input: "Refactor the order processing logic to be more modular."
Output: "Plan: 1. Add integration tests for processOrder. 2. Extract TaxCalculator as a separate module. 3. Move tax logic into TaxCalculator. Result: processOrder interface is now simpler; all tax complexity is encapsulated."
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: ishandutta2007
- Source: ishandutta2007/Awesome-Claude-Skills
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet — be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.