🔧 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:
@@ -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
|
||||
```
|
||||
Reference in New Issue
Block a user