refactor(kyberforge): make skill-write and skill-audit self-contained with shared resources

- Move validate.sh ownership to skill-audit/scripts/ — it is the canonical
  structural validator; skill-write now delegates Step 5 to /skill-audit
- Add skill-write/references/scripts.md and deployment-modes.md for progressive
  disclosure of package runner patterns and plugin cache isolation rules
- Fix skill-audit Step 1 cross-skill path reference (was repo-absolute, now
  skill-relative); add manual fallback for sandboxed/Bash-denied contexts
- Scope Step 2 "read every file" to exclude binaries and unreferenced files
- Fix new-skill.sh next-steps output to reference /skill-audit instead of
  the removed validate.sh
- Remove stale Dependencies section from skill-audit README; flip dependency
  arrow — skill-write depends on skill-audit, not vice versa

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-22 19:35:10 +00:00
parent 6317b5c844
commit 3a85632df0
8 changed files with 123 additions and 32 deletions

View File

@@ -26,6 +26,8 @@ Share those outputs in this conversation: grill context, research docs, examples
If any are missing, stop and ask the user before proceeding.
**Requires `/skill-audit`** — used in Step 5 for final validation. Both skills ship in the kyberforge plugin and are co-installed. If `/skill-audit` is unavailable, stop and ask the user to install the kyberforge plugin before continuing.
## Step 1 — Scaffold
Run the copy script with the skill name and destination directory:
@@ -42,6 +44,8 @@ bash scripts/new-skill.sh data-analyzer plugins/myplugin/skills/
This creates `<destination-dir>/<skill-name>/` with annotated templates ready to fill in.
If the destination is inside a plugin directory (path contains a `plugin.json`), read `references/deployment-modes.md` before adding any file references to SKILL.md.
## Step 2 — Fill in SKILL.md
Open `<destination-dir>/<skill-name>/SKILL.md`. Replace every `FILL IN:` placeholder.
@@ -130,6 +134,8 @@ Place executable scripts in `scripts/`. Rules for agentic scripts:
- **Meaningful exit codes** — `0` success, non-zero failure; document in `--help`
- **Dry-run support** — add `--dry-run` for destructive operations
If the skill needs scripts with external package dependencies or language-specific tooling (Python, TypeScript, Ruby, Go), read `references/scripts.md` for package runner patterns and inline dependency formats.
If no scripts are needed, delete `scripts/README.md` and the `scripts/` directory.
## Step 4 — Add references and assets (if needed)
@@ -144,8 +150,6 @@ If not needed, delete the placeholder READMEs and their directories.
## Step 5 — Validate
```bash
bash scripts/validate.sh <destination-dir>/<skill-name>
```
Run `/skill-audit` on `<destination-dir>/<skill-name>`.
All checks must pass before the skill is considered done.
All FAIL findings must be resolved before the skill is considered done.