AGENT SKILL

refactor-large-component

Refactor oversized components or services into smaller, maintainable units without changing behavior.

使用场景代码审查
License 许可
MIT
最近更新
2026-05-28
Stars
★ 0
Forks
0

01 前言 Front Matter

name
refactor-large-component
author
Siming
license
MIT
version
1.0.0
metadata
{ "siming": { "tags": [ "quality", "refactor", "componentization" ] } }
description
Refactor oversized components or services into smaller, maintainable units without changing behavior.

03 SKILL.md 正文

Refactor Large Component

Use this skill when a file has too many responsibilities.

Workflow

  1. Identify cohesive regions: data loading, layout, rendering, event handlers, helpers.
  2. Add or run behavior tests before moving code.
  3. Extract components or helpers by responsibility.
  4. Keep public props and behavior stable.
  5. Verify no visual or type regressions.

Checks

  • Refactoring should not silently remove helpful beginner-level comments.

04 同仓库更多 Skills