| name | self-maintainer |
| description | Self-maintaining skill that updates, improves, and audits the awesome-skills maintenance skill system. Use when: (1) updating skills to new patterns, (2) auditing skill health, (3) self-improvement. Triggers on: "self-maintain", "audit skills", "skill health", "improve skills", "skill maintenance", "maintain myself". This skill examines and updates the .skills/ directory itself. |
Self-Maintainer
Self-auditing and self-improving skill for the awesome-skills maintenance system.
Core Principle
This skill follows the same patterns it maintains. When it improves itself, it uses these same instructions. This creates a positive feedback loop where the maintenance system gets better at maintaining itself.
Workflow
1. Audit Current Skills Health
cd /Volumes/waku/github-็ปดๆค/awesome/awesome-skills-repos/.skills
echo "=== Skills Directory Health Check ===\n"
echo "Skill directories:"
for skill in */; do
name=$(basename "$skill")
if [ -f "$skill/SKILL.md" ]; then
size=$(wc -c < "$skill/SKILL.md")
lines=$(wc -l < "$skill/SKILL.md")
echo " โ
$name - ${size}B, ${lines} lines"
else
echo " โ $name - MISSING SKILL.md"
fi
done
echo ""
echo "Total skills: $(ls -d */ | wc -l | tr -d ' ')"
echo "Total SKILL.md files: $(find . -name 'SKILL.md' | wc -l | tr -d ' ')"
2. Check for Skill Anti-Patterns
python3 << 'PYEOF'
import os
import re
from pathlib import Path
SKILLS_DIR = Path("/Volumes/waku/github-็ปดๆค/awesome/awesome-skills-repos/.skills")
issues = []
for skill_dir in SKILLS_DIR.iterdir():
if not skill_dir.is_dir():
continue
skill_name = skill_dir.name
skill_md = skill_dir / "SKILL.md"
if not skill_md.exists():
issues.append(f"โ {skill_name}: SKILL.md missing")
continue
content = skill_md.read_text()
if not content.startswith('---'):
issues.append(f"โ {skill_name}: Missing YAML frontmatter")
if 'name:' not in content[:500]:
issues.append(f"โ {skill_name}: Missing 'name:' in frontmatter")
if 'description:' not in content[:500]:
issues.append(f"โ {skill_name}: Missing 'description:' in frontmatter")
if len(content) < 500:
issues.append(f"โ ๏ธ {skill_name}: SKILL.md is very short ({len(content)} bytes)")
for f in skill_dir.iterdir():
if f.name.startswith('README') and f.suffix == '.md':
issues.append(f"โ ๏ธ {skill_name}: Has {f.name} (should be in SKILL.md or references/)")
for root, dirs, files in os.walk(skill_dir):
depth = root.replace(str(skill_dir), '').count(os.sep)
if depth > 2:
issues.append(f"โ ๏ธ {skill_name}: Excessive nesting at depth {depth}")
desc_match = re.search(r'description:\s*["\'](.+?)["\']', content[:1000], re.DOTALL)
if desc_match:
desc_len = len(desc_match.group(1))
if desc_len < 50:
issues.append(f"โ ๏ธ {skill_name}: description is very short ({desc_len} chars)")
if issues:
print("=== Issues Found ===")
for issue in issues:
print(f" {issue}")
else:
print("โ
All skills pass basic health checks!")
PYEOF
3. Check Consistency with Latest OpenClaw SKILL.md Spec
echo "=== OpenClaw SKILL.md Spec Compliance ==="
echo ""
echo "Checking against: /opt/homebrew/lib/node_modules/openclaw/skills/skill-creator/SKILL.md"
echo ""
REQUIREMENTS=(
"YAML frontmatter with name and description"
"Anatomy: SKILL.md + optional scripts/ + optional references/ + optional assets/"
"scripts/: executable code (Python/Bash)"
"references/: documentation for loading as needed"
"assets/: files used in output (templates, images)"
"SKILL.md body: instructions under 500 lines preferred"
"Progressive disclosure: metadata โ SKILL.md body โ references"
)
echo "Required patterns:"
for req in "${REQUIREMENTS[@]}"; do
echo " - $req"
done
4. Update Outdated Skills
python3 << 'PYEOF'
import json
from pathlib import Path
from datetime import datetime
SKILLS_DIR = Path("/Volumes/waku/github-็ปดๆค/awesome/awesome-skills-repos/.skills")
for skill_dir in SKILLS_DIR.iterdir():
if not skill_dir.is_dir():
continue
skill_md = skill_dir / "SKILL.md"
if not skill_md.exists():
continue
content = skill_md.read_text()
suggestions = []
if 'python3 <<' in content and 'PYEOF' in content:
suggestions.append("Uses inline Python heredoc - consider extracting to scripts/")
if content.count('\n```\n') > 15:
suggestions.append("Many code blocks - consider progressive disclosure")
if len(content) > 10000:
suggestions.append("SKILL.md is very long (>10k chars) - consider splitting")
if suggestions:
print(f"\n### {skill_dir.name}")
for s in suggestions:
print(f" ๐ก {s}")
PYEOF
5. Extract Repeated Code to Shared Scripts
cd /Volumes/waku/github-็ปดๆค/awesome/awesome-skills-repos/.skills
echo "=== Checking for Shared Code Opportunities ==="
for skill in */SKILL.md; do
name=$(basename $(dirname $skill))
has_python=$(grep -c "python3" "$skill" 2>/dev/null || echo 0)
has_curl=$(grep -c "curl" "$skill" 2>/dev/null || echo 0)
has_github=$(grep -c "github" "$skill" 2>/dev/null || echo 0)
if [ "$has_python" -gt 3 ] || [ "$has_curl" -gt 5 ] || [ "$has_github" -gt 5 ]; then
echo " $name: python=$has_python curl=$has_curl github=$has_github"
fi
done
echo ""
echo "If a skill uses Python/curl extensively, consider extracting"
echo "reusable functions to .skills/scripts/shared.py"
6. Generate Maintenance Report
cd /Volumes/waku/github-็ปดๆค/awesome/awesome-skills-repos
python3 << 'PYEOF'
import json
from pathlib import Path
from datetime import datetime
repo = Path("/Volumes/waku/github-็ปดๆค/awesome/awesome-skills-repos")
skills_dir = repo / ".skills"
report = f"""# ๅขจ้ด-Skills็ปดๆค็ณป็ปๅฅๅบทๆฅๅ {datetime.now().strftime('%Y-%m-%d')}
## ็ณป็ปๆฆ่ง
- ๆ่ฝๆปๆฐ๏ผ{len(list(skills_dir.iterdir()))}
- skills.json ๆก็ฎ๏ผ{len(json.load(open(repo / 'skills.json')))}
- ไปๅบๅฐๅ๏ผhttps://github.com/vivy-yi/awesome-skills
## .skills/ ็ฎๅฝ็ปๆ
"""
for skill_path in sorted(skills_dir.iterdir()):
if not skill_path.is_dir():
continue
name = skill_path.name
skill_md = skill_path / "SKILL.md"
if skill_md.exists():
size = skill_md.stat().st_size
lines = len(skill_md.read_text().splitlines())
report += f"- โ
{name}/ โ {size}B, {lines} ่ก\n"
else:
report += f"- โ {name}/ โ SKILL.md ็ผบๅคฑ\n"
for sub in ['scripts', 'references', 'assets']:
sub_path = skill_path / sub
if sub_path.exists() and any(sub_path.iterdir()):
files = [f.name for f in sub_path.iterdir()]
report += f" - {sub}/: {', '.join(files)}\n"
report += f"""
## ๆ่ฟๆดๆฐ
"""
import subprocess
result = subprocess.run(
['git', 'log', '--oneline', '-10'],
cwd=str(repo),
capture_output=True, text=True
)
report += "```\n" + result.stdout + "```\n"
report += """
## ็ณป็ปๅฅๅบท็ถๆ
- [ ] ๆๆ SKILL.md ๆไปถๅญๅจไธๆ ผๅผๆญฃ็กฎ
- [ ] ๆ ๅไฝ README ๆไปถ
- [ ] ๅตๅฅๆทฑๅบฆ โค 2 ๅฑ
- [ ] ้ๅคไปฃ็ ๅทฒๆๅๅฐ shared scripts
- [ ] ๅฎๆถไปปๅกๆญฃๅธธ่ฟ่ก
## ๅพ
ๆน่ฟ้กน
1. ๅฎๆ่ฟ่ก self-maintainer ๆฃๆฅๅฅๅบท็ถๆ
2. ๆๅ้็จไปฃ็ ๅฐ shared utilities
3. ่่ๆทปๅ references/ ็ฎๅฝๅญๅจ่ฏฆ็ปๆๆกฃ
"""
with open(repo / ".skills" / "HEALTH.md", 'w') as f:
f.write(report)
print("Health report generated: .skills/HEALTH.md")
print(report)
PYEOF
7. Commit Self-Maintenance Changes
cd /Volumes/waku/github-็ปดๆค/awesome/awesome-skills-repos
git add .skills/
git status
echo "---"
read -p "Commit self-maintenance? (y/n) " ans
if [ "$ans" = "y" ]; then
git commit -m "chore(self): skills system self-maintenance $(date +%Y-%m-%d)"
git push
echo "Self-maintenance complete!"
fi
Self-Improvement Loop
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ self-maintainer runs โ
โ (triggered by cron or agent) โ
โโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Audit: health check โ
โ - SKILL.md existence โ
โ - Frontmatter validity โ
โ - Anti-pattern detection โ
โโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Analyze: find improvement areas โ
โ - Extract repeated code โ
โ - Split oversized SKILL.md โ
โ - Add missing metadata โ
โโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Act: make improvements โ
โ - Update SKILL.md files โ
โ - Create shared scripts/ โ
โ - Generate health report โ
โโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Commit & push โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Trigger Frequency
Run self-maintenance:
- Weekly: Via cron or agent trigger
- After adding new skills: Ensure quality
- Before major updates: Validate current state
Notes
- This skill is the most meta โ it maintains the maintenance system
- Creates HEALTH.md as a living status document
- Extracts reusable code to shared utilities when found
- Always commits with
chore(self): prefix to distinguish from content updates