Skill Dedup Scanner
by @shyjsarah
Scans installed skills for duplicates and naming conflicts. Detects similar skills that may cause model confusion. Use before publishing new skills or when t...
clawhub install skill-dedup-scannerπ About This Skill
name: skill-dedup-scanner description: Scans installed skills for duplicates and naming conflicts. Detects similar skills that may cause model confusion. Use before publishing new skills or when troubleshooting trigger conflicts. Supports English and Chinese (auto-detect or --lang flag).
Skill Dedup Scanner π
Detects duplicate or similar skills that may cause model confusion.
When to Use
Usage
Basic Scan
# Auto-detect language
python3 scripts/main.py ~/.openclaw/workspace/skills/Specify language
python3 scripts/main.py ~/.openclaw/workspace/skills/ --lang en
python3 scripts/main.py ~/.openclaw/workspace/skills/ --lang zh
Advanced Options
# Custom threshold (0-1)
python3 scripts/main.py ~/.openclaw/workspace/skills/ --threshold 0.8Output to file
python3 scripts/main.py ~/.openclaw/workspace/skills/ -o audit_report.mdJSON output
python3 scripts/main.py ~/.openclaw/workspace/skills/ --jsonVerbose mode
python3 scripts/main.py ~/.openclaw/workspace/skills/ -v
Options
| Option | Short | Description | Default |
|--------|-------|-------------|---------|
| --lang | -l | Language: en, zh, auto | auto |
| --threshold | -t | Similarity threshold (0-1) | 0.7 |
| --output | -o | Output file path | stdout |
| --json | -j | Output in JSON format | false |
| --verbose | -v | Verbose output | false |
Output
Generates a detailed report with:
Similarity Thresholds
| Score | Level | Action | |-------|-------|--------| | > 0.85 | π΄ High | Consider merging or renaming | | 0.7-0.85 | π‘ Medium | Clarify descriptions | | < 0.7 | β Safe | No action needed |
Language Support
--lang en)--lang zh)--lang auto) - Detects system localeExamples
Example 1: Quick Scan
$ python3 scripts/main.py ~/.openclaw/workspace/skills/
π Scan Directory: /home/user/.openclaw/workspace/skills
π¦ Total Skills: 15β
No Duplicate Skills Found
All skills have distinct names and descriptions. No optimization needed.
Example 2: Find Conflicts
$ python3 scripts/main.py ~/.openclaw/workspace/skills/ --threshold 0.6
π Scan Directory: /home/user/.openclaw/workspace/skills
π¦ Total Skills: 15β οΈ Found 2 Groups of Similar Skills
1. π΄ High Similarity Warning
Skill A: tushare-finance
Skill B: stock-analyzer
Similarity Score: 85%
Analysis:
Name Similarity: 60%
Description Similarity: 85% Recommendations:
Clarify the distinction in descriptions
Rename to make purposes more distinct
Project Structure
skill-dedup-scanner/
βββ scripts/
β βββ main.py # Main entry point
β βββ skill_scanner.py # Skill scanner
β βββ similarity_checker.py # Similarity calculator
β βββ report_generator.py # Report generator
β βββ locale_loader.py # Multi-language support
βββ locales/
β βββ en.json # English translations
β βββ zh.json # Chinese translations
βββ references/
β βββ best_practices.md # Skill naming best practices
βββ output/ # Generated reports
Requirements
pip install pyyaml)License
MIT
β‘ When to Use
π‘ Examples
Example 1: Quick Scan
$ python3 scripts/main.py ~/.openclaw/workspace/skills/
π Scan Directory: /home/user/.openclaw/workspace/skills
π¦ Total Skills: 15β
No Duplicate Skills Found
All skills have distinct names and descriptions. No optimization needed.
Example 2: Find Conflicts
$ python3 scripts/main.py ~/.openclaw/workspace/skills/ --threshold 0.6
π Scan Directory: /home/user/.openclaw/workspace/skills
π¦ Total Skills: 15β οΈ Found 2 Groups of Similar Skills
1. π΄ High Similarity Warning
Skill A: tushare-finance
Skill B: stock-analyzer
Similarity Score: 85%
Analysis:
Name Similarity: 60%
Description Similarity: 85% Recommendations:
Clarify the distinction in descriptions
Rename to make purposes more distinct
βοΈ Configuration
| Option | Short | Description | Default |
|--------|-------|-------------|---------|
| --lang | -l | Language: en, zh, auto | auto |
| --threshold | -t | Similarity threshold (0-1) | 0.7 |
| --output | -o | Output file path | stdout |
| --json | -j | Output in JSON format | false |
| --verbose | -v | Verbose output | false |