AgentSkillsCN

refactoring-with-external-skills

通过寻找更优的外部实现方案并加以适配,对现有技能进行重构。当您需要借助外部最佳实践来提升技能水平时,可使用此技能。

SKILL.md
--- frontmatter
name: refactoring-with-external-skills
description: Refactors existing skills by searching for better external implementations and adapting them. Use when improving skills with external best practices.

Refactoring with External Skills

Improve existing skills by hunting for better external implementations and synthesizing improvements.

Prerequisites

Requires claude-skills-mcp MCP server. See hunting-skills skill for installation.

Process

1. Identify Skills to Refactor

If a specific skill path is provided, target that skill. Otherwise, analyze all:

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

Assess each skill for:

  • Quality issues (unclear, outdated)
  • Missing capabilities external skills might have
  • Potential for improvement

2. Search External Alternatives

For each skill to refactor:

code
mcp__claude-skills__find_helpful_skills(task_description: "[skill's core capability]")

3. Compare and Analyze

Read promising external skills:

code
mcp__claude-skills__read_skill_document(skill_name: "...", document_path: "SKILL.md")

Create comparison matrix:

AspectCurrent SkillExternal SkillWinner
Clarity
Completeness
Best practices
Integration

4. Synthesize Improvements

Don't replace wholesale. Instead:

  1. Extract superior patterns from external skill
  2. Preserve project-specific adaptations
  3. Merge the best of both
  4. Validate against project conventions

Use improving-skills skill with insights from external skills.

5. Validate Results

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

Difference from refactoring-skills

Aspectrefactoring-skillsrefactoring-with-external-skills
FocusInternal consolidationExternal improvement
ActionMerge/delete redundantEnhance with external patterns
SourceProject skills onlyClaude Skills library
GoalReduce duplicationIncrease quality

Use together: refactoring-skills to consolidate, then this skill to enhance.