Systematic Code Refactoring
luongnv89/claude-howto
Guides refactoring in phases based on Martin Fowler's method: research, test coverage check, planning and small tested steps, with your approval at each phase.
Identify technical debt from actual code and change history, estimate its impact, and prioritize bounded improvements with explicit assumptions.
$ npx skills add sickn33/agentic-awesome-skills --skill code-refactoring-tech-debt -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install sickn33/agentic-awesome-skills code-refactoring-tech-debt --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/sickn33/agentic-awesome-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/code-refactoring-tech-debt .claude/skills/code-refactoring-tech-debt && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "code-refactoring-tech-debt" agent skill from https://github.com/sickn33/agentic-awesome-skills/tree/main/skills/code-refactoring-tech-debt into .claude/skills/code-refactoring-tech-debt/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "code-refactoring-tech-debt", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/sickn33/agentic-awesome-skills/tree/main/skills/code-refactoring-tech-debtType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add sickn33/agentic-awesome-skills --skill code-refactoring-tech-debt -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install sickn33/agentic-awesome-skills code-refactoring-tech-debt --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/sickn33/agentic-awesome-skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/code-refactoring-tech-debt .agents/skills/code-refactoring-tech-debt && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "code-refactoring-tech-debt" agent skill from https://github.com/sickn33/agentic-awesome-skills/tree/main/skills/code-refactoring-tech-debt into .agents/skills/code-refactoring-tech-debt/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "code-refactoring-tech-debt", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add sickn33/agentic-awesome-skills --skill code-refactoring-tech-debt -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install sickn33/agentic-awesome-skills code-refactoring-tech-debt --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/sickn33/agentic-awesome-skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/code-refactoring-tech-debt .cursor/skills/code-refactoring-tech-debt && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "code-refactoring-tech-debt" agent skill from https://github.com/sickn33/agentic-awesome-skills/tree/main/skills/code-refactoring-tech-debt into .cursor/skills/code-refactoring-tech-debt/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "code-refactoring-tech-debt", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/sickn33/agentic-awesome-skills.git --path skills/code-refactoring-tech-debt--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add sickn33/agentic-awesome-skills --skill code-refactoring-tech-debt -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install sickn33/agentic-awesome-skills code-refactoring-tech-debt --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/sickn33/agentic-awesome-skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/code-refactoring-tech-debt .gemini/skills/code-refactoring-tech-debt && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "code-refactoring-tech-debt" agent skill from https://github.com/sickn33/agentic-awesome-skills/tree/main/skills/code-refactoring-tech-debt into .gemini/skills/code-refactoring-tech-debt/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "code-refactoring-tech-debt", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install sickn33/agentic-awesome-skills code-refactoring-tech-debtInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add sickn33/agentic-awesome-skills --skill code-refactoring-tech-debt -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/sickn33/agentic-awesome-skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/code-refactoring-tech-debt .github/skills/code-refactoring-tech-debt && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "code-refactoring-tech-debt" agent skill from https://github.com/sickn33/agentic-awesome-skills/tree/main/skills/code-refactoring-tech-debt into .github/skills/code-refactoring-tech-debt/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "code-refactoring-tech-debt", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add sickn33/agentic-awesome-skills --skill code-refactoring-tech-debt -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install sickn33/agentic-awesome-skills code-refactoring-tech-debt --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/sickn33/agentic-awesome-skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/code-refactoring-tech-debt .opencode/skills/code-refactoring-tech-debt && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "code-refactoring-tech-debt" agent skill from https://github.com/sickn33/agentic-awesome-skills/tree/main/skills/code-refactoring-tech-debt into .opencode/skills/code-refactoring-tech-debt/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "code-refactoring-tech-debt", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
code-refactoring-tech-debtIdentify technical debt from actual code and change history, estimate its impact, and prioritize bounded improvements with explicit assumptions.
Code Refactoring Tech Debt is an agent skill from sickn33/agentic-awesome-skills. Identify technical debt from actual code and change history, estimate its impact, and prioritize bounded improvements with explicit assumptions.
Its SKILL.md is about 2.9k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Development, covering Technical debt and Refactoring. The repository describes itself as: AAS Core is the local, agent-first control plane for complete catalog discovery, agent-owned selection, stack validation, and planning, backed by 2,400+ agentic skills. Includes… The licence is MIT.
8 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 1e53ce2. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are yaml, python and markdown).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Code Refactoring Tech Debt loads about 2.9k tokens when it runs. Until then it costs about 43 tokens; SKILL.md has 702 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from sickn33/agentic-awesome-skills at commit 1e53ce2, republished under its MIT licence (© sickn33). 702 words, ~2,870 tokens.
.claude/skills/code-refactoring-tech-debt/SKILL.md (or your agent's skills folder).Primary editorial path for this compatibility group. The full instructions and support files remain local so existing installations continue to work offline. This is one shared procedure, not an additional capability. Preserve the callable ID when an existing manifest or client configuration uses it. Modified in AAS on 2026-09-05; original metadata and license notices are retained.
You are a technical debt expert specializing in identifying, quantifying, and prioritizing technical debt in software projects. Analyze the codebase to uncover debt, assess its impact, and create actionable remediation plans.
The user needs a comprehensive technical debt analysis to understand what's slowing down development, increasing bugs, and creating maintenance challenges. Focus on practical, measurable improvements with clear ROI.
Inspect the current repository, hotspots and real change/incident history. The numbers, thresholds, staffing and timelines below are hypothetical planning examples, not measurements, promised returns or mandatory quality gates. Report missing cost/usage inputs as unknown; never fill them with fabricated telemetry. Review-only scope does not authorize broad refactors, policy changes or deployment.
Conduct a thorough scan for all types of technical debt:
Code Debt
Duplicated Code
Complex Code
Poor Structure
Architecture Debt
Design Flaws
Technology Debt
Testing Debt
Coverage Gaps
Test Quality
Documentation Debt
Infrastructure Debt
Calculate the real cost of each debt item:
Development Velocity Impact
Debt Item: Duplicate user validation logic
Locations: 5 files
Time Impact:
- 2 hours per bug fix (must fix in 5 places)
- 4 hours per feature change
- Monthly impact: ~20 hours
Annual Cost: 240 hours × $150/hour = $36,000Quality Impact
Debt Item: No integration tests for payment flow
Bug Rate: 3 production bugs/month
Average Bug Cost:
- Investigation: 4 hours
- Fix: 2 hours
- Testing: 2 hours
- Deployment: 1 hour
Monthly Cost: 3 bugs × 9 hours × $150 = $4,050
Annual Cost: $48,600Risk Assessment
Create measurable KPIs:
Code Quality Metrics
Metrics:
cyclomatic_complexity:
current: 15.2
target: 10.0
files_above_threshold: 45
code_duplication:
percentage: 23%
target: 5%
duplication_hotspots:
- src/validation: 850 lines
- src/api/handlers: 620 lines
test_coverage:
unit: 45%
integration: 12%
e2e: 5%
target: 80% / 60% / 30%
dependency_health:
outdated_major: 12
outdated_minor: 34
security_vulnerabilities: 7
deprecated_apis: 15Trend Analysis
debt_trends = {
"2024_Q1": {"score": 750, "items": 125},
"2024_Q2": {"score": 820, "items": 142},
"2024_Q3": {"score": 890, "items": 156},
"growth_rate": "18.7% across Q1 to Q3 in this hypothetical series",
"projection": "1200 by 2025_Q1 without intervention"
}Create an actionable roadmap based on ROI:
Quick Wins (High Value, Low Effort) Week 1-2:
1. Extract duplicate validation logic to shared module
Effort: 8 hours
Savings: 20 hours/month
Illustrative net time ROI: (20 - 8) / 8 = 150% in first month
2. Add error monitoring to payment service
Effort: 4 hours
Savings: 15 hours/month debugging
Illustrative net time ROI: (15 - 4) / 4 = 275% in first month
3. Automate deployment script
Effort: 12 hours
Savings: 2 hours/deployment × 20 deploys/month
Illustrative net time ROI: (40 - 12) / 12 = 233% in first monthMedium-Term Improvements (Month 1-3)
1. Refactor OrderService (God class)
- Split into 4 focused services
- Add comprehensive tests
- Create clear interfaces
Effort: 60 hours
Savings: 30 hours/month maintenance
ROI: Positive after 2 months
2. Upgrade React 16 → 18
- Update component patterns
- Migrate to hooks
- Fix breaking changes
Effort: 80 hours
Benefits: measure compatibility and actual performance; no assumed uplift
ROI: Positive after 3 monthsLong-Term Initiatives (Quarter 2-4)
1. Implement Domain-Driven Design
- Define bounded contexts
- Create domain models
- Establish clear boundaries
Effort: 200 hours
Benefits: assess actual coupling after a scoped change
ROI: Positive after 6 months
2. Comprehensive Test Suite
- Unit: 80% coverage
- Integration: 60% coverage
- E2E: Critical paths
Effort: 300 hours
Benefits: measure escaped defects; no guaranteed reduction
ROI: Positive after 4 monthsIncremental Refactoring
# Phase 1: Add facade over legacy code
class PaymentFacade:
def __init__(self):
self.legacy_processor = LegacyPaymentProcessor()
def process_payment(self, order):
# New clean interface
return self.legacy_processor.doPayment(order.to_legacy())
# Phase 2: Implement new service alongside
class PaymentService:
def process_payment(self, order):
# Clean implementation
pass
# Phase 3: Gradual migration
class PaymentFacade:
def __init__(self):
self.new_service = PaymentService()
self.legacy = LegacyPaymentProcessor()
def process_payment(self, order):
if feature_flag("use_new_payment"):
return self.new_service.process_payment(order)
return self.legacy.doPayment(order.to_legacy())Team Allocation
Debt_Reduction_Team:
dedicated_time: "20% sprint capacity"
roles:
- tech_lead: "Architecture decisions"
- senior_dev: "Complex refactoring"
- dev: "Testing and documentation"
sprint_goals:
- sprint_1: "Quick wins completed"
- sprint_2: "God class refactoring started"
- sprint_3: "Test coverage >60%"Implement gates to prevent new debt:
Automated Quality Gates
pre_commit_hooks:
- complexity_check: "max 10"
- duplication_check: "max 5%"
- test_coverage: "min 80% for new code"
ci_pipeline:
- dependency_audit: "no high vulnerabilities"
- performance_test: "no regression >10%"
- architecture_check: "no new violations"
code_review:
- requires_two_approvals: true
- must_include_tests: true
- documentation_required: trueDebt Budget
debt_budget = {
"allowed_monthly_increase": "2%",
"mandatory_reduction": "5% per quarter",
"tracking": {
"complexity": "sonarqube",
"dependencies": "dependabot",
"coverage": "codecov"
}
}Stakeholder Reports
## Executive Summary
- Current debt score: 890 (High)
- Monthly velocity loss: 35%
- Bug rate increase: 45%
- Recommended investment: 500 hours
- Expected ROI: 280% over 12 months
## Key Risks
1. Payment system: 3 critical vulnerabilities
2. Data layer: No backup strategy
3. API: Rate limiting not implemented
## Proposed Actions
1. Immediate: Security patches (this week)
2. Short-term: Core refactoring (1 month)
3. Long-term: Architecture modernization (6 months)Developer Documentation
## Refactoring Guide
1. Always maintain backward compatibility
2. Write tests before refactoring
3. Use feature flags for gradual rollout
4. Document architectural decisions
5. Measure impact with metrics
## Code Standards
- Complexity limit: 10
- Method length: 20 lines
- Class length: 200 lines
- Test coverage: 80%
- Documentation: All public APIsTrack progress with clear KPIs:
Monthly Metrics
Quarterly Reviews
Focus on delivering measurable improvements that directly impact development velocity, system reliability, and team morale.
© sickn33, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in skills/code-refactoring-tech-debt of sickn33/agentic-awesome-skills.
Open the folder on GitHubat commit 1e53ce2
We found 11 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in sickn33/agentic-awesome-skills, which our catalogue first saw on October 7, 2026.
Code Refactoring Tech Debt next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Code Refactoring Tech Debt this skillsickn33/agentic-awesome-skills | 47k | 1 repos | ~2.9k | Automated safety check: Pass | MIT | |
| Systematic Code Refactoringluongnv89/claude-howto | 42k | — | ~3k | Automated safety check: Pass | MIT | |
| Code Simplification for ego-litecitrolabs/ego-lite | 17k | — | ~1.2k | Automated safety check: Pass | MIT | |
| Code Refactoring Workflowluongnv89/claude-howto | 42k | — | ~3.1k | Automated safety check: Pass | MIT | |
| Tech Debt Analyzerailabs-393/ai-labs-claude-skills | 454 | 2 repos | ~3.9k | Automated safety check: Pass | MIT | |
| FIXME Resolvertailcallhq/forgecode | 7.6k | — | ~1.1k | Automated safety check: Pass | Apache-2.0 |
luongnv89/claude-howto
Guides refactoring in phases based on Martin Fowler's method: research, test coverage check, planning and small tested steps, with your approval at each phase.
citrolabs/ego-lite
Finds and implements evidence-backed simplifications in the ego-lite repository, such as dead code, duplicated state and speculative abstractions, without hiding behavior changes.
luongnv89/claude-howto
Guides systematic, test-backed refactoring in the style of Martin Fowler, moving through research, planning and small incremental changes with your approval at each phase.
ailabs-393/ai-labs-claude-skills
This skill should be used when analyzing technical debt in a codebase, documenting code quality issues, creating technical debt registers, or assessing code maintainability.
tailcallhq/forgecode
Finds every FIXME comment in a codebase, groups related ones across files into one task, implements the work they describe and removes the comments once it is done.
Git-on-my-level/codex-autorunner
Codebase health scanner and technical debt tracker. An agent skill from Git-on-my-level/codex-autorunner.
sickn33/agentic-awesome-skills
Implements an interface in one of two named color modes, iridescent white or colorful black, from a parameterized starter that reports measured color intensity.
sickn33/agentic-awesome-skills
Saves a user's project decisions, rules and preferences into a project-local mdbase so later sessions and other agents can recover the intent.
sickn33/agentic-awesome-skills
Keeps project decisions, research and verified results available across coding-agent sessions through LWC memory, a document Wiki graph and a CodeGraph code index.
sickn33/agentic-awesome-skills
Guides an agent through assessing its own owner for cofounder fit, publishing an approved profile, and ranking complementary profiles other agents published for their owners.
sickn33/agentic-awesome-skills
Integracao com WhatsApp Business Cloud API (Meta). An agent skill from sickn33/agentic-awesome-skills.
sickn33/agentic-awesome-skills
Acts as a proxy for the Cline CLI, dispatching coding tasks one at a time, monitoring runs by hard evidence, relaying decisions to you and learning per-project preferences.
Categories
Identify technical debt from actual code and change history, estimate its impact, and prioritize bounded improvements with explicit assumptions. Code Refactoring Tech Debt is an agent skill from sickn33/agentic-awesome-skills. Identify technical debt from actual code and change history, estimate its impact, and prioritize bounded improvements with explicit assumptions.
Code Refactoring Tech Debt fits situations like: tasks that involve Technical debt; tasks that involve Refactoring.
Run `npx skills add sickn33/agentic-awesome-skills --skill code-refactoring-tech-debt -a claude-code`. Or copy the skill folder (skills/code-refactoring-tech-debt in sickn33/agentic-awesome-skills) into .claude/skills/code-refactoring-tech-debt in your project. Claude Code loads it when a task matches its description.
Run `npx skills add sickn33/agentic-awesome-skills --skill code-refactoring-tech-debt -a codex`. Or copy the skill folder (skills/code-refactoring-tech-debt in sickn33/agentic-awesome-skills) into .agents/skills/code-refactoring-tech-debt in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add sickn33/agentic-awesome-skills --skill code-refactoring-tech-debt -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/code-refactoring-tech-debt, .gemini/skills/code-refactoring-tech-debt, .github/skills/code-refactoring-tech-debt and .opencode/skills/code-refactoring-tech-debt in your project.
SKILL.md names no scripts, command-line tools or credentials: Code Refactoring Tech Debt is instructions for the agent only. Our summary lists: Python 3.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Code Refactoring Tech Debt is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.9k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Code Refactoring Tech Debt: Systematic Code Refactoring (luongnv89/claude-howto, 42k stars), Code Simplification for ego-lite (citrolabs/ego-lite, 17k stars), Code Refactoring Workflow (luongnv89/claude-howto, 42k stars) and Tech Debt Analyzer (ailabs-393/ai-labs-claude-skills, 454 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
sickn33 (a GitHub user) maintains it in sickn33/agentic-awesome-skills, which has 47,304 GitHub stars. The repository holds 1,394 skills in this directory. The repository was last updated on October 6, 2026.
Source: sickn33/agentic-awesome-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.