AgentSkillsCN

refactoring-skills

分析并重构项目中的所有技能——整合、优化并移除不必要的技能。当您的技能需要清理或重新组织时,可使用此技能。

SKILL.md
--- frontmatter
name: refactoring-skills
description: Analyzes and refactors all skills in the project - consolidate, optimize, and remove unnecessary ones. Use when skills need cleanup or reorganization.

Refactoring Skills

Systematically analyze all skills and apply refactoring for quality and consistency.

Process

1. Invoke Architecture Advisor

Use the agent-architect skill to get a holistic view of the current skill landscape.

2. Discover All Skills

bash
find . -name "SKILL.md" -type f

3. Analyze Each Skill

For each skill, classify:

StatusAction
KeepWell-structured, unique purpose
RefactorHas issues but valuable
MergeOverlaps with another skill
ExtractHas conventions shared by other skills → move to Rules
DeleteRedundant or unused

4. Apply Refactoring

For skills to refactor: Use the writing-skills skill to guide improvements.

For skills to merge:

  • Identify the primary skill
  • Consolidate unique content
  • Delete the redundant skill

For shared conventions to extract:

  • Use writing-rules skill to create rule in .claude/rules/
  • Remove duplicated convention from each skill

For skills to delete:

  • Confirm no dependencies
  • Remove entire skill directory

5. Validate Results

bash
python3 skills/write-skill/scripts/validate_skill.py <skill-path>

6. Generate Report

markdown
## Refactoring Summary

### Skills Analyzed: N

### Actions Taken:
- Kept: X skills
- Refactored: Y skills
- Merged: Z skills
- Extracted to Rules: A conventions
- Deleted: W skills

### Changes Made:
- [skill-name]: [action taken]