4 Commits

Author SHA1 Message Date
c048d2320e chore(skill-audit): backfill sources provenance from agentskillsio research
Records the upstream agentskills.io sources that informed skill-audit,
continuing the research → docs → skill provenance chain.

- New references/sources.md with 7 extracted sources attributed to skill files;
  agentskills-llms-txt demoted to discovery-only comment per skill-author precedent
- source_keys frontmatter added to SKILL.md (5 slugs), references/body-discipline.md
  (agentskills-spec, agentskills-best-practices), and references/description-quality.md
  (agentskills-spec, agentskills-optimizing-descriptions)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-26 21:24:11 +00:00
08abe9920a 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>
2026-06-26 21:24:11 +00:00
99e64d67fc chore(skill-author): backfill sources provenance from agentskillsio research
Records the upstream agentskills.io sources that informed skill-author,
completing the research → docs → skill provenance chain introduced in
the previous commit.

- New references/sources.md with all 7 extracted agentskillsio sources,
  Contributing files attributed per-source to SKILL.md, references/deployment-modes.md,
  and references/scripts.md
- source_keys frontmatter added to SKILL.md (all 7 slugs), references/deployment-modes.md
  (agentskills-spec), and references/scripts.md (agentskills-using-scripts)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-26 20:52:33 +00:00
ca73a63c72 feat(skill-author): record research sources as skill provenance
Adds a sources provenance step to the skill creation workflow so the
chain from research output to skill content is traceable. Closes #4.

- New scaffold template `assets/templates/references/sources.md` mirroring
  the research skill's sources.md format (slug → URL, description,
  contributing files, status)
- `source_keys` commented-out optional field added to the SKILL.md
  template, mirroring how research topic files link back to sources
- New Step 5 in the creation workflow: populate references/sources.md
  from research input (attributing contributing skill files) or delete it
  if no research was provided; add source_keys to SKILL.md and any
  references/*.md files

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-26 20:42:46 +00:00
14 changed files with 190 additions and 15 deletions

View File

@@ -25,5 +25,6 @@ Provide the path to the skill directory to audit when invoking.
| `scripts/validate.sh` | Structural validator — checks name format, name matches directory, description length, line count, placeholder detection, script executable bit, and interactive-prompt detection | | `scripts/validate.sh` | Structural validator — checks name format, name matches directory, description length, line count, placeholder detection, script executable bit, and interactive-prompt detection |
| `references/description-quality.md` | Spec-grounded rubric for description auditing — loaded when a finding is borderline | | `references/description-quality.md` | Spec-grounded rubric for description auditing — loaded when a finding is borderline |
| `references/body-discipline.md` | Spec-grounded rubric for body discipline auditing — loaded when padding vs necessity is unclear | | `references/body-discipline.md` | Spec-grounded rubric for body discipline auditing — loaded when padding vs necessity is unclear |
| `references/sources.md` | Provenance record — agentskills.io sources that informed this skill and which files each contributed to |
| `tests/validate.bats` | Bats test suite for validate.sh | | `tests/validate.bats` | Bats test suite for validate.sh |
| `tests/README.md` | Setup instructions for bats-support and bats-assert test dependencies | | `tests/README.md` | Setup instructions for bats-support and bats-assert test dependencies |

View File

@@ -14,6 +14,12 @@ description: >
allowed-tools: Bash Read allowed-tools: Bash Read
metadata: metadata:
category: factory category: factory
source_keys:
- agentskills-home
- agentskills-spec
- agentskills-best-practices
- agentskills-optimizing-descriptions
- agentskills-using-scripts
--- ---
## Gotchas ## Gotchas

View File

@@ -1,3 +1,9 @@
---
source_keys:
- agentskills-spec
- agentskills-best-practices
---
# Body Discipline Reference # Body Discipline Reference
Source: agentskills.io — skill-authoring Source: agentskills.io — skill-authoring

View File

@@ -1,3 +1,9 @@
---
source_keys:
- agentskills-spec
- agentskills-optimizing-descriptions
---
# Description Quality Reference # Description Quality Reference
Source: agentskills.io — optimizing-descriptions Source: agentskills.io — optimizing-descriptions

View File

@@ -0,0 +1,52 @@
# Sources
<!-- agentskills.io/llms.txt was used for initial source discovery and is not listed below; it contributed no skill file content directly. -->
## agentskills-home
- **URL:** https://agentskills.io/home.md
- **Description:** Agent Skills overview — what it is, why it exists, progressive disclosure model, ecosystem of 35+ implementing tools
- **Contributing files:** SKILL.md
- **Status:** `extracted`
## agentskills-spec
- **URL:** https://agentskills.io/specification.md
- **Description:** Complete SKILL.md format specification — frontmatter fields, constraints, body content, optional directories, progressive disclosure levels, file references, validation
- **Contributing files:** SKILL.md, references/body-discipline.md, references/description-quality.md
- **Status:** `extracted`
## agentskills-best-practices
- **URL:** https://agentskills.io/skill-creation/best-practices.md
- **Description:** Best practices for skill creators — starting from real expertise, spending context wisely, calibrating control, instruction patterns (gotchas, templates, checklists, validation loops)
- **Contributing files:** SKILL.md, references/body-discipline.md
- **Status:** `extracted`
## agentskills-optimizing-descriptions
- **URL:** https://agentskills.io/skill-creation/optimizing-descriptions.md
- **Description:** How to systematically test and improve skill descriptions for triggering accuracy — eval queries, trigger rate testing, train/validation splits, optimization loop
- **Contributing files:** SKILL.md, references/description-quality.md
- **Status:** `extracted`
## agentskills-evaluating-skills
- **URL:** https://agentskills.io/skill-creation/evaluating-skills.md
- **Description:** Eval-driven skill quality improvement — test case design, workspace structure, assertion writing, grading, benchmarking, human review, iteration loop
- **Contributing files:** (none — eval workflow not directly informing audit dimensions)
- **Status:** `extracted`
## agentskills-using-scripts
- **URL:** https://agentskills.io/skill-creation/using-scripts.md
- **Description:** Using scripts in skills — one-off commands, self-contained scripts with inline dependencies, designing scripts for agentic use (no interactive prompts, --help, structured output, idempotency)
- **Contributing files:** SKILL.md
- **Status:** `extracted`
## agentskills-quickstart
- **URL:** https://agentskills.io/skill-creation/quickstart.md
- **Description:** Step-by-step guide to creating a first skill (roll-dice example), how discovery/activation/execution work in practice
- **Contributing files:** (none — creation guide not directly informing audit criteria)
- **Status:** `extracted`

View File

@@ -36,10 +36,12 @@ If the destination is inside a plugin directory, read `references/deployment-mod
| `scripts/new-skill.sh` | Copies annotated templates to the destination to scaffold a new skill | | `scripts/new-skill.sh` | Copies annotated templates to the destination to scaffold a new skill |
| `references/deployment-modes.md` | Plugin vs standalone differences and cache isolation rules (loaded on demand) | | `references/deployment-modes.md` | Plugin vs standalone differences and cache isolation rules (loaded on demand) |
| `references/scripts.md` | Package runners, inline dependency patterns, and full script contract (loaded on demand) | | `references/scripts.md` | Package runners, inline dependency patterns, and full script contract (loaded on demand) |
| `references/sources.md` | Upstream research sources and which skill files each contributed to |
| `assets/templates/SKILL.md` | Annotated SKILL.md template | | `assets/templates/SKILL.md` | Annotated SKILL.md template |
| `assets/templates/README.md` | Annotated README template for the new skill | | `assets/templates/README.md` | Annotated README template for the new skill |
| `assets/templates/scripts/README.md` | Placeholder for bundled scripts | | `assets/templates/scripts/README.md` | Placeholder for bundled scripts |
| `assets/templates/references/README.md` | Placeholder for reference docs | | `assets/templates/references/README.md` | Placeholder for reference docs |
| `assets/templates/references/sources.md` | Sources provenance template for new skills |
| `assets/templates/assets/README.md` | Placeholder for static assets | | `assets/templates/assets/README.md` | Placeholder for static assets |
| `assets/templates/tests/README.md` | Placeholder for test files | | `assets/templates/tests/README.md` | Placeholder for test files |
| `tests/new-skill.bats` | Bats test suite for `scripts/new-skill.sh` | | `tests/new-skill.bats` | Bats test suite for `scripts/new-skill.sh` |

View File

@@ -13,6 +13,14 @@ description: >
allowed-tools: Bash Read Write Edit allowed-tools: Bash Read Write Edit
metadata: metadata:
category: factory category: factory
source_keys:
- agentskills-home
- agentskills-spec
- agentskills-best-practices
- agentskills-optimizing-descriptions
- agentskills-evaluating-skills
- agentskills-using-scripts
- agentskills-quickstart
--- ---
## Gotchas ## Gotchas
@@ -38,7 +46,6 @@ Run `/grill-me` on the skill's design and research the target domain first.
Share those outputs in this conversation: grill context, research docs, examples, constraints. Share those outputs in this conversation: grill context, research docs, examples, constraints.
Design for one coherent user intent — skills too narrow force multiple loads per task; too broad are hard to activate precisely. Design for one coherent user intent — skills too narrow force multiple loads per task; too broad are hard to activate precisely.
Extract the skill from a real task you've done — a skill refined from real execution outperforms one written speculatively.
**Before touching the filesystem, verify you have:** **Before touching the filesystem, verify you have:**
- [ ] A clear purpose — what specific task will this skill handle? - [ ] A clear purpose — what specific task will this skill handle?
@@ -47,7 +54,7 @@ Extract the skill from a real task you've done — a skill refined from real exe
If any are missing, stop and ask the user before proceeding. 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. **Requires `/skill-audit`** — used in Step 6 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 ### Step 1 — Scaffold
@@ -71,7 +78,7 @@ If the destination is inside a plugin directory (path contains a `plugin.json`),
Open `<destination-dir>/<skill-name>/SKILL.md`. Replace every `FILL IN:` placeholder. Open `<destination-dir>/<skill-name>/SKILL.md`. Replace every `FILL IN:` placeholder.
#### Frontmatter **Frontmatter**
**`name`** — already set by the scaffold script. Must exactly match the directory name. Format: 1–64 characters, lowercase letters/numbers/hyphens only, no leading, trailing, or consecutive hyphens (`--`). **`name`** — already set by the scaffold script. Must exactly match the directory name. Format: 1–64 characters, lowercase letters/numbers/hyphens only, no leading, trailing, or consecutive hyphens (`--`).
@@ -89,7 +96,7 @@ Open `<destination-dir>/<skill-name>/SKILL.md`. Replace every `FILL IN:` placeho
- `metadata` — key-value map; use `author`, `version`, `category` - `metadata` — key-value map; use `author`, `version`, `category`
- `allowed-tools` — space-separated pre-approved tools; reduces permission prompts (experimental — support varies by client) - `allowed-tools` — space-separated pre-approved tools; reduces permission prompts (experimental — support varies by client)
#### Body — include only what the agent lacks **Body — include only what the agent lacks**
Rename the placeholder section heading to one that fits the skill's structure — `## Step 1`, `## Workflow`, `## Instructions`, etc. Rename the placeholder section heading to one that fits the skill's structure — `## Step 1`, `## Workflow`, `## Instructions`, etc.
@@ -107,7 +114,7 @@ Ask of every sentence: "Would the agent get this wrong without it?" Cut anything
- Steps the agent handles independently — over-specifying leads agents to follow unproductive paths - Steps the agent handles independently — over-specifying leads agents to follow unproductive paths
- Restatements of the description — it's already in context; repeating it wastes the token budget - Restatements of the description — it's already in context; repeating it wastes the token budget
#### Patterns **Patterns**
**Gotchas** — highest value; place near the top: **Gotchas** — highest value; place near the top:
````markdown ````markdown
@@ -151,7 +158,7 @@ Output format:
```` ````
For longer templates, place in `assets/<name>.md` and reference conditionally. For longer templates, place in `assets/<name>.md` and reference conditionally.
#### Size budget **Size budget**
Keep `SKILL.md` under 500 lines; 5,000 tokens is the recommended body budget. When approaching the limit: Keep `SKILL.md` under 500 lines; 5,000 tokens is the recommended body budget. When approaching the limit:
- Move reference material to `references/<topic>.md` and load it conditionally - Move reference material to `references/<topic>.md` and load it conditionally
@@ -180,7 +187,19 @@ not in `scripts/`. See `tests/README.md` for setup instructions.
If not needed, delete the placeholder READMEs and their directories. If not needed, delete the placeholder READMEs and their directories.
### Step 5 — Validate and close ### Step 5 — Populate or delete `references/sources.md`
If a research `sources.md` is present in the conversation context:
1. Read it and filter to entries with `` `extracted` `` status only.
2. For each entry, determine which skill files it contributed to (SKILL.md and any files in references/ that drew from it). Update `Contributing files` accordingly — list skill files, not research topic files.
3. Write the updated content to `references/sources.md`.
4. Add `source_keys` to the frontmatter of `SKILL.md` (under `metadata`) listing the slugs of sources that informed it.
5. For each file in `references/` that was informed by research sources, add `source_keys` frontmatter (same format as research topic files) listing the relevant slugs.
If no research `sources.md` is in context, delete `references/sources.md`.
### Step 6 — Validate and close
Run `/skill-audit` on `<destination-dir>/<skill-name>`. Run `/skill-audit` on `<destination-dir>/<skill-name>`.

View File

@@ -31,6 +31,13 @@ description: >
# Optional. Arbitrary key-value map. Common keys: author, version, category. # Optional. Arbitrary key-value map. Common keys: author, version, category.
# No restrictions on keys or values. # No restrictions on keys or values.
# source_keys:
# - source-slug-one
# - source-slug-two
# Optional. Populated when this skill was built from /research output.
# Lists slugs from references/sources.md that informed this file.
# Also add source_keys to each references/*.md file that was informed by research.
# allowed-tools: Bash Read Write # allowed-tools: Bash Read Write
# Optional (experimental — support varies by client). # Optional (experimental — support varies by client).
# Space-separated list of pre-approved tools. # Space-separated list of pre-approved tools.

View File

@@ -0,0 +1,13 @@
# Sources
<!-- Populated at Step 5 of skill authoring, after all skill files are written.
For each research source with status `extracted`, record which skill files
it contributed to under Contributing files.
Delete this file if no research sources were provided as input. -->
## FILL IN: source-slug
- **URL:** FILL IN
- **Description:** FILL IN
- **Contributing files:** FILL IN: list skill files this source informed (e.g. SKILL.md, references/foo.md)
- **Status:** `extracted`

View File

@@ -1,3 +1,8 @@
---
source_keys:
- agentskills-spec
---
# Deployment Modes # Deployment Modes
Skills deploy in two modes. Both resolve relative paths from the skill root — the SKILL.md body works the same in either. Differences only arise when referencing files *outside* the skill directory. Skills deploy in two modes. Both resolve relative paths from the skill root — the SKILL.md body works the same in either. Differences only arise when referencing files *outside* the skill directory.

View File

@@ -1,3 +1,8 @@
---
source_keys:
- agentskills-using-scripts
---
# Scripts Reference # Scripts Reference
## Package runners (no install required) ## Package runners (no install required)

View File

@@ -0,0 +1,53 @@
# Sources
<!-- agentskills.io/llms.txt was used for initial source discovery and is not listed below; it contributed no skill file content directly. -->
## agentskills-home
- **URL:** https://agentskills.io/home.md
- **Description:** Agent Skills overview — what it is, why it exists, progressive disclosure model, ecosystem of 35+ implementing tools
- **Contributing files:** SKILL.md
- **Status:** `extracted`
## agentskills-spec
- **URL:** https://agentskills.io/specification.md
- **Description:** Complete SKILL.md format specification — frontmatter fields, constraints, body content, optional directories, progressive disclosure levels, file references, validation
- **Contributing files:** SKILL.md, references/deployment-modes.md
- **Status:** `extracted`
## agentskills-best-practices
- **URL:** https://agentskills.io/skill-creation/best-practices.md
- **Description:** Best practices for skill creators — starting from real expertise, spending context wisely, calibrating control, instruction patterns (gotchas, templates, checklists, validation loops)
- **Contributing files:** SKILL.md
- **Status:** `extracted`
## agentskills-optimizing-descriptions
- **URL:** https://agentskills.io/skill-creation/optimizing-descriptions.md
- **Description:** How to systematically test and improve skill descriptions for triggering accuracy — eval queries, trigger rate testing, train/validation splits, optimization loop
- **Contributing files:** SKILL.md
- **Status:** `extracted`
## agentskills-evaluating-skills
- **URL:** https://agentskills.io/skill-creation/evaluating-skills.md
- **Description:** Eval-driven skill quality improvement — test case design, workspace structure, assertion writing, grading, benchmarking, human review, iteration loop
- **Contributing files:** SKILL.md
- **Status:** `extracted`
## agentskills-using-scripts
- **URL:** https://agentskills.io/skill-creation/using-scripts.md
- **Description:** Using scripts in skills — one-off commands, self-contained scripts with inline dependencies, designing scripts for agentic use (no interactive prompts, --help, structured output, idempotency)
- **Contributing files:** SKILL.md, references/scripts.md
- **Status:** `extracted`
## agentskills-quickstart
- **URL:** https://agentskills.io/skill-creation/quickstart.md
- **Description:** Step-by-step guide to creating a first skill (roll-dice example), how discovery/activation/execution work in practice
- **Contributing files:** SKILL.md
- **Status:** `extracted`

View File

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

View File

@@ -111,8 +111,9 @@ teardown() {
assert_failure assert_failure
} }
@test "fails when target already exists" { @test "exits 0 when target already exists (no-op)" {
mkdir -p "$DEST/my-tool" mkdir -p "$DEST/my-tool"
run bash "$SCRIPT" my-tool "$DEST" run bash "$SCRIPT" my-tool "$DEST"
assert_failure assert_success
assert_output --partial "nothing to do"
} }