fix(skill-author): resolve skill-audit findings

- script: new-skill.sh now exits 0 when target already exists (idempotent
  retry-safe) instead of exit 1; --help updated to reflect narrowed error cases
- test: updated bats test to assert success and "nothing to do" output
- body: removed speculative "Extract the skill from a real task" advice
  (human-targeted, not agent-actionable)
- formatting: converted H4 headings in Step 2 to bold text (H2/H3 two-tier model)
- provenance: removed orphan agentskills-llms-txt entry from references/sources.md;
  added discovery-only comment

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-26 21:24:11 +00:00
parent 99e64d67fc
commit 08abe9920a
4 changed files with 14 additions and 19 deletions

View File

@@ -20,8 +20,8 @@ Output:
Creates <destination-dir>/<skill-name>/ with annotated templates ready to fill in.
Exit codes:
0 Scaffold created successfully
1 Invalid arguments or destination already exists
0 Scaffold created successfully, or destination already exists (no-op)
1 Invalid arguments, missing destination parent, or templates not found
EOF
}
@@ -63,11 +63,10 @@ fi
TARGET="$DEST_DIR/$SKILL_NAME"
# Refuse to overwrite existing directory
# Destination already exists — treat as a no-op so retries are safe
if [[ -d "$TARGET" ]]; then
echo "Error: '$TARGET' already exists." >&2
echo " Remove it first or choose a different name." >&2
exit 1
echo "Scaffold already exists at '$TARGET' — nothing to do." >&2
exit 0
fi
# Copy templates to destination