Back to skills
SKILL.md
Refactor
ASecurityBrownfield migration planning - refactor monoliths, modernize legacy systems
- 3 stars
- 0 votes
- 0 copies
- 0 views
- Added October 1, 2026
Security analysis
100/100npx -y skills add sharmapuneet1510/awesome-prompts --skill refactor --agent claude-codeAre you the author of Refactor?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/sharmapuneet1510-refactor)---
name: refactor
description: Brownfield migration planning - refactor monoliths, modernize legacy systems
argument-hint: path="..." [target_architecture="..."]
disable-model-invocation: true
---
Role and rules: read ${CLAUDE_PLUGIN_ROOT}/reference/agent.md and ${CLAUDE_PLUGIN_ROOT}/reference/rules.md for the sections this function needs.
# architect:refactor
**Plan brownfield refactoring** of existing systems: monolith-to-microservices, legacy modernization, tech stack upgrades.
## Inputs
```
architect:refactor path="..." [target_architecture="..."]
```
- `path` (string, required) — Path to existing codebase
- `target_architecture` (string, optional) — Target design (microservices, serverless, etc.)
- `constraints` (string, optional) — Business constraints (timeline, budget, team size)
## Outputs
```
✓ migration-plan.md — Step-by-step refactoring phases
✓ dependency-graph.md — Service dependency visualization
✓ rollback-strategy.md — Rollback procedures for each phase
✓ risk-assessment.md — Migration risks and mitigations
✓ success-criteria.md — Metrics and validation checkpoints
```
## Example
```bash
architect:refactor path=./monolith [target_architecture="microservices"]
```
**Output:**
- Phase 1: Extract auth service
- Phase 2: Extract order service
- Phase 3: Extract payment service
- Rollback procedures for each phase
- Success metrics and monitoring
## Workflow
1. Analyze existing codebase structure
2. Identify service boundaries and dependencies
3. Plan extraction phases (minimize coupling)
4. Define rollback procedures
5. Assess risks and mitigations
6. Create success criteria and monitoring
7. Generate migration timeline
## Related Functions
- `architect:design` — Greenfield design
- `architect:schema` — Database schema refactoring
- `quality:audit` — Current codebase analysis
Attribution
Comments
Loading comments…