🔧 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:
2026-04-06 18:17:39 +02:00
parent 6f4c23f603
commit 63a7387517
3 changed files with 70 additions and 0 deletions

View File

@@ -295,4 +295,31 @@ df = pl.read_csv("data.csv")
```
For pandas compatibility, use the .to_pandas() method.
```
### ❌ Nested Path Creation
**Issue**: Creating skills in incorrect nested paths like `.vibe/skills/.vibe/skills/skill-name`
**Cause**: Script incorrectly appending base directory to target path
**Solution**: Always use absolute paths and validate the final location
```bash
# Correct approach
TARGET_DIR=".vibe/skills/$SKILL_NAME"
mkdir -p "$TARGET_DIR"
# Verify location
ls -la ".vibe/skills/" | grep "$SKILL_NAME"
```
### ✅ Proper Path Handling
```bash
# Use absolute paths from project root
SKILL_DIR="$PROJECT_ROOT/.vibe/skills/$SKILL_NAME"
mkdir -p "$SKILL_DIR"
# Validate no nested .vibe directories
if [[ "$SKILL_DIR" == *".vibe/.vibe"* ]]; then
echo "Error: Nested .vibe path detected"
exit 1
fi
```