Files
holocron/plugins/kyberforge/skills/skill-author
Defame1297 6f6b70781d fix(kyberforge): fix scope walk-up and manifest-parsing bugs from PR #93 review
A fresh /code-review of the APM-native authoring retarget (PR #93) found
several correctness bugs beyond the ones already fixed on this branch:

- new-agent.sh silently walked a marker-less subdirectory under $HOME up
  to user scope, contradicting its own usage text ("user scope is checked
  directly, no walk-up") and risking scaffolding into shared global
  ~/.claude or ~/.copilot directories instead of the intended local path.
- The hand-copied apm.yml type: manifest detector in new-agent.sh and
  new-skill.sh accepted mismatched quotes (e.g. `type: "skill'`) that
  validate.sh's regex correctly rejects, and silently dropped a final
  apm.yml line lacking a trailing newline — causing the scaffolder and
  validator to disagree on scope for identical input.
- Plugin-scope agent frontmatter could still contain the apm-agent.md
  template's HTML comments at ship time with no audit signal, yet
  apm compile copies frontmatter verbatim and <!-- --> breaks YAML
  parsing on both downstream harnesses.
- ADR-0016 asserted agent-audit already implements a SUGGESTION heuristic
  for tool-restriction-needing plugin-scope agents; it doesn't.
- agent-audit/README.md still described the old plugin-pair model this
  PR replaced with a single-file allowlist model.
- validate.sh's project/user-scope CC-only/Copilot-only field checks and
  counterpart-missing check lost their only test coverage when the old
  plugin-pair fixture was deleted.

Also replaces an echo-into-sed two-value parse (4 forks per call) with a
single space-separated echo + read in both scaffolders.

Regression tests added for every fix above, including one for a bug this
pass introduced and the test suite caught: an initial two-line
echo + `read` attempt silently dropped the second value, since `read`
consumes only one line regardless of embedded newlines.

Full suite: 158 bats tests, 39 shell-script tests, 12/12 summary
categories, 0 failures.

Refs: #89, #93
2026-08-11 21:49:38 +00:00
..

skill-author

Author and refine skills conforming to the agentskills.io specification — create new skills from scratch or apply improvement signals to existing ones.

What it does

Routes to one of two flows based on context: if no skill directory exists at the target path, it scaffolds the directory from annotated templates, fills in SKILL.md and supporting files, and validates the result. If an existing skill directory and improvement signals are both present, it groups those signals by root cause and applies targeted edits, then re-validates. In both flows, bumps the skill's metadata.version when present (minor for create, patch for improve).

Before you start

  • Run /grill-me to resolve design decisions before creating a new skill
  • Collect domain research, examples, and constraints
  • Know the skill name (kebab-case) and destination path

Placement

scripts/new-skill.sh resolves the mode automatically by walking up from the given path — see SKILL.md Step 1 for the full algorithm.

Mode Path Chosen when
Standalone <path>/<name>/ No apm.yml with a top-level type: field is found walking up from <path>, before hitting .git or the filesystem root
Package (APM) <package-root>/.apm/skills/<name>/ A type-bearing apm.yml is found at or above <path> — <path> just needs to be somewhere inside the package

If the destination resolves inside an APM package, read references/deployment-modes.md — self-containment rules apply to apm compile output the same way they applied to plugin cache isolation.

Usage

/skill-author

Files

File Purpose
README.md Human-readable overview of the skill and its files
SKILL.md Skill instructions for agents
scripts/new-skill.sh Walks up from the given path to resolve package vs standalone mode, then copies annotated templates to the resolved destination
references/deployment-modes.md APM package vs standalone differences and self-containment/cache-isolation rules (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/README.md Annotated README template for the new skill
assets/templates/scripts/README.md Placeholder for bundled scripts
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/tests/README.md Placeholder for test files
tests/new-skill.bats Bats test suite for scripts/new-skill.sh
tests/README.md Setup instructions for bats-support and bats-assert test dependencies

Spec reference

agentskills.io specification