Skip to content
Back to skills

Code Refactor

ASecurity

Orchestrates the comprehensive revision and standardization of the codebase. Use when rebuilding components, cleaning up technical debt, or ensuring code aligns with "Day 1" project standards.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 27, 2026
code-qualitytypescriptgorefactoringapi

Works with

  • api

Security analysis

A100/100

Scanned September 27, 2026

npx -y skills add David-Li0406/meta-skill-evloving --skill code-refactor --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Code Refactor?

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

Security grade badge for Code Refactor
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/david-li0406-code-refactor/badge)](https://www.skillsdirectory.com/skills/david-li0406-code-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: code-refactor
description: Orchestrates the comprehensive revision and standardization of the codebase. Use when rebuilding components, cleaning up technical debt, or ensuring code aligns with "Day 1" project standards.
---

# Code Refactor Skill

This skill is the "Master Architect" for THE LOST+UNFOUNDS. It ensures that any code changes move the project toward a cleaner, more modular, and standard-compliant state.

## Refactoring Workflow

### 1. Discovery & Alignment
Before touching code, identify which "Engine" skills are relevant:
- **UI/UX**: Consult `@noir-design`.
- **Data/Logic**: Consult `@infra-ops`.
- **Feature Specific**: Consult `@blog-engine` or `@outreach-engine`.

### 2. The "Day 1" Standard Checklist
Every refactored component must meet these criteria:
- **Modular CSS**: No inline styles. Use the utility classes and variables defined in `@noir-design`.
- **Type Safety**: Proper TypeScript interfaces. Avoid `any`. Move shared types to `src/types`.
- **Separation of Concerns**: 
  - UI logic goes in components.
  - Business logic goes in `src/utils` or `src/lib`.
  - API calls go through centralized handlers.
- **Left-Alignment**: Strictly enforce left-aligned text for all body content.
- **Error Handling**: Use established try/catch patterns with helpful error surfacing.

### 3. Execution Pattern
1. **Analyze**: List the violations of current standards in the file.
2. **Propose**: Detail the new structure (e.g., "Extracting logic to a hook").
3. **Execute**: Implement changes in a way that minimizes disruption.
4. **Verify**: Ensure the component still functions and looks better.

## When to use this skill
- When converting old components to the new Skill-based architecture.
- When fixing "legacy" rules that have been moved to skills.
- When performing a "Day 1" reset on a specific directory.

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.

Comments

Loading comments…