Initial commit

This commit is contained in:
Zhongwei Li
2025-11-30 09:04:17 +08:00
commit 652915e226
62 changed files with 8212 additions and 0 deletions

View File

@@ -0,0 +1,168 @@
#!/usr/bin/env python3
"""
Create Skill Directory Structures for Existing Plugins
Mechanically creates the directory structure for skills in plugins
that don't have them yet. Agent will fill in content later.
Usage:
python create-skill-structures.py [--dry-run]
"""
import sys
from pathlib import Path
from datetime import datetime
MARKETPLACE_DIR = Path.home() / ".claude/marketplaces/multiagent-dev/plugins"
# Mapping: plugin-name → skill-name
PLUGIN_SKILLS = {
"multiagent-ai-infrastructure": "ai-infrastructure-assistant",
"multiagent-backend": "backend-developer",
"multiagent-build": "build-assistant",
"multiagent-compliance": "compliance-advisor",
"multiagent-core": "core-initializer",
"multiagent-cto": "architecture-reviewer",
"multiagent-deployment": "deployment-assistant",
"multiagent-docs": "documentation-writer",
"multiagent-enhancement": "enhancement-manager",
"multiagent-frontend": "frontend-developer",
"multiagent-github": "github-integration",
"multiagent-idea": "idea-tracker",
"multiagent-implementation": "implementation-orchestrator",
"multiagent-iterate": "iteration-manager",
"multiagent-mcp": "mcp-manager",
"multiagent-notes": "notes-tracker",
"multiagent-observability": "observability-monitor",
"multiagent-performance": "performance-optimizer",
"multiagent-profile": "developer-profile",
"multiagent-refactoring": "refactoring-analyzer",
"multiagent-reliability": "reliability-engineer",
"multiagent-security": "security-advisor",
"multiagent-supervisor": "supervisor-coordinator",
"multiagent-validation": "validation-checker",
"multiagent-version": "version-manager",
}
def create_skill_structure(plugin_name: str, skill_name: str, dry_run: bool = False):
"""Create mechanical skill directory structure."""
plugin_dir = MARKETPLACE_DIR / plugin_name
skill_slug = skill_name.lower().replace(" ", "-")
skill_dir = plugin_dir / "skills" / skill_slug
# Check if plugin exists
if not plugin_dir.exists():
print(f" WARNING: Plugin directory not found: {plugin_dir}")
return False
# Check if skill already exists
if (skill_dir / "SKILL.md").exists():
print(f" SKIP: Skill already exists: {skill_slug}")
return False
print(f"\n[{plugin_name}]")
print(f" Creating skill: {skill_slug}")
if dry_run:
print(f" [DRY RUN] Would create:")
print(f" - {skill_dir}/")
print(f" - {skill_dir}/scripts/")
print(f" - {skill_dir}/templates/")
print(f" - {skill_dir}/SKILL.md (placeholder)")
print(f" - {skill_dir}/reference.md (placeholder)")
print(f" - {skill_dir}/examples.md (placeholder)")
return True
# Create directories
skill_dir.mkdir(parents=True, exist_ok=True)
(skill_dir / "scripts").mkdir(exist_ok=True)
(skill_dir / "templates").mkdir(exist_ok=True)
print(f" OK: Created directories")
# Create placeholder files (agent will fill these)
skill_md = skill_dir / "SKILL.md"
skill_md.write_text(f"""---
name: {skill_name.title()}
description: TODO - Agent will fill this
allowed-tools: Read, Write, Bash
---
# {skill_name.title()}
TODO: Agent will generate content using skill-builder
""")
reference_md = skill_dir / "reference.md"
reference_md.write_text(f"""# {skill_name.title()} - Reference
TODO: Agent will generate API reference
""")
examples_md = skill_dir / "examples.md"
examples_md.write_text(f"""# {skill_name.title()} - Examples
TODO: Agent will generate examples
""")
# Create .gitkeep in empty dirs
(skill_dir / "scripts" / ".gitkeep").touch()
(skill_dir / "templates" / ".gitkeep").touch()
print(f" OK: Created placeholder files")
print(f" Location: {skill_dir}")
return True
def main():
"""Create skill structures for all plugins."""
dry_run = "--dry-run" in sys.argv
print("=" * 70)
print("Creating Skill Structures for Existing Plugins")
print("=" * 70)
if dry_run:
print("\n⚠️ DRY RUN MODE - No changes will be made\n")
print(f"\nMarketplace: {MARKETPLACE_DIR}")
print(f"Plugins to process: {len(PLUGIN_SKILLS)}\n")
created = 0
skipped = 0
errors = 0
for plugin_name, skill_name in PLUGIN_SKILLS.items():
try:
result = create_skill_structure(plugin_name, skill_name, dry_run)
if result:
created += 1
else:
skipped += 1
except Exception as e:
print(f" ERROR: {e}")
errors += 1
print("\n" + "=" * 70)
print("Summary")
print("=" * 70)
print(f"Created: {created}")
print(f"Skipped: {skipped}")
print(f"Errors: {errors}")
print()
if dry_run:
print("Run without --dry-run to create structures")
else:
print("Next step: Run headless skill generation to fill content")
print(" ./scripts/plugins/marketplace/fill-skill-content.sh")
return 0 if errors == 0 else 1
if __name__ == "__main__":
sys.exit(main())