create-skill.sh 969 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. #!/bin/bash
  2. # Quick Skill directory structure generator
  3. # Usage: ./create-skill.sh <skill-name>
  4. SKILL_NAME=$1
  5. if [ -z "$SKILL_NAME" ]; then
  6. echo "Usage: ./create-skill.sh <skill-name>"
  7. echo "Example: ./create-skill.sh my-awesome-skill"
  8. exit 1
  9. fi
  10. mkdir -p "$SKILL_NAME"/{assets,scripts,references}
  11. cat > "$SKILL_NAME/SKILL.md" << 'EOF'
  12. ---
  13. name: SKILL_NAME_PLACEHOLDER
  14. description: Skill description
  15. ---
  16. # Skill Name
  17. ## Overview
  18. Brief explanation of the skill's purpose.
  19. ## When to Use This Skill
  20. - Scenario 1
  21. - Scenario 2
  22. ## Instructions
  23. [Detailed instructions]
  24. ## Examples
  25. [Usage examples]
  26. ## Constraints
  27. - Limitation 1
  28. - Limitation 2
  29. EOF
  30. sed -i "s/SKILL_NAME_PLACEHOLDER/$SKILL_NAME/g" "$SKILL_NAME/SKILL.md"
  31. echo "✅ Created Skill: $SKILL_NAME/"
  32. echo " ├── SKILL.md"
  33. echo " ├── assets/"
  34. echo " ├── scripts/"
  35. echo " └── references/"
  36. echo ""
  37. echo "Next: Edit $SKILL_NAME/SKILL.md to add your instructions"