Characterization tests, small mechanical steps, and clean-cut commits keeping refactors boring.
Scanned 9/29/2026
npx -y skills add aniruddhaadak80/skills --skill code-quality-refactor-safely-node --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Code Quality Refactor Safely Node?
Add the live security badge to your README โ it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/aniruddhaadak80-code-quality-refactor-safely-node)More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.
---
name: code-quality-refactor-safely-node
description: "Characterization tests, small mechanical steps, and clean-cut commits keeping refactors boring."
---
# Refactor without breaking behavior (Node.js)
> Characterization tests, small mechanical steps, and clean-cut commits keeping refactors boring.
**Track:** ๐งฐ Engineering Essentials ยท **Domain:** Code Quality ยท **Level:** intermediate ยท **~35 min**
**Who this is for:** All Software Engineers
## When to Use This Skill
Characterization tests, small mechanical steps, and clean-cut commits keeping refactors boring.
Use it whenever a matching task appears in conversation โ the agent loads these instructions on demand.
## Steps
1. Pin current behavior with characterization tests where gaps exist
2. Plan steps each leaving tests green; commit per step
3. Prefer mechanical moves (extract, inline, rename) over clever rewrites
4. Keep behavior changes in separate PRs from structure moves
5. Measure complexity delta honestly; stop when readability peaks
6. Leave the campsite cleaner but don't rebuild the forest
7. Profile with --cpu-prof and clinic; inspect event-loop lag
8. Guard against blocking calls in hot paths with async worker offload
## Common Pitfalls
- Big-bang rewrites losing hidden behaviors
- 'While I'm here' feature creep inside refactor PRs
## Commands
**Install with skills CLI**
```bash
npx skills add aniruddhaadak80/skills --skill code-quality-refactor-safely-node
```
**Install globally**
```bash
npx skills add aniruddhaadak80/skills --skill code-quality-refactor-safely-node -g
```
---
Part of [aniruddhaadak80/skills](https://github.com/aniruddhaadak80/skills) ยท Browse all at https://skills.sh/aniruddhaadak80/skillsIs this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!