Skip to content
Back to skills

Refactor

ASecurity

Safe refactoring with dependency awareness. Use when restructuring, renaming, moving, extracting, or consolidating code.

  • 715 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 10, 2026
ai-agentsrefactoringapi

Works with

  • api

Security analysis

A100/100

Scanned November 10, 2026

npx -y skills add JordanCoin/codemap --skill refactor --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Refactor?

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

Security grade badge for Refactor
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/jordancoin-refactor/badge)](https://www.skillsdirectory.com/skills/jordancoin-refactor)

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
---
name: refactor
description: Safe refactoring with dependency awareness. Use when restructuring, renaming, moving, extracting, or consolidating code.
---

# Safe Refactoring with Code Intelligence

## Before refactoring

1. Run `codemap --deps .` to understand the dependency graph
2. Identify hub files in the refactoring scope: they need extra care
3. Run `codemap --diff` to see what's already changed on this branch

## Refactoring checklist

- [ ] All tests pass before starting
- [ ] Hub files identified and dependents listed
- [ ] Public API changes planned (additive preferred)
- [ ] Import paths updated if moving files
- [ ] No circular dependencies introduced

## Safe rename pattern

1. Add the new name alongside the old (alias/wrapper)
2. Update all callers to use the new name
3. Remove the old name
4. Run full test suite

## Safe move pattern

1. Create the new file with the same API
2. Re-export from the old location (temporary)
3. Update all importers to use the new path
4. Remove the old file and re-export

## After refactoring

- Run `codemap --deps .` again to verify the graph is clean
- Run `codemap --importers <moved-file>` to check nothing is broken
- Full test suite must pass

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.