✨ feat: add commit_message and bdd_testing skills
- Create commit_message skill with Gitmoji validation and templates - Update bdd_testing skill to match validated BDD implementation - Add comprehensive documentation and validation scripts - Ensure all skills follow AGENTS.md conventions Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
169
.vibe/skills/skill_creator/scripts/create_skill.sh
Executable file
169
.vibe/skills/skill_creator/scripts/create_skill.sh
Executable file
@@ -0,0 +1,169 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Create a new skill scaffold
|
||||
|
||||
set -e
|
||||
|
||||
if [ $# -eq 0 ]; then
|
||||
echo "Usage: $0 <skill_name>"
|
||||
echo "Example: $0 bdd-testing"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
SKILL_NAME=$1
|
||||
SKILL_DIR=".vibe/skills/${SKILL_NAME}"
|
||||
|
||||
# Convert underscores to hyphens for the skill name
|
||||
SKILL_NAME_HYPHENATED=$(echo "$SKILL_NAME" | tr '_' '-')
|
||||
|
||||
# Create skill directory
|
||||
mkdir -p "$SKILL_DIR"
|
||||
|
||||
# Create SKILL.md with basic template
|
||||
cat > "$SKILL_DIR/SKILL.md" <<EOL
|
||||
---
|
||||
name: ${SKILL_NAME_HYPHENATED}
|
||||
description: [Brief description of what this skill does and when to use it]
|
||||
license: MIT
|
||||
metadata:
|
||||
author: [Your Name or Organization]
|
||||
version: "1.0.0"
|
||||
---
|
||||
|
||||
# ${SKILL_NAME_HYPHENATED}
|
||||
|
||||
[Detailed description of the skill's purpose and functionality]
|
||||
|
||||
## Commands
|
||||
|
||||
### [Command Name]
|
||||
|
||||
\`\`\`bash
|
||||
[command usage]
|
||||
\`\`\`
|
||||
|
||||
[Command description]
|
||||
|
||||
**Arguments:**
|
||||
- `arg1` - Description
|
||||
- `arg2` - Description
|
||||
|
||||
## Workflows
|
||||
|
||||
### [Workflow Name]
|
||||
|
||||
1. **Step 1**: [Description]
|
||||
2. **Step 2**: [Description]
|
||||
3. **Step 3**: [Description]
|
||||
|
||||
## Usage Examples
|
||||
|
||||
### [Example Name]
|
||||
|
||||
\`\`\`bash
|
||||
[example code]
|
||||
\`\`\`
|
||||
|
||||
## Best Practices
|
||||
|
||||
1. [Best practice 1]
|
||||
2. [Best practice 2]
|
||||
3. [Best practice 3]
|
||||
|
||||
## References
|
||||
|
||||
- [Reference 1](references/[reference-file].md)
|
||||
- [Reference 2](references/[reference-file].md)
|
||||
EOL
|
||||
|
||||
# Create optional directories
|
||||
mkdir -p "$SKILL_DIR/scripts"
|
||||
mkdir -p "$SKILL_DIR/references"
|
||||
mkdir -p "$SKILL_DIR/assets"
|
||||
|
||||
# Create a basic example script
|
||||
cat > "$SKILL_DIR/scripts/example.sh" <<EOL
|
||||
#!/bin/bash
|
||||
|
||||
# Example script for ${SKILL_NAME_HYPHENATED} skill
|
||||
|
||||
set -e
|
||||
|
||||
echo "This is an example script for the ${SKILL_NAME_HYPHENATED} skill"
|
||||
echo "Replace this with your actual script logic"
|
||||
|
||||
# Your script implementation goes here
|
||||
# Example:
|
||||
# echo "Processing..."
|
||||
# [command] [arguments]
|
||||
EOL
|
||||
|
||||
chmod +x "$SKILL_DIR/scripts/example.sh"
|
||||
|
||||
# Create a basic reference file
|
||||
cat > "$SKILL_DIR/references/REFERENCE.md" <<EOL
|
||||
# ${SKILL_NAME_HYPHENATED} Reference
|
||||
|
||||
## Overview
|
||||
|
||||
Detailed technical reference for the ${SKILL_NAME_HYPHENATED} skill.
|
||||
|
||||
## Key Concepts
|
||||
|
||||
### [Concept 1]
|
||||
|
||||
[Detailed explanation]
|
||||
|
||||
### [Concept 2]
|
||||
|
||||
[Detailed explanation]
|
||||
|
||||
## API Reference
|
||||
|
||||
### [Function/Method Name]
|
||||
|
||||
**Description**: [What it does]
|
||||
|
||||
**Parameters**:
|
||||
- `param1` - [Type]: [Description]
|
||||
- `param2` - [Type]: [Description]
|
||||
|
||||
**Returns**: [Return type and description]
|
||||
|
||||
**Example**:
|
||||
\`\`\`bash
|
||||
[example usage]
|
||||
\`\`\`
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### [Issue 1]
|
||||
|
||||
**Symptoms**: [What the user sees]
|
||||
|
||||
**Cause**: [Root cause]
|
||||
|
||||
**Solution**: [How to fix it]
|
||||
|
||||
### [Issue 2]
|
||||
|
||||
**Symptoms**: [What the user sees]
|
||||
|
||||
**Cause**: [Root cause]
|
||||
|
||||
**Solution**: [How to fix it]
|
||||
EOL
|
||||
|
||||
echo "✓ Created new skill: ${SKILL_NAME_HYPHENATED}"
|
||||
echo "✓ Skill directory: ${SKILL_DIR}"
|
||||
echo "✓ Created SKILL.md with template"
|
||||
echo "✓ Created optional directories: scripts/, references/, assets/"
|
||||
echo "✓ Created example script: ${SKILL_DIR}/scripts/example.sh"
|
||||
echo "✓ Created reference file: ${SKILL_DIR}/references/REFERENCE.md"
|
||||
echo ""
|
||||
echo "Next steps:"
|
||||
echo "1. Edit ${SKILL_DIR}/SKILL.md to add your skill details"
|
||||
echo "2. Add your scripts to the scripts/ directory"
|
||||
echo "3. Add documentation to the references/ directory"
|
||||
echo "4. Add any assets to the assets/ directory"
|
||||
echo "5. Validate your skill: .vibe/skills/skill_creator/scripts/validate_skill.sh ${SKILL_DIR}"
|
||||
Reference in New Issue
Block a user