Claude
Skills
Sign in
โ† Back

skills-manager

Included with Lifetime
$97 forever

Universal consolidation & audit skill for Claude Code skills. Analyzes project state, detects redundancies, and safely manages skills with backup, confirmations, and rollback capabilities. Never assumes without verifying actual code and usage patterns.

AI Agentsscripts

What this skill does


# Skills Manager Skill - Universal Consolidation & Audit for 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.**

## 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 settings
```

### 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?"

---

## Phase 1: System State & Skills Inventory (MANDATORY First Step)

### 1.1 Detect Project Type & Tech Stack

**Objective:** Build accurate understanding of your actual project.

**Process:**

#### Parse Dependency Files
```bash
# Find 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"

# 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
```

#### Map Project Structure
```bash
# Analyze 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

# 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
```

**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"]
}
```

### 1.2 Inventory All Current Skills

**Objective:** Complete catalog of all skills with metadata.

**Process:**

```bash
# Scan 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)
    }
```

### 1.3 Analyze Usage Patterns

**Objective:** Understand which skills are actually being used.

**Process:**

#### Analyze Git History for Skill References
```bash
# Search git history for skill mentions
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
```

#### Analyze 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 dependencies
```

**Output 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"]
    }
  }
}

Related in AI Agents