Files
catlog22 f5e435f791 feat: Optimize ccw-help skill with user-prompted update mechanism
- Add auto-update.py script for simple index regeneration
- Update SKILL.md with clear update instructions
- Simplify update mechanism: prompt user on skill execution
- Support both automatic and manual update workflows
- Clean version 2.3.0 metadata in command.json
2026-01-29 15:58:51 +08:00

35 lines
822 B
Python

#!/usr/bin/env python3
"""
Simple update script for ccw-help skill.
Runs analyze_commands.py to regenerate command index.
"""
import sys
import subprocess
from pathlib import Path
BASE_DIR = Path("D:/Claude_dms3/.claude")
SKILL_DIR = BASE_DIR / "skills" / "ccw-help"
ANALYZE_SCRIPT = SKILL_DIR / "scripts" / "analyze_commands.py"
def run_update():
"""Run command analysis update."""
try:
result = subprocess.run(
[sys.executable, str(ANALYZE_SCRIPT)],
capture_output=True,
text=True,
timeout=30
)
print(result.stdout)
return result.returncode == 0
except Exception as e:
print(f"Error running update: {e}")
return False
if __name__ == '__main__':
success = run_update()
sys.exit(0 if success else 1)