skills-manager
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSkills Manager Skill - Universal Consolidation & Audit for Claude Code
Skills Manager Skill - Claude Code技能通用整合与审计工具
A meta-skill to audit, consolidate, archive, or remove Claude Code skills by referencing actual project state, structure, and usage needs. Safeguards the integrity of your skillset with verification-first approach.
一款元技能,可通过参考实际项目状态、结构和使用需求,对Claude Code技能进行审计、整合、归档或移除。它采用“验证优先”的方法,保障您技能集的完整性。
Core Safety Principle
核心安全原则
NEVER ASSUME - ALWAYS VERIFY
This skill MUST analyze your actual project state, codebase, and usage patterns before making any decisions about skills. It verifies system reality, validates usage data, and applies conservative safety thresholds before suggesting any changes.
绝不主观假设 - 始终验证
本技能在对技能做出任何决策前,必须分析您的实际项目状态、代码库和使用模式。它会验证系统实际情况、确认使用数据,并在建议任何更改前应用保守的安全阈值。
When to Use This Skill
使用场景
Use this skill when you need to:
- Audit skills effectiveness - Analyze which skills are actually used vs unused
- Consolidate redundant skills - Merge overlapping or duplicate capabilities
- Archive obsolete skills - Safely move outdated skills to archive with rollback
- Optimize skill organization - Restructure skills based on project needs and relevance
- Maintain skill hygiene - Regular cleanup to keep skillset efficient and relevant
Critical: This skill prioritizes safety over automation. All destructive actions require explicit user confirmation and have rollback capabilities.
在以下场景中使用本技能:
- 审计技能有效性 - 分析哪些技能实际被使用,哪些未被使用
- 整合冗余技能 - 合并功能重叠或重复的技能
- 归档过时技能 - 通过回滚功能安全地将过时技能移至归档
- 优化技能组织 - 根据项目需求和相关性重新组织技能
- 维护技能健康度 - 定期清理,保持技能集高效且贴合需求
重要提示:本技能优先保障安全而非自动化。所有破坏性操作都需要用户明确确认,并具备回滚能力。
Activation Commands
激活命令
Commands
命令
bash
/skills-audit # Run full analysis, generate reports, no changes
/skills-consolidate # Execute consolidation after user review and approval
/skills-merge <skill1> <skill2> # Interactive merge assistance for two skills
/skills-archive <skill-name> # Safely archive a skill with backup
/skills-config # View or update configuration settingsbash
/skills-audit # 运行完整分析,生成报告,不做任何更改
/skills-consolidate # 经用户审核和批准后执行整合操作
/skills-merge <skill1> <skill2> # 交互式协助合并两个技能
/skills-archive <skill-name> # 带备份功能的安全技能归档
/skills-config # 查看或更新配置设置Triggers
触发词
Natural language patterns that activate this skill:
- "Audit my Claude Code skills"
- "Find redundant or unused skills"
- "Consolidate my skills collection"
- "Clean up my skills directory"
- "Archive old skills I don't use"
- "Optimize my skill organization"
- "Which skills should I keep or remove?"
可激活本技能的自然语言模式:
- "Audit my Claude Code skills"
- "Find redundant or unused skills"
- "Consolidate my skills collection"
- "Clean up my skills directory"
- "Archive old skills I don't use"
- "Optimize my skill organization"
- "Which skills should I keep or remove?"
Phase 1: System State & Skills Inventory (MANDATORY First Step)
阶段1:系统状态与技能清单(强制第一步)
1.1 Detect Project Type & Tech Stack
1.1 检测项目类型与技术栈
Objective: Build accurate understanding of your actual project.
Process:
目标:准确了解您的实际项目情况。
流程:
Parse Dependency Files
解析依赖文件
bash
undefinedbash
undefinedFind all dependency files
查找所有依赖文件
find . -name "package.json" -o -name "requirements.txt" -o -name "pom.xml"
-o -name "go.mod" -o -name "Cargo.toml" -o -name "composer.json"
-o -name "Gemfile" -o -name "build.gradle"
-o -name "go.mod" -o -name "Cargo.toml" -o -name "composer.json"
-o -name "Gemfile" -o -name "build.gradle"
find . -name "package.json" -o -name "requirements.txt" -o -name "pom.xml"
-o -name "go.mod" -o -name "Cargo.toml" -o -name "composer.json"
-o -name "Gemfile" -o -name "build.gradle"
-o -name "go.mod" -o -name "Cargo.toml" -o -name "composer.json"
-o -name "Gemfile" -o -name "build.gradle"
Extract technologies
提取技术栈信息
if [ -f "package.json" ]; then
echo "Node.js project detected"
cat package.json | jq -r '.dependencies, .devDependencies | keys[]' | head -20
fi
if [ -f "requirements.txt" ]; then
echo "Python project detected"
grep -v "^#" requirements.txt | cut -d'=' -f1 | head -20
fi
undefinedif [ -f "package.json" ]; then
echo "Node.js project detected"
cat package.json | jq -r '.dependencies, .devDependencies | keys[]' | head -20
fi
if [ -f "requirements.txt" ]; then
echo "Python project detected"
grep -v "^#" requirements.txt | cut -d'=' -f1 | head -20
fi
undefinedMap Project Structure
映射项目结构
bash
undefinedbash
undefinedAnalyze directory structure
分析目录结构
echo "=== Project Structure Analysis ==="
for dir in src lib app components services docs k8s docker; do
if [ -d "$dir" ]; then
file_count=$(find "$dir" -type f | wc -l)
echo "$dir/ - $file_count files"
fi
done
echo "=== Project Structure Analysis ==="
for dir in src lib app components services docs k8s docker; do
if [ -d "$dir" ]; then
file_count=$(find "$dir" -type f | wc -l)
echo "$dir/ - $file_count files"
fi
done
Identify key file types
识别关键文件类型
echo "=== File Type Distribution ==="
find . -type f -name ".ts" -o -name ".js" -o -name ".py" -o -name ".go" -o -name "*.rs" |
cut -d'.' -f3 | sort | uniq -c | sort -nr
cut -d'.' -f3 | sort | uniq -c | sort -nr
**Output Format:**
```json
{
"system_reality": {
"project_type": "Vue.js TypeScript Application",
"primary_technologies": ["Vue 3", "TypeScript", "Vite", "Pinia"],
"databases": ["IndexedDB", "LocalStorage"],
"frameworks": ["Vue.js", "Tailwind CSS"],
"build_tools": ["Vite", "ESLint", "TypeScript"],
"directory_structure": {
"src/": "234 files",
"components/": "45 files",
"docs/": "12 files"
}
},
"relevance_domains": ["frontend", "vue.js", "typescript", "pinia", "productivity"]
}echo "=== File Type Distribution ==="
find . -type f -name ".ts" -o -name ".js" -o -name ".py" -o -name ".go" -o -name "*.rs" |
cut -d'.' -f3 | sort | uniq -c | sort -nr
cut -d'.' -f3 | sort | uniq -c | sort -nr
**输出格式**:
```json
{
"system_reality": {
"project_type": "Vue.js TypeScript Application",
"primary_technologies": ["Vue 3", "TypeScript", "Vite", "Pinia"],
"databases": ["IndexedDB", "LocalStorage"],
"frameworks": ["Vue.js", "Tailwind CSS"],
"build_tools": ["Vite", "ESLint", "TypeScript"],
"directory_structure": {
"src/": "234 files",
"components/": "45 files",
"docs/": "12 files"
}
},
"relevance_domains": ["frontend", "vue.js", "typescript", "pinia", "productivity"]
}1.2 Inventory All Current Skills
1.2 盘点所有当前技能
Objective: Complete catalog of all skills with metadata.
Process:
bash
undefined目标:创建包含元数据的完整技能目录。
流程:
bash
undefinedScan skills directory
扫描技能目录
echo "=== Skills Inventory ==="
for skill in .claude/skills/*.md; do
if [ -f "$skill" ]; then
skill_name=$(basename "$skill" .md)
skill_size=$(wc -l < "$skill")
last_modified=$(git log -1 --format="%ci" "$skill" 2>/dev/null || echo "unknown")
echo "✅ $skill_name - $skill_size lines - last: $last_modified"
fi
done
**Extract Metadata from Each Skill:**
```python
def extract_skill_metadata(skill_file):
"""Extract key metadata from skill markdown file"""
with open(skill_file, 'r', encoding='utf-8') as f:
content = f.read()
# Extract YAML frontmatter
frontmatter_match = re.match(r'^---\n(.*?)\n---', content, re.DOTALL)
if frontmatter_match:
try:
import yaml
metadata = yaml.safe_load(frontmatter_match.group(1))
except:
metadata = {}
else:
metadata = {}
# Extract capabilities from content
capabilities = []
if 'Capabilities:' in content:
cap_section = re.search(r'Capabilities:(.*?)(?:\n##|\Z)', content, re.DOTALL)
if cap_section:
capabilities = re.findall(r'[-*]\s*(.+)', cap_section.group(1))
# Extract activation triggers
triggers = []
if 'triggers' in metadata:
if isinstance(metadata['triggers'], list):
triggers = metadata['triggers']
elif isinstance(metadata['triggers'], str):
triggers = [metadata['triggers']]
return {
'name': metadata.get('name', skill_file.stem),
'description': metadata.get('description', ''),
'category': metadata.get('category', 'general'),
'triggers': triggers,
'capabilities': capabilities,
'file_size': len(content),
'last_modified': get_git_last_modified(skill_file)
}echo "=== Skills Inventory ==="
for skill in .claude/skills/*.md; do
if [ -f "$skill" ]; then
skill_name=$(basename "$skill" .md)
skill_size=$(wc -l < "$skill")
last_modified=$(git log -1 --format="%ci" "$skill" 2>/dev/null || echo "unknown")
echo "✅ $skill_name - $skill_size lines - last: $last_modified"
fi
done
**从每个技能中提取元数据**:
```python
def extract_skill_metadata(skill_file):
"""Extract key metadata from skill markdown file"""
with open(skill_file, 'r', encoding='utf-8') as f:
content = f.read()
# Extract YAML frontmatter
frontmatter_match = re.match(r'^---\n(.*?)\n---', content, re.DOTALL)
if frontmatter_match:
try:
import yaml
metadata = yaml.safe_load(frontmatter_match.group(1))
except:
metadata = {}
else:
metadata = {}
# Extract capabilities from content
capabilities = []
if 'Capabilities:' in content:
cap_section = re.search(r'Capabilities:(.*?)(?:\n##|\Z)', content, re.DOTALL)
if cap_section:
capabilities = re.findall(r'[-*]\s*(.+)', cap_section.group(1))
# Extract activation triggers
triggers = []
if 'triggers' in metadata:
if isinstance(metadata['triggers'], list):
triggers = metadata['triggers']
elif isinstance(metadata['triggers'], str):
triggers = [metadata['triggers']]
return {
'name': metadata.get('name', skill_file.stem),
'description': metadata.get('description', ''),
'category': metadata.get('category', 'general'),
'triggers': triggers,
'capabilities': capabilities,
'file_size': len(content),
'last_modified': get_git_last_modified(skill_file)
}1.3 Analyze Usage Patterns
1.3 分析使用模式
Objective: Understand which skills are actually being used.
Process:
目标:了解哪些技能实际被使用。
流程:
Analyze Git History for Skill References
分析Git历史中的技能引用
bash
undefinedbash
undefinedSearch git history for skill mentions
搜索Git历史中的技能提及记录
echo "=== Skill Usage Analysis (Last 90 Days) ==="
since_date=$(date -d "90 days ago" --iso-8601)
for skill in .claude/skills/*.md; do
skill_name=$(basename "$skill" .md)
Count commits mentioning this skill
commit_count=$(git log --since="$since_date" --grep="$skill_name" --oneline | wc -l)
Count file mentions in commit messages
message_count=$(git log --since="$since_date" --all --grep="$skill_name" --oneline | wc -l)
total_usage=$((commit_count + message_count))
if [ $total_usage -gt 0 ]; then
echo "📊 $skill_name - $total_usage uses in last 90 days"
else
echo "⚠️ $skill_name - No recent usage detected"
fi
done
undefinedecho "=== Skill Usage Analysis (Last 90 Days) ==="
since_date=$(date -d "90 days ago" --iso-8601)
for skill in .claude/skills/*.md; do
skill_name=$(basename "$skill" .md)
统计提及该技能的提交次数
commit_count=$(git log --since="$since_date" --grep="$skill_name" --oneline | wc -l)
统计提交消息中提及该技能的次数
message_count=$(git log --since="$since_date" --all --grep="$skill_name" --oneline | wc -l)
total_usage=$((commit_count + message_count))
if [ $total_usage -gt 0 ]; then
echo "📊 $skill_name - $total_usage uses in last 90 days"
else
echo "⚠️ $skill_name - No recent usage detected"
fi
done
undefinedAnalyze Skill Dependencies
分析技能依赖关系
python
def analyze_skill_dependencies(skills_dir):
"""Analyze how skills reference each other"""
dependencies = {}
for skill_file in Path(skills_dir).glob("*.md"):
skill_name = skill_file.stem
with open(skill_file, 'r', encoding='utf-8') as f:
content = f.read()
# Find references to other skills
skill_references = re.findall(r'\b([a-z][a-z0-9-]*)\b', content.lower())
# Filter to actual skill names
other_skills = [f.stem for f in Path(skills_dir).glob("*.md") if f.stem != skill_name]
referenced_skills = [ref for ref in skill_references if ref in other_skills]
if referenced_skills:
dependencies[skill_name] = referenced_skills
return dependenciesOutput Format:
json
{
"skills_inventory": {
"total_skills": 47,
"categories": {
"debug": 12,
"create": 8,
"fix": 15,
"optimize": 5,
"meta": 7
},
"usage_stats": {
"vue-debugging": {"uses_90_days": 23, "last_used": "2025-11-20"},
"pinia-fixer": {"uses_90_days": 15, "last_used": "2025-11-18"},
"old-deprecated-skill": {"uses_90_days": 0, "last_used": "2024-06-01"}
},
"dependencies": {
"vue-debugging": ["dev-vue"],
"comprehensive-system-analyzer": ["qa-testing", "dev-debugging"]
}
}
}python
def analyze_skill_dependencies(skills_dir):
"""Analyze how skills reference each other"""
dependencies = {}
for skill_file in Path(skills_dir).glob("*.md"):
skill_name = skill_file.stem
with open(skill_file, 'r', encoding='utf-8') as f:
content = f.read()
# 查找对其他技能的引用
skill_references = re.findall(r'\b([a-z][a-z0-9-]*)\b', content.lower())
# 筛选实际存在的技能名称
other_skills = [f.stem for f in Path(skills_dir).glob("*.md") if f.stem != skill_name]
referenced_skills = [ref for ref in skill_references if ref in other_skills]
if referenced_skills:
dependencies[skill_name] = referenced_skills
return dependencies输出格式:
json
{
"skills_inventory": {
"total_skills": 47,
"categories": {
"debug": 12,
"create": 8,
"fix": 15,
"optimize": 5,
"meta": 7
},
"usage_stats": {
"vue-debugging": {"uses_90_days": 23, "last_used": "2025-11-20"},
"pinia-fixer": {"uses_90_days": 15, "last_used": "2025-11-18"},
"old-deprecated-skill": {"uses_90_days": 0, "last_used": "2024-06-01"}
},
"dependencies": {
"vue-debugging": ["dev-vue"],
"comprehensive-system-analyzer": ["qa-testing", "dev-debugging"]
}
}
}Phase 2: Skills Necessity & Redundancy Assessment
阶段2:技能必要性与冗余评估
2.1 Necessity Scoring
2.1 必要性评分
Objective: Rank skills by importance and relevance to current project.
Scoring Algorithm:
python
def calculate_necessity_score(skill_data, project_reality, usage_stats):
"""Calculate necessity score for a skill (0-100)"""
score = 0
# Base score from recent usage (40 points max)
usage = usage_stats.get(skill_data['name'], {})
recent_uses = usage.get('uses_90_days', 0)
usage_score = min(recent_uses * 2, 40) # 2 points per use, max 40
score += usage_score
# Project relevance score (30 points max)
skill_domains = extract_domains(skill_data['description'], skill_data['capabilities'])
project_domains = project_reality.get('relevance_domains', [])
domain_overlap = len(set(skill_domains) & set(project_domains))
relevance_score = min(domain_overlap * 10, 30) # 10 points per matching domain
score += relevance_score
# Category importance score (20 points max)
important_categories = ['debug', 'create', 'fix']
if skill_data['category'] in important_categories:
score += 20
elif skill_data['category'] in ['optimize', 'analyze']:
score += 15
else:
score += 10
# Dependency score (10 points max)
if skill_data['name'] in usage_stats.get('dependencies', {}):
dependent_count = len(usage_stats['dependencies'][skill_data['name']])
dependency_score = min(dependent_count * 2, 10)
score += dependency_score
return min(score, 100)目标:根据重要性和与当前项目的相关性对技能排名。
评分算法:
python
def calculate_necessity_score(skill_data, project_reality, usage_stats):
"""Calculate necessity score for a skill (0-100)"""
score = 0
# 近期使用情况基础分(最高40分)
usage = usage_stats.get(skill_data['name'], {})
recent_uses = usage.get('uses_90_days', 0)
usage_score = min(recent_uses * 2, 40) # 每次使用得2分,最高40分
score += usage_score
# 项目相关性得分(最高30分)
skill_domains = extract_domains(skill_data['description'], skill_data['capabilities'])
project_domains = project_reality.get('relevance_domains', [])
domain_overlap = len(set(skill_domains) & set(project_domains))
relevance_score = min(domain_overlap * 10, 30) # 每个匹配领域得10分,最高30分
score += relevance_score
# 类别重要性得分(最高20分)
important_categories = ['debug', 'create', 'fix']
if skill_data['category'] in important_categories:
score += 20
elif skill_data['category'] in ['optimize', 'analyze']:
score += 15
else:
score += 10
# 依赖关系得分(最高10分)
if skill_data['name'] in usage_stats.get('dependencies', {}):
dependent_count = len(usage_stats['dependencies'][skill_data['name']])
dependency_score = min(dependent_count * 2, 10)
score += dependency_score
return min(score, 100)2.2 Redundancy Detection
2.2 冗余检测
Objective: Find overlapping or duplicate skills.
Analysis Methods:
目标:找出功能重叠或重复的技能。
分析方法:
Capability Overlap Analysis
功能重叠分析
python
def analyze_capability_overlap(skill1_data, skill2_data):
"""Calculate overlap between two skills based on capabilities and triggers"""
# Extract keywords from descriptions and capabilities
def extract_keywords(text):
words = re.findall(r'\b[a-z]{3,}\b', text.lower())
stop_words = {'the', 'and', 'for', 'with', 'can', 'will', 'use', 'from', 'have', 'this', 'that'}
return [w for w in words if w not in stop_words]
# Combine text sources
skill1_text = f"{skill1_data['description']} {' '.join(skill1_data['capabilities'])} {' '.join(skill1_data['triggers'])}"
skill2_text = f"{skill2_data['description']} {' '.join(skill2_data['capabilities'])} {' '.join(skill2_data['triggers'])}"
# Extract keywords
skill1_keywords = set(extract_keywords(skill1_text))
skill2_keywords = set(extract_keywords(skill2_text))
# Calculate Jaccard similarity
if not skill1_keywords and not skill2_keywords:
return 0.0
intersection = len(skill1_keywords & skill2_keywords)
union = len(skill1_keywords | skill2_keywords)
return intersection / union if union > 0 else 0.0python
def analyze_capability_overlap(skill1_data, skill2_data):
"""Calculate overlap between two skills based on capabilities and triggers"""
# 从描述和功能中提取关键词
def extract_keywords(text):
words = re.findall(r'\b[a-z]{3,}\b', text.lower())
stop_words = {'the', 'and', 'for', 'with', 'can', 'will', 'use', 'from', 'have', 'this', 'that'}
return [w for w in words if w not in stop_words]
# 合并文本来源
skill1_text = f"{skill1_data['description']} {' '.join(skill1_data['capabilities'])} {' '.join(skill1_data['triggers'])}"
skill2_text = f"{skill2_data['description']} {' '.join(skill2_data['capabilities'])} {' '.join(skill2_data['triggers'])}"
# 提取关键词
skill1_keywords = set(extract_keywords(skill1_text))
skill2_keywords = set(extract_keywords(skill2_text))
# 计算Jaccard相似度
if not skill1_keywords and not skill2_keywords:
return 0.0
intersection = len(skill1_keywords & skill2_keywords)
union = len(skill1_keywords | skill2_keywords)
return intersection / union if union > 0 else 0.0Trigger Conflict Analysis
触发词冲突分析
python
def analyze_trigger_conflicts(all_skills):
"""Find skills with overlapping activation triggers"""
trigger_map = defaultdict(list)
for skill_name, skill_data in all_skills.items():
for trigger in skill_data['triggers']:
# Normalize trigger text
normalized_trigger = trigger.lower().strip()
trigger_map[normalized_trigger].append(skill_name)
conflicts = []
for trigger, skills in trigger_map.items():
if len(skills) > 1:
conflicts.append({
'trigger': trigger,
'conflicting_skills': skills,
'conflict_type': 'exact_match'
})
return conflictsOutput Format:
json
{
"necessity_scores": {
"vue-debugging": 85,
"pinia-fixer": 72,
"comprehensive-system-analyzer": 68,
"old-unused-skill": 15
},
"redundancy_analysis": {
"overlapping_skills": [
{
"skill1": "component-debugger",
"skill2": "vue-component-debugger",
"similarity": 0.87,
"shared_capabilities": ["debug Vue components", "fix reactivity issues"],
"recommendation": "Consider merging"
}
],
"trigger_conflicts": [
{
"trigger": "fix vue component",
"conflicting_skills": ["vue-debugger", "component-debugger", "reactivity-fixer"],
"recommendation": "Refine trigger specificity"
}
]
},
"consolidation_candidates": {
"merge_candidates": [
{
"primary_skill": "vue-debugging",
"merge_with": ["component-debugger", "reactivity-fixer"],
"confidence": 0.92,
"risk": "low"
}
],
"archive_candidates": [
{
"skill": "old-deprecated-skill",
"reason": "No usage in 180+ days, obsolete capabilities",
"confidence": 0.98,
"risk": "low"
}
]
}
}python
def analyze_trigger_conflicts(all_skills):
"""Find skills with overlapping activation triggers"""
trigger_map = defaultdict(list)
for skill_name, skill_data in all_skills.items():
for trigger in skill_data['triggers']:
# 标准化触发词文本
normalized_trigger = trigger.lower().strip()
trigger_map[normalized_trigger].append(skill_name)
conflicts = []
for trigger, skills in trigger_map.items():
if len(skills) > 1:
conflicts.append({
'trigger': trigger,
'conflicting_skills': skills,
'conflict_type': 'exact_match'
})
return conflicts输出格式:
json
{
"necessity_scores": {
"vue-debugging": 85,
"pinia-fixer": 72,
"comprehensive-system-analyzer": 68,
"old-unused-skill": 15
},
"redundancy_analysis": {
"overlapping_skills": [
{
"skill1": "component-debugger",
"skill2": "vue-component-debugger",
"similarity": 0.87,
"shared_capabilities": ["debug Vue components", "fix reactivity issues"],
"recommendation": "Consider merging"
}
],
"trigger_conflicts": [
{
"trigger": "fix vue component",
"conflicting_skills": ["vue-debugger", "component-debugger", "reactivity-fixer"],
"recommendation": "Refine trigger specificity"
}
]
},
"consolidation_candidates": {
"merge_candidates": [
{
"primary_skill": "vue-debugging",
"merge_with": ["component-debugger", "reactivity-fixer"],
"confidence": 0.92,
"risk": "low"
}
],
"archive_candidates": [
{
"skill": "old-deprecated-skill",
"reason": "No usage in 180+ days, obsolete capabilities",
"confidence": 0.98,
"risk": "low"
}
]
}
}Phase 3: Consolidation Planning & User Review
阶段3:整合规划与用户审核
3.1 Consolidation Rules Engine
3.1 整合规则引擎
Merge Rules:
- High similarity (≥85%) + low usage overlap → Candidate for merge
- Complementary capabilities (≤70% similarity) → Keep separate
- One skill significantly more used → Keep active, merge other into it
Archive Rules:
- No usage in 180+ days → Archive candidate
- Obsolete technology references → Archive candidate
- Superseded by newer skill → Archive older version
Deletion Rules:
- Exact duplicate (100% similarity) → Delete after merge
- Broken/unloadable skill → Delete with backup
- User explicitly marked as obsolete → Delete with confirmation
合并规则:
- 高相似度(≥85%)+ 低使用重叠 → 合并候选
- 互补功能(≤70%相似度)→ 保留独立
- 一个技能使用频率显著更高 → 保留活跃技能,合并其他技能到其中
归档规则:
- 180天以上未使用 → 归档候选
- 引用过时技术 → 归档候选
- 被新技能取代 → 归档旧版本
删除规则:
- 完全重复(100%相似度)→ 合并后删除
- 损坏/无法加载的技能 → 备份后删除
- 用户明确标记为过时 → 确认后删除
3.2 Generate Consolidation Plan
3.2 生成整合计划
Plan Structure:
markdown
undefined计划结构:
markdown
undefinedSkills Consolidation Plan
Skills Consolidation Plan
Generated: 2025-11-23 15:30 IST
Conservatism Level: balanced
Total Skills Analyzed: 47
Generated: 2025-11-23 15:30 IST
Conservatism Level: balanced
Total Skills Analyzed: 47
Executive Summary
Executive Summary
- High Priority Actions: 5 skills (3 merges, 2 archives)
- Medium Priority Actions: 8 skills (4 merges, 4 archives)
- Low Priority Actions: 3 skills (review needed)
- Protected Skills: 12 (will not be modified)
Estimated Impact: Reduce skills from 47 to 32 (32% reduction)
- High Priority Actions: 5 skills (3 merges, 2 archives)
- Medium Priority Actions: 8 skills (4 merges, 4 archives)
- Low Priority Actions: 3 skills (review needed)
- Protected Skills: 12 (will not be modified)
Estimated Impact: Reduce skills from 47 to 32 (32% reduction)
High Priority Actions
High Priority Actions
1. Merge Vue Debugging Skills
1. Merge Vue Debugging Skills
Action: Merge + →
component-debuggerreactivity-fixervue-debuggingRationale:
- 92% capability overlap
- has 3x more usage
vue-debugging - All triggers can be consolidated
- Low risk (complementary, not conflicting)
Risk Assessment: LOW
- Backup will be created
- All functionality preserved
- Rollback available via git revert
User Confirmation Required: ⚠️ YES
Action: Merge + →
component-debuggerreactivity-fixervue-debuggingRationale:
- 92% capability overlap
- has 3x more usage
vue-debugging - All triggers can be consolidated
- Low risk (complementary, not conflicting)
Risk Assessment: LOW
- Backup will be created
- All functionality preserved
- Rollback available via git revert
User Confirmation Required: ⚠️ YES
2. Archive Obsolete Skills
2. Archive Obsolete Skills
Action: Archive
old-webpack-configuratorRationale:
- No usage in 210+ days
- References obsolete webpack v3
- Modern skills cover same functionality better
Risk Assessment: LOW
- Moved to directory
skills-archive/ - Preserved in git history
- Can be restored if needed
User Confirmation Required: ⚠️ YES
Action: Archive
old-webpack-configuratorRationale:
- No usage in 210+ days
- References obsolete webpack v3
- Modern skills cover same functionality better
Risk Assessment: LOW
- Moved to directory
skills-archive/ - Preserved in git history
- Can be restored if needed
User Confirmation Required: ⚠️ YES
Protected Skills (Will NOT be modified)
Protected Skills (Will NOT be modified)
- - Meta skill, critical for system
skill-creator-doctor - - Core debugging functionality
dev-debugging - - Fundamental capability
basic-coding - - Essential for development workflow
git-workflow-helper
- - Meta skill, critical for system
skill-creator-doctor - - Core debugging functionality
dev-debugging - - Fundamental capability
basic-coding - - Essential for development workflow
git-workflow-helper
Execution Plan
Execution Plan
- Pre-execution Backup: Create
.claude/skills-backup-YYYYMMDD/ - Create Branch:
skills/consolidation-YYYYMMDD - Batch 1: Archive obsolete skills (low risk)
- Batch 2: Merge overlapping skills (medium risk)
- Batch 3: Update references and triggers
- Validation: Test all skill activations
- Cleanup: Remove placeholder files
Rollback Instructions:
bash
undefined- Pre-execution Backup: Create
.claude/skills-backup-YYYYMMDD/ - Create Branch:
skills/consolidation-YYYYMMDD - Batch 1: Archive obsolete skills (low risk)
- Batch 2: Merge overlapping skills (medium risk)
- Batch 3: Update references and triggers
- Validation: Test all skill activations
- Cleanup: Remove placeholder files
Rollback Instructions:
bash
undefinedComplete rollback
Complete rollback
git checkout main
git branch -D skills/consolidation-YYYYMMDD
cp -r .claude/skills-backup-YYYYMMDD/* .claude/skills/
git checkout main
git branch -D skills/consolidation-YYYYMMDD
cp -r .claude/skills-backup-YYYYMMDD/* .claude/skills/
Partial rollback (batch-specific)
Partial rollback (batch-specific)
git revert <commit-hash>
undefinedgit revert <commit-hash>
undefined3.3 User Confirmation Process
3.3 用户确认流程
Interactive Confirmation Flow:
python
def get_user_confirmation(action_details):
"""Get explicit user confirmation for each action"""
print(f"\n=== Action Review ===")
print(f"Type: {action_details['type']}")
print(f"Skills: {action_details['skills']}")
print(f"Risk Level: {action_details['risk'].upper()}")
print(f"Rationale: {action_details['rationale']}")
if action_details['risk'] == 'high':
print(f"\n⚠️ HIGH RISK ACTION")
print(f"This action {action_details['warning']}")
response = input(f"\nProceed with {action_details['type']}? (Type 'YES' to confirm): ")
return response == 'YES'
else:
print(f"\nRisk: {action_details['risk']}")
response = input(f"Proceed with {action_details['type']}? (y/n): ")
return response.lower() in ['y', 'yes']交互式确认流程:
python
def get_user_confirmation(action_details):
"""Get explicit user confirmation for each action"""
print(f"\n=== Action Review ===")
print(f"Type: {action_details['type']}")
print(f"Skills: {action_details['skills']}")
print(f"Risk Level: {action_details['risk'].upper()}")
print(f"Rationale: {action_details['rationale']}")
if action_details['risk'] == 'high':
print(f"\n⚠️ HIGH RISK ACTION")
print(f"This action {action_details['warning']}")
response = input(f"\nProceed with {action_details['type']}? (Type 'YES' to confirm): ")
return response == 'YES'
else:
print(f"\nRisk: {action_details['risk']}")
response = input(f"Proceed with {action_details['type']}? (y/n): ")
return response.lower() in ['y', 'yes']Phase 4: Safe Execution Workflow
阶段4:安全执行工作流
4.1 Pre-Execution Validation
4.1 执行前验证
Safety Checklist:
bash
echo "=== Pre-Execution Safety Checklist ==="安全检查清单:
bash
echo "=== Pre-Execution Safety Checklist ==="Check git status
检查Git状态
if [ -n "$(git status --porcelain)" ]; then
echo "❌ Working directory not clean. Please commit or stash changes."
exit 1
fi
if [ -n "$(git status --porcelain)" ]; then
echo "❌ Working directory not clean. Please commit or stash changes."
exit 1
fi
Create backup
创建备份
BACKUP_DIR=".claude/skills-backup-$(date +%Y%m%d-%H%M%S)"
if [ ! -d "$BACKUP_DIR" ]; then
echo "📦 Creating backup..."
cp -r .claude/skills "$BACKUP_DIR/"
echo "✅ Backup created: $BACKUP_DIR"
fi
BACKUP_DIR=".claude/skills-backup-$(date +%Y%m%d-%H%M%S)"
if [ ! -d "$BACKUP_DIR" ]; then
echo "📦 Creating backup..."
cp -r .claude/skills "$BACKUP_DIR/"
echo "✅ Backup created: $BACKUP_DIR"
fi
Create working branch
创建工作分支
BRANCH="skills/consolidation-$(date +%Y%m%d-%H%M%S)"
git checkout -b "$BRANCH"
echo "✅ Working on branch: $BRANCH"
BRANCH="skills/consolidation-$(date +%Y%m%d-%H%M%S)"
git checkout -b "$BRANCH"
echo "✅ Working on branch: $BRANCH"
Validate skills can still load
验证技能仍可加载
echo "🔍 Validating current skill integrity..."
echo "🔍 Validating current skill integrity..."
Add skill loading validation here
此处添加技能加载验证逻辑
undefinedundefined4.2 Stepwise Execution
4.2 分步执行
Batch 1: Archive Operations (Low Risk)
批次1:归档操作(低风险)
bash
echo "=== Batch 1: Archiving Obsolete Skills ==="
for skill in "${ARCHIVE_CANDIDATES[@]}"; do
echo "Archiving: $skill"
# Create archive directory if needed
mkdir -p .claude/skills-archive
# Move skill with git history
git mv ".claude/skills/$skill.md" ".claude/skills-archive/$skill.md"
# Create ARCHIVED.md note
cat > ".claude/skills-archive/$skill.md" << EOFbash
echo "=== Batch 1: Archiving Obsolete Skills ==="
for skill in "${ARCHIVE_CANDIDATES[@]}"; do
echo "Archiving: $skill"
# 按需创建归档目录
mkdir -p .claude/skills-archive
# 带Git历史移动技能
git mv ".claude/skills/$skill.md" ".claude/skills-archive/$skill.md"
# 创建ARCHIVED.md说明文件
cat > ".claude/skills-archive/$skill.md" << EOFArchived: $skill
Archived: $skill
Archive Date: $(date -Iseconds)
Reason: ${ARCHIVE_REASONS[$skill]}
Archive Date: $(date -Iseconds)
Reason: ${ARCHIVE_REASONS[$skill]}
Archive Reason
Archive Reason
${ARCHIVE_DETAILS[$skill]}
${ARCHIVE_DETAILS[$skill]}
Restoration Instructions
Restoration Instructions
To restore this skill:
- Move from skills-archive/ back to skills/
- Update .claude/config/skills.json if needed
- Test skill loading EOF
echo "✅ Archived: $skill"
done
git commit -m "skills: archive obsolete skills
- Archived ${#ARCHIVE_CANDIDATES[@]} obsolete skills
- Moved to skills-archive/ directory
- Preserved git history and metadata
Skills archived:
$(printf ' - %s\n' "${ARCHIVE_CANDIDATES[@]}")
"
undefinedTo restore this skill:
- Move from skills-archive/ back to skills/
- Update .claude/config/skills.json if needed
- Test skill loading EOF
echo "✅ Archived: $skill"
done
git commit -m "skills: archive obsolete skills
- Archived ${#ARCHIVE_CANDIDATES[@]} obsolete skills
- Moved to skills-archive/ directory
- Preserved git history and metadata
Skills archived:
$(printf ' - %s\n' "${ARCHIVE_CANDIDATES[@]}")
"
undefinedBatch 2: Merge Operations (Medium Risk)
批次2:合并操作(中风险)
bash
echo "=== Batch 2: Merging Overlapping Skills ==="
for merge_group in "${MERGE_CANDIDATES[@]}"; do
IFS='|' read -r primary_skill merge_skills <<< "$merge_group"
echo "Merging into: $primary_skill"
echo "From: $merge_skills"
# Get user confirmation for this merge
echo "About to merge skills into $primary_skill"
echo "This will combine capabilities and update triggers"
read -p "Proceed with merge? (y/n): " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
# Perform merge operation
python3 .claude/skills/skills-manager/scripts/merge_skills.py \
--primary "$primary_skill" \
--secondary $merge_skills
# Remove merged skills
for skill in $merge_skills; do
git mv ".claude/skills/$skill.md" ".claude/skills-archive/merged-$skill.md"
done
echo "✅ Merge completed: $primary_skill"
else
echo "⏭️ Skipping merge: $primary_skill"
fi
done
git commit -m "skills: merge overlapping skills
Consolidated skills with high capability overlap:
- Combined complementary capabilities
- Updated triggers to prevent conflicts
- Preserved all unique functionality
- Archived merged originals for reference"bash
echo "=== Batch 2: Merging Overlapping Skills ==="
for merge_group in "${MERGE_CANDIDATES[@]}"; do
IFS='|' read -r primary_skill merge_skills <<< "$merge_group"
echo "Merging into: $primary_skill"
echo "From: $merge_skills"
# 获取用户对本次合并的确认
echo "About to merge skills into $primary_skill"
echo "This will combine capabilities and update triggers"
read -p "Proceed with merge? (y/n): " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
# 执行合并操作
python3 .claude/skills/skills-manager/scripts/merge_skills.py \
--primary "$primary_skill" \
--secondary $merge_skills
# 移除已合并的技能
for skill in $merge_skills; do
git mv ".claude/skills/$skill.md" ".claude/skills-archive/merged-$skill.md"
done
echo "✅ Merge completed: $primary_skill"
else
echo "⏭️ Skipping merge: $primary_skill"
fi
done
git commit -m "skills: merge overlapping skills
Consolidated skills with high capability overlap:
- Combined complementary capabilities
- Updated triggers to prevent conflicts
- Preserved all unique functionality
- Archived merged originals for reference"4.3 Post-Execution Validation
4.3 执行后验证
bash
echo "=== Post-Execution Validation ==="bash
echo "=== Post-Execution Validation ==="Validate all skills can load
验证所有技能可加载
echo "🔍 Testing skill loading..."
load_errors=0
for skill in .claude/skills/*.md; do
if [ -f "$skill" ]; then
# Test skill syntax/loading
if ! python3 -c "
import yaml
import re
with open('$skill', 'r') as f:
content = f.read()
echo "🔍 Testing skill loading..."
load_errors=0
for skill in .claude/skills/*.md; do
if [ -f "$skill" ]; then
# 测试技能语法/加载
if ! python3 -c "
import yaml
import re
with open('$skill', 'r') as f:
content = f.read()
Basic validation
Basic validation
frontmatter_match = re.match(r'^---\n(.*?)\n---', content, re.DOTALL)
if not frontmatter_match:
exit(1)
" 2>/dev/null; then
echo "❌ Skill validation failed: $(basename "$skill")"
load_errors=$((load_errors + 1))
fi
fi
done
if [ $load_errors -eq 0 ]; then
echo "✅ All skills validated successfully"
else
echo "❌ $load_errors skills have validation errors"
echo "Please review and fix before continuing"
fi
frontmatter_match = re.match(r'^---\n(.*?)\n---', content, re.DOTALL)
if not frontmatter_match:
exit(1)
" 2>/dev/null; then
echo "❌ Skill validation failed: $(basename "$skill")"
load_errors=$((load_errors + 1))
fi
fi
done
if [ $load_errors -eq 0 ]; then
echo "✅ All skills validated successfully"
else
echo "❌ $load_errors skills have validation errors"
echo "Please review and fix before continuing"
fi
Test registry consistency
验证注册表一致性
echo "🔍 Validating registry consistency..."
python3 .claude/skills/skills-manager/scripts/validate_registry.py
echo "=== Consolidation Complete ==="
echo "Branch: $BRANCH"
echo "Backup: $BACKUP_DIR"
echo ""
echo "Next steps:"
echo "1. Review changes: git log --oneline -10"
echo "2. Test skill functionality"
echo "3. Create PR: gh pr create --fill"
echo "4. Merge after approval"
echo ""
echo "Rollback if needed:"
echo " git checkout main && git branch -D $BRANCH"
echo " cp -r $BACKUP_DIR/* .claude/skills/"
---echo "🔍 Validating registry consistency..."
python3 .claude/skills/skills-manager/scripts/validate_registry.py
echo "=== Consolidation Complete ==="
echo "Branch: $BRANCH"
echo "Backup: $BACKUP_DIR"
echo ""
echo "Next steps:"
echo "1. Review changes: git log --oneline -10"
echo "2. Test skill functionality"
echo "3. Create PR: gh pr create --fill"
echo "4. Merge after approval"
echo ""
echo "Rollback if needed:"
echo " git checkout main && git branch -D $BRANCH"
echo " cp -r $BACKUP_DIR/* .claude/skills/"
---Safety & Rollback Features
安全与回滚功能
5.1 Backup Strategy
5.1 备份策略
Automatic Backups:
bash
undefined自动备份:
bash
undefinedPre-execution backup
执行前备份
BACKUP_DIR=".claude/skills-backup-$(date +%Y%m%d-%H%M%S)"
cp -r .claude/skills "$BACKUP_DIR/"
BACKUP_DIR=".claude/skills-backup-$(date +%Y%m%d-%H%M%S)"
cp -r .claude/skills "$BACKUP_DIR/"
Git stash backup
Git暂存备份
git stash push -u -m "Pre-consolidation skills state"
git stash push -u -m "Pre-consolidation skills state"
Registry backup
注册表备份
cp .claude/config/skills.json "$BACKUP_DIR/skills-backup.json"
undefinedcp .claude/config/skills.json "$BACKUP_DIR/skills-backup.json"
undefined5.2 Rollback Procedures
5.2 回滚流程
Complete Rollback:
bash
undefined完全回滚:
bash
undefinedMethod 1: Git branch deletion
方法1:删除Git分支
git checkout main
git branch -D skills/consolidation-YYYYMMDD
git checkout main
git branch -D skills/consolidation-YYYYMMDD
Method 2: Restore from backup
方法2:从备份恢复
rm -rf .claude/skills
cp -r .claude/skills-backup-YYYYMMDD/skills .claude/skills/
git add .claude/skills/
git commit -m "Rollback: restore skills from backup"
**Selective Rollback:**
```bashrm -rf .claude/skills
cp -r .claude/skills-backup-YYYYMMDD/skills .claude/skills/
git add .claude/skills/
git commit -m "Rollback: restore skills from backup"
**选择性回滚**:
```bashRollback specific commits
回滚特定提交
git revert <commit-hash>
git revert <commit-hash>
Restore specific skills from backup
从备份恢复特定技能
cp .claude/skills-backup-YYYYMMDD/skills/specific-skill.md .claude/skills/
undefinedcp .claude/skills-backup-YYYYMMDD/skills/specific-skill.md .claude/skills/
undefined5.3 Risk Mitigation
5.3 风险缓解
Risk Levels:
- LOW: Archive operations (preserves data, reversible)
- MEDIUM: Merge operations (requires careful validation)
- HIGH: Delete operations (requires explicit "YES" confirmation)
Protected Categories:
- Meta skills (skill-creator-doctor, skills-manager)
- Core debugging skills (dev-debugging, dev-fix-timer)
- Fundamental workflow skills (git-workflow-helper, basic-coding)
风险等级:
- LOW:归档操作(保留数据,可撤销)
- MEDIUM:合并操作(需仔细验证)
- HIGH:删除操作(需明确输入"YES"确认)
受保护类别:
- 元技能(skill-creator-doctor, skills-manager)
- 核心调试技能(dev-debugging, dev-fix-timer)
- 基础工作流技能(git-workflow-helper, basic-coding)
Configuration
配置
Configuration File
配置文件
yaml
undefinedyaml
undefined.claude/skills-manager-config.yml
.claude/skills-manager-config.yml
conservatism_level: balanced # Options: aggressive, balanced, conservative
protected_skills:
- skill-creator-doctor
- skills-manager
- dev-debugging
- basic-coding
- git-workflow-helper
- file-operations
risk_settings:
max_deletion_risk: medium # disallow high-risk deletion without manual confirmation
merge_threshold: 0.7 # 70% overlap required for merge suggestion
archive_instead_of_delete: true
require_confirmation_for:
- delete
- merge
- modify_protected
usage_analysis:
usage_window_days: 90 # Analyze skill activations from last 90 days
inactive_threshold: 180 # Days without usage before considering archive
high_usage_threshold: 20 # Uses per 90 days = high usage
redundancy_detection:
capability_similarity_threshold: 0.8
trigger_conflict_detection: true
semantic_analysis_enabled: true
output:
generate_reports: true
create_backup: true
verbose_logging: false
undefinedconservatism_level: balanced # 选项: aggressive, balanced, conservative
protected_skills:
- skill-creator-doctor
- skills-manager
- dev-debugging
- basic-coding
- git-workflow-helper
- file-operations
risk_settings:
max_deletion_risk: medium # 无手动确认时禁止高风险删除
merge_threshold: 0.7 # 合并建议所需的最低重叠度
archive_instead_of_delete: true
require_confirmation_for:
- delete
- merge
- modify_protected
usage_analysis:
usage_window_days: 90 # 分析过去90天的技能激活情况
inactive_threshold: 180 # 未使用天数达到此阈值则考虑归档
high_usage_threshold: 20 # 每90天使用次数达到此值即为高频使用
redundancy_detection:
capability_similarity_threshold: 0.8
trigger_conflict_detection: true
semantic_analysis_enabled: true
output:
generate_reports: true
create_backup: true
verbose_logging: false
undefinedRuntime Configuration Updates
运行时配置更新
bash
undefinedbash
undefinedUpdate conservatism level
更新保守程度
/skills-config --conservatism conservative
/skills-config --conservatism conservative
Add protected skill
添加受保护技能
/skills-config --protect new-important-skill
/skills-config --protect new-important-skill
Adjust thresholds
调整阈值
/skills-config --merge-threshold 0.85
---/skills-config --merge-threshold 0.85
---Usage Examples
使用示例
Example 1: Full Skills Audit
示例1:完整技能审计
User: "/skills-audit"
System Response:
🔍 Running comprehensive skills audit...
=== System Analysis ===
Project: Vue.js TypeScript Application
Key Technologies: Vue 3, TypeScript, Pinia, Tailwind CSS
Relevance Domains: frontend, vue.js, typescript, productivity
=== Skills Inventory ===
Total Skills: 47
Categories: debug(12), create(8), fix(15), optimize(5), meta(7)
=== Usage Analysis ===
High Usage (20+): vue-debugging(23), dev-fix-timer(18)
Medium Usage (5-19): pinia-fixer(15), component-debugger(12)
Low Usage (1-4): old-webpack-configurator(1)
No Usage: legacy-skill(0), obsolete-helper(0)
=== Recommendations ===
5 skills ready for consolidation
3 skills candidates for archival
2 potential trigger conflicts identified
Generated detailed report: .claude/skills-audit-report-20251123.mdUser: "/skills-audit"
System Response:
🔍 Running comprehensive skills audit...
=== System Analysis ===
Project: Vue.js TypeScript Application
Key Technologies: Vue 3, TypeScript, Pinia, Tailwind CSS
Relevance Domains: frontend, vue.js, typescript, productivity
=== Skills Inventory ===
Total Skills: 47
Categories: debug(12), create(8), fix(15), optimize(5), meta(7)
=== Usage Analysis ===
High Usage (20+): vue-debugging(23), dev-fix-timer(18)
Medium Usage (5-19): pinia-fixer(15), component-debugger(12)
Low Usage (1-4): old-webpack-configurator(1)
No Usage: legacy-skill(0), obsolete-helper(0)
=== Recommendations ===
5 skills ready for consolidation
3 skills candidates for archival
2 potential trigger conflicts identified
Generated detailed report: .claude/skills-audit-report-20251123.mdExample 2: Safe Consolidation
示例2:安全整合
User: "/skills-consolidate"
System Response:
📋 Skills Consolidation Plan Generated
=== Executive Summary ===
- Current skills: 47 → Proposed: 32 (32% reduction)
- High priority actions: 5 (3 merges, 2 archives)
- Risk level: Medium (with backups available)
=== Proposed Actions ===
1. MERGE: component-debugger + vue-component-debugger → vue-debugging
Similarity: 92% | Usage: vue-debugging 3x higher | Risk: LOW
Rationale: High capability overlap, vue-debugging more actively used
2. ARCHIVE: old-webpack-configurator
Last used: 210+ days ago | Obsolete webpack v3 references | Risk: LOW
Rationale: No recent usage, superseded by modern tools
=== Protected Skills (Will NOT be modified) ===
- skill-creator-doctor (meta-skill)
- dev-debugging (core functionality)
- basic-coding (fundamental capability)
=== Safety Measures ===
✅ Backup will be created: .claude/skills-backup-20251123/
✅ Working branch: skills/consolidation-20251123
✅ Rollback available via git revert or backup restore
Proceed with consolidation? (y/n/view details):User: "/skills-consolidate"
System Response:
📋 Skills Consolidation Plan Generated
=== Executive Summary ===
- Current skills: 47 → Proposed: 32 (32% reduction)
- High priority actions: 5 (3 merges, 2 archives)
- Risk level: Medium (with backups available)
=== Proposed Actions ===
1. MERGE: component-debugger + vue-component-debugger → vue-debugging
Similarity: 92% | Usage: vue-debugging 3x higher | Risk: LOW
Rationale: High capability overlap, vue-debugging more actively used
2. ARCHIVE: old-webpack-configurator
Last used: 210+ days ago | Obsolete webpack v3 references | Risk: LOW
Rationale: No recent usage, superseded by modern tools
=== Protected Skills (Will NOT be modified) ===
- skill-creator-doctor (meta-skill)
- dev-debugging (core functionality)
- basic-coding (fundamental capability)
=== Safety Measures ===
✅ Backup will be created: .claude/skills-backup-20251123/
✅ Working branch: skills/consolidation-20251123
✅ Rollback available via git revert or backup restore
Proceed with consolidation? (y/n/view details):Example 3: Selective Skill Merge
示例3:选择性技能合并
User: "/skills-merge react-component-builder ui-generator"
System Response:
🔍 Analyzing skills for merge...
=== Skill Analysis ===
react-component-builder:
- Capabilities: Build React components, TypeScript support
- Usage: 8 times in last 90 days
- Last used: 2025-11-15
ui-generator:
- Capabilities: Generate UI components, styling options
- Usage: 5 times in last 90 days
- Last used: 2025-11-10
=== Similarity Analysis ===
Capability Overlap: 76%
Shared Features: Component generation, TypeScript support
Unique Features:
- react-component-builder: React-specific hooks
- ui-generator: Multiple styling frameworks
=== Merge Recommendation ===
Confidence: 82% | Risk: MEDIUM
Proposed Name: component-generator
Strategy: Combine capabilities with React-specific options
Proceed with merge? (y/n/customize):User: "/skills-merge react-component-builder ui-generator"
System Response:
🔍 Analyzing skills for merge...
=== Skill Analysis ===
react-component-builder:
- Capabilities: Build React components, TypeScript support
- Usage: 8 times in last 90 days
- Last used: 2025-11-15
ui-generator:
- Capabilities: Generate UI components, styling options
- Usage: 5 times in last 90 days
- Last used: 2025-11-10
=== Similarity Analysis ===
Capability Overlap: 76%
Shared Features: Component generation, TypeScript support
Unique Features:
- react-component-builder: React-specific hooks
- ui-generator: Multiple styling frameworks
=== Merge Recommendation ===
Confidence: 82% | Risk: MEDIUM
Proposed Name: component-generator
Strategy: Combine capabilities with React-specific options
Proceed with merge? (y/n/customize):Resources
资源
scripts/
scripts/
Automation tools for skills management:
- analyze_skills.py - Complete skills analysis and inventory
- detect_redundancies.py - Find overlapping and duplicate skills
- merge_skills.py - Safe skill merging with conflict resolution
- archive_skills.py - Automated archival with metadata preservation
- validate_registry.py - Ensure skills.json consistency
- backup_manager.py - Create and manage skill backups
技能管理自动化工具:
- analyze_skills.py - 完整的技能分析与盘点
- detect_redundancies.py - 找出功能重叠和重复的技能
- merge_skills.py - 带冲突解决的安全技能合并
- archive_skills.py - 带元数据保留的自动归档
- validate_registry.py - 确保skills.json一致性
- backup_manager.py - 创建和管理技能备份
references/
references/
Detailed guides and reference materials:
- skills_taxonomy.md - Comprehensive skill categorization framework
- merge_best_practices.md - Guidelines for combining skills effectively
- rollback_procedures.md - Emergency recovery and rollback instructions
- usage_analytics.md - Methods for tracking skill utilization
These resources provide the technical implementation details for the workflows described above, enabling systematic and safe skills management with full audit trails and recovery capabilities.
详细指南和参考资料:
- skills_taxonomy.md - 全面的技能分类框架
- merge_best_practices.md - 有效合并技能的指南
- rollback_procedures.md - 紧急恢复与回滚说明
- usage_analytics.md - 技能使用情况跟踪方法
这些资源提供了上述工作流的技术实现细节,支持系统化、安全的技能管理,并具备完整的审计追踪和恢复能力。
MANDATORY USER VERIFICATION REQUIREMENT
强制用户验证要求
Policy: No Fix Claims Without User Confirmation
政策:无用户确认不得声称问题已解决
CRITICAL: Before claiming ANY issue, bug, or problem is "fixed", "resolved", "working", or "complete", the following verification protocol is MANDATORY:
关键提示:在声称任何问题、bug或故障已“修复”“解决”“正常工作”或“完成”之前,必须执行以下验证流程:
Step 1: Technical Verification
步骤1:技术验证
- Run all relevant tests (build, type-check, unit tests)
- Verify no console errors
- Take screenshots/evidence of the fix
- 运行所有相关测试(构建、类型检查、单元测试)
- 验证控制台无错误
- 留存修复后的截图/证据
Step 2: User Verification Request
步骤2:请求用户验证
REQUIRED: Use the tool to explicitly ask the user to verify the fix:
AskUserQuestion"I've implemented [description of fix]. Before I mark this as complete, please verify:
1. [Specific thing to check #1]
2. [Specific thing to check #2]
3. Does this fix the issue you were experiencing?
Please confirm the fix works as expected, or let me know what's still not working."必须:使用工具明确请求用户验证修复效果:
AskUserQuestion"我已完成[修复内容描述]。在标记为完成前,请您验证:
1. [需要检查的具体事项1]
2. [需要检查的具体事项2]
3. 这是否解决了您遇到的问题?
请确认修复是否符合预期,或告知我仍存在的问题。"Step 3: Wait for User Confirmation
步骤3:等待用户确认
- DO NOT proceed with claims of success until user responds
- DO NOT mark tasks as "completed" without user confirmation
- DO NOT use phrases like "fixed", "resolved", "working" without user verification
- 不得在用户回复前声称修复成功
- 不得在无用户确认时标记任务为“已完成”
- 不得在无用户验证时使用“已修复”“已解决”“正常工作”等表述
Step 4: Handle User Feedback
步骤4:处理用户反馈
- If user confirms: Document the fix and mark as complete
- If user reports issues: Continue debugging, repeat verification cycle
- 若用户确认:记录修复内容并标记为完成
- 若用户反馈问题:继续调试,重复验证流程
Prohibited Actions (Without User Verification)
禁止操作(无用户验证时)
- Claiming a bug is "fixed"
- Stating functionality is "working"
- Marking issues as "resolved"
- Declaring features as "complete"
- Any success claims about fixes
- 声称bug已“修复”
- 声明功能“正常工作”
- 标记问题为“已解决”
- 宣称功能“已完成”
- 任何关于修复成功的表述
Required Evidence Before User Verification Request
请求用户验证前需准备的证据
- Technical tests passing
- Visual confirmation via Playwright/screenshots
- Specific test scenarios executed
- Clear description of what was changed
Remember: The user is the final authority on whether something is fixed. No exceptions.
- 技术测试通过
- Playwright截图/可视化确认
- 已执行的具体测试场景
- 变更内容的清晰描述
请牢记:用户是判断问题是否解决的最终权威,无例外。