🔧 chore: add nested path validation to skill-creator
- Added path validation to prevent .vibe/.vibe nested directory creation - Enhanced BEST_PRACTICES.md with path handling patterns - Added troubleshooting section to ADVANCED_FEATURES.md - Shows actual creation path for transparency Fixes: Issue with skills being created in incorrect nested paths Refs: #skill-creation, #path-validation
This commit is contained in:
@@ -19,6 +19,17 @@ SKILL_NAME_HYPHENATED=$(echo "$SKILL_NAME" | tr '_' '-')
|
||||
# Create skill directory
|
||||
mkdir -p "$SKILL_DIR"
|
||||
|
||||
# Validate path - ensure we're not creating nested .vibe directories
|
||||
if [[ "$SKILL_DIR" == *".vibe/.vibe"* ]]; then
|
||||
echo "❌ Error: Detected nested .vibe path: $SKILL_DIR"
|
||||
echo "This usually happens when running the script from within .vibe/skills/"
|
||||
echo "Please run from project root or use absolute paths"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Show the actual path being created
|
||||
echo "✓ Creating skill in: $(pwd)/$SKILL_DIR"
|
||||
|
||||
# Create SKILL.md with basic template
|
||||
cat > "$SKILL_DIR/SKILL.md" <<EOL
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user