fix(kyberforge): resolve plugin-create path bug, validate.sh false positives, and write-skill YAML error
- plugin-create/SKILL.md: fix ${CLAUDE_PLUGIN_ROOT} path (create-plugin → plugin-create, 4 occurrences)
- plugin-create/SKILL.md: delegate reserved name validation to new references/reserved-names.md (complete list)
- plugin-create/SKILL.md: add displayName reminder in step 4, full-validation pointer in step 7
- plugin-create/references/reserved-names.md: complete reserved name list extracted from claude-code.md
- plugin-create/references/manifest-fields.md: quick-ref for both plugin.json manifests and marketplace entry
- plugin-create/META.md: update stale when: and references: fields to reflect post-migration paths
- plugin-create/assets/plugin-template/hooks.json: unify empty hooks schema to {} (was [])
- write-skill/SKILL.md: fix YAML frontmatter parse error — wrap description in >- block scalar
- validate.sh: strip backtick spans before ../ check to eliminate documentation false positives
- inventory.sh: same backtick-span fix, applied to both outer check and per-line reporting
- tests/test_scripts.sh: fix SCRIPTS_DIR path to skills/marketplace-architect/scripts/
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -62,13 +62,16 @@ while IFS= read -r -d '' path; do
|
||||
|
||||
[[ -n "$asset_type" ]] && ROWS+=("$asset_type|$rel")
|
||||
|
||||
# Check for cross-references in text files
|
||||
# Check for cross-references in text files — skip occurrences inside backtick spans
|
||||
case "$name" in *.md|*.json|*.sh)
|
||||
if grep -q '\.\.\/' "$path" 2>/dev/null; then
|
||||
if grep '\.\.\/' "$path" 2>/dev/null | sed 's/`[^`]*`//g' | grep -q '\.\.\/'; then
|
||||
while IFS= read -r line; do
|
||||
lineno="${line%%:*}"
|
||||
content="${line#*:}"
|
||||
CROSS_REFS+=("$rel:$lineno: $content")
|
||||
stripped=$(echo "$content" | sed 's/`[^`]*`//g')
|
||||
if echo "$stripped" | grep -q '\.\.\/'; then
|
||||
CROSS_REFS+=("$rel:$lineno: $content")
|
||||
fi
|
||||
done < <(grep -n '\.\.\/' "$path" 2>/dev/null | head -20)
|
||||
fi
|
||||
;;
|
||||
|
||||
@@ -182,9 +182,9 @@ validate_plugin_dir() {
|
||||
validate_skill_md "$skill_md"
|
||||
done < <(find "$pd" -name "SKILL.md" -print0 2>/dev/null)
|
||||
|
||||
# Cross-reference check
|
||||
# Cross-reference check — skip occurrences inside backtick spans (documentation text)
|
||||
while IFS= read -r -d '' f; do
|
||||
if grep -q '\.\.\/' "$f" 2>/dev/null; then
|
||||
if grep '\.\.\/' "$f" 2>/dev/null | sed 's/`[^`]*`//g' | grep -q '\.\.\/'; then
|
||||
local rel="${f#"$pd/"}"
|
||||
error "$rel: contains '../' reference — plugins cannot access files outside their directory after caching"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user