Skip to content

feat(skills): migrate to agentskills.io spec compliance#135

Merged
whoabuddy merged 9 commits intomainfrom
feat/agentskills-spec-compliance
Mar 13, 2026
Merged

feat(skills): migrate to agentskills.io spec compliance#135
whoabuddy merged 9 commits intomainfrom
feat/agentskills-spec-compliance

Conversation

@whoabuddy
Copy link
Copy Markdown
Contributor

Summary

  • Migrate all 40 SKILL.md files from flat frontmatter to the agentskills.io metadata: nested structure
  • Introduce two-tier validation: skills-ref (spec schema) + Zod (repo-level rules)
  • Update README.md frontmatter examples to reflect the new format
  • Remove one-time migration script after successful migration

What Changed

SKILL.md Format (all 40 files)

Before (flat format):

---
name: btc
description: Bitcoin L1 operations — ...
user-invocable: false
arguments: balance | fees | ...
entry: btc/btc.ts
requires: [wallet]
tags: [l1, write, requires-funds]
---

After (agentskills.io spec):

---
name: btc
description: Bitcoin L1 operations — ...
metadata:
  user-invocable: "false"
  arguments: "balance | fees | ..."
  entry: "btc/btc.ts"
  requires: "wallet"
  tags: "l1, write, requires-funds"
  author: "whoabuddy"
  author-agent: "Trustless Indra"
---

Two-Tier Validation

bun run validate now runs two layers:

  1. skills-ref (tier 1) — validates against the official agentskills.io JSON Schema. Catches spec-level violations: missing required fields, wrong nesting, wrong types.
  2. Zod (tier 2) — validates repo-level rules: allowed tag values, entry file existence, requires cross-references. These are constraints specific to this repo beyond the base spec.

generate-manifest.ts

Updated to read from the metadata: nested object when building skills.json. The manifest output format is unchanged — consumers see the same flat structure they always did.

Checklist

  • All 40 SKILL.md files validated by bun run validate (79 passed, 0 failed)
  • bun run typecheck passes with 0 errors
  • bun run manifest produces valid skills.json
  • README.md frontmatter examples updated
  • Migration script removed (one-time tool, no longer needed)

Closes #110

Co-Authored-By: Claude noreply@anthropic.com

whoabuddy and others added 8 commits March 13, 2026 14:28
Add yaml (v2.8.2) as a dependency to replace the hand-rolled YAML parser
in validate-frontmatter.ts. Required for agentskills.io spec compliance
work — proper YAML parsing handles the nested metadata: mapping correctly.

Co-Authored-By: Claude <noreply@anthropic.com>
The skills-ref Python venv is installed locally for agentskills.io spec
validation. It should not be committed to the repo.

Co-Authored-By: Claude <noreply@anthropic.com>
Move all custom fields under metadata: in every SKILL.md file (40 skills).
Name and description remain at the top level; all other fields (user-invocable,
arguments, entry, requires, tags, mcp-tools, author, author-agent) are now
nested under metadata: as quoted strings. This satisfies the strictyaml
requirement used by the skills-ref validator.

Migration rules applied:
- Arrays (requires, tags, mcp-tools, entry) converted to comma-separated strings
- Empty arrays become empty string ""
- Boolean user-invocable: false becomes string "false"
- author_agent renamed to author-agent (consistent hyphen convention)
- Missing fields added: aibtc-news-classifieds (author, author-agent, user-invocable)
  and onboarding (author-agent)

Also updates scripts/validate-frontmatter.ts and scripts/generate-manifest.ts
to read the new metadata: block format, and regenerates skills.json.
All 79 files (40 SKILL.md + 39 AGENT.md) pass validation.

Co-Authored-By: Claude <noreply@anthropic.com>
Wire skills-ref as tier-1 (spec compliance) before Zod tier-2
(project business rules) in scripts/validate-frontmatter.ts.

- Runs `skills-ref validate <dir>/` for each SKILL.md before Zod
- Reports tier-1 failures with [spec] prefix for clear attribution
- Always runs tier-2 even when tier-1 fails for complete error picture
- Adds --skip-spec flag to bypass tier-1 (useful without venv installed)
- Auto-discovers skills-ref: checks .venv-skills-ref/bin/ then PATH
- Warns to stderr if skills-ref is not found, continues with Zod only
- Prints active tier header at start of each run

Co-Authored-By: Claude <noreply@anthropic.com>
…xample

Regenerate skills.json after phase 3 tooling changes — only timestamp
updated, confirming no structural changes to the 40-skill manifest.

Update CLAUDE.md SKILL.md frontmatter example and field table to reflect
the new metadata: nested format introduced in phase 2 of the
agentskills-spec-compliance migration.

Co-Authored-By: Claude <noreply@anthropic.com>
Replace flat YAML frontmatter example with the new metadata: nested
structure introduced in Phase 2. Update field descriptions to reflect
that operational fields now live under metadata: as quoted strings,
and document the new author and author-agent fields.

Co-Authored-By: Claude <noreply@anthropic.com>
migrate-frontmatter.ts was a single-use tool to convert all SKILL.md
files from flat frontmatter to the agentskills.io metadata: nested
format. The migration is complete and the script is no longer needed.

Co-Authored-By: Claude <noreply@anthropic.com>
Re-run bun run manifest to refresh the generated timestamp after docs
and scripts cleanup. No skill definitions changed.

Co-Authored-By: Claude <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings March 13, 2026 21:45
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Migrates the repository’s SKILL.md frontmatter to the agentskills.io metadata: nesting and updates repo tooling/docs to validate and generate skills.json from the new format.

Changes:

  • Migrate skill frontmatter from flat keys/bracket-lists to metadata: with quoted, comma-separated strings.
  • Add tiered validation (skills-ref + Zod) and switch validation/manifest scripts to real YAML parsing.
  • Update documentation examples and add yaml dependency; ignore local .venv-skills-ref/.

Reviewed changes

Copilot reviewed 46 out of 48 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
scripts/validate-frontmatter.ts Adds skills-ref tier-1 validation, YAML parsing, and updated Zod validation for new metadata: format
scripts/generate-manifest.ts Switches manifest generation to parse nested metadata: via YAML parser
package.json Adds yaml dependency used by validation/manifest scripts
bun.lock Locks the new yaml dependency and updates lock metadata
skills.json Regenerated manifest (version bump + additional fields emitted)
README.md Updates SKILL frontmatter documentation to new agentskills.io-compliant format
CLAUDE.md Updates SKILL frontmatter guidance/table to the new metadata: structure
.gitignore Ignores local .venv-skills-ref/ used for optional skills-ref installs
agent-lookup/SKILL.md Migrates frontmatter to metadata: format
aibtc-agents/SKILL.md Migrates frontmatter to metadata: format
aibtc-news/SKILL.md Migrates frontmatter to metadata: format
aibtc-news-classifieds/SKILL.md Migrates frontmatter to metadata: format
aibtc-news-deal-flow/SKILL.md Migrates frontmatter to metadata: format
aibtc-news-protocol/SKILL.md Migrates frontmatter to metadata: format
bitflow/SKILL.md Migrates frontmatter to metadata: format
bns/SKILL.md Migrates frontmatter to metadata: format
btc/SKILL.md Migrates frontmatter to metadata: format
business-dev/SKILL.md Migrates frontmatter to metadata: format
ceo/SKILL.md Migrates frontmatter to metadata: format
credentials/SKILL.md Migrates frontmatter to metadata: format
defi/SKILL.md Migrates frontmatter to metadata: format
dual-stacking/SKILL.md Migrates frontmatter to metadata: format
identity/SKILL.md Migrates frontmatter to metadata: format
mempool-watch/SKILL.md Migrates frontmatter to metadata: format
nft/SKILL.md Migrates frontmatter to metadata: format
nostr/SKILL.md Migrates frontmatter to metadata: format
onboarding/SKILL.md Migrates frontmatter to metadata: format
ordinals/SKILL.md Migrates frontmatter to metadata: format
ordinals-p2p/SKILL.md Migrates frontmatter to metadata: format
pillar/SKILL.md Migrates frontmatter to metadata: format
query/SKILL.md Migrates frontmatter to metadata: format
reputation/SKILL.md Migrates frontmatter to metadata: format
sbtc/SKILL.md Migrates frontmatter to metadata: format
settings/SKILL.md Migrates frontmatter to metadata: format
signing/SKILL.md Migrates frontmatter to metadata: format
stacking/SKILL.md Migrates frontmatter to metadata: format
stacks-market/SKILL.md Migrates frontmatter to metadata: format
stackspot/SKILL.md Migrates frontmatter to metadata: format
stx/SKILL.md Migrates frontmatter to metadata: format
styx/SKILL.md Migrates frontmatter to metadata: format
taproot-multisig/SKILL.md Migrates frontmatter to metadata: format
tenero/SKILL.md Migrates frontmatter to metadata: format
tokens/SKILL.md Migrates frontmatter to metadata: format
validation/SKILL.md Migrates frontmatter to metadata: format
wallet/SKILL.md Migrates frontmatter to metadata: format
x402/SKILL.md Migrates frontmatter to metadata: format
yield-dashboard/SKILL.md Migrates frontmatter to metadata: format
yield-hunter/SKILL.md Migrates frontmatter to metadata: format

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread scripts/validate-frontmatter.ts
Comment thread scripts/validate-frontmatter.ts Outdated
Comment thread scripts/validate-frontmatter.ts
Comment thread scripts/generate-manifest.ts Outdated
Comment thread skills.json
Comment thread scripts/validate-frontmatter.ts
Comment thread scripts/validate-frontmatter.ts
- Use Bun.which() instead of spawning `which` for cross-platform PATH lookup
- Update frontmatter regex to accept CRLF line endings in both scripts
- Enforce user-invocable: "false" in Zod schema (repo convention)
- Add entry file existence check during validation

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@arc0btc arc0btc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Migrates all 40 SKILL.md files to the agentskills.io metadata: nested structure, replaces custom YAML parsing with a proper parser, and introduces two-tier validation. This is clean, well-scoped work.

What works well:

  • Switching from manual line-by-line YAML parsing to import * as yaml from "yaml" in both generate-manifest.ts and validate-frontmatter.ts. The old parser was fragile and couldn't handle quoted strings, inline objects, or any YAML value with a colon in it. This is the most important quality fix in the PR.
  • parseCommaList replacing parseBracketList simplifies the format — no more bracket delimiters in a YAML string value.
  • Two-tier validation is a good architecture: spec compliance (external) + repo rules (Zod). Graceful degradation when skills-ref isn't installed is the right call.
  • Manifest output format is unchanged — backward compatible for consumers.
  • The userInvocable logic fix in generate-manifest.ts: old code used !== "false" (any truthy string counted as true); new code uses === "true" (explicit). More correct.

[question] onboarding/SKILL.mdauthor-agent: "k9dreamermacmini-coder" (onboarding/SKILL.md)
The original had no author-agent field. The migration added it equal to the GitHub handle. If there's no known agent name for this contributor, that's a fine placeholder — just flagging in case there's a real agent name to use here.

[suggestion] btc/SKILL.md description still references Hiro Ordinals API (btc/SKILL.md:5)
This is out of scope for this PR, but the description says "Data sourced from mempool.space and the Hiro Ordinals API" — Hiro shut down their Ordinals API on 2026-03-09. We switched to Unisat internally. Worth a follow-up PR to update the description (and potentially the implementation).

[nit] skills.json version jump 0.20.1 → 0.22.0
Skipping 0.21.0 is a minor oddity — probably just a local dev artifact. Not blocking.

Operational note: We consume this skills.json in our sensors to check for new skill versions. The manifest format being unchanged means our sensors will continue parsing correctly post-merge. The SKILL.md format change does affect how we render skill descriptions in dispatch context — the new metadata: nesting is what our own arc-starter skill format now expects as well (we completed our own migration in task #5574). Confirmed compatible.

@whoabuddy whoabuddy merged commit 03adaab into main Mar 13, 2026
1 check passed
whoabuddy added a commit that referenced this pull request Apr 15, 2026
Three skills were admin-merged on 2026-04-08 with the CI
'Typecheck, validate, and manifest freshness' job in FAILURE state.
The Zod validation rules were tightened in #135 (merged 2026-03-13),
3+ weeks before these PRs landed. This commit fixes the failures so
subsequent BFF comp merges land on a clean baseline.

Fixes (frontmatter only, no code changes):

hermetica-yield-rotator/SKILL.md (introduced by #273):
  - user-invocable: "true"  →  "false"  (rule requires "false")
  - tags: trim to controlled vocab → "defi, write, mainnet-only, l2"

jingswap-cycle-agent/SKILL.md (introduced by #294):
  - requires: MCP tool name → "wallet, jingswap" (valid skill dirs)
  - tags: trim to controlled vocab → "defi, write, mainnet-only, l2"

sbtc-auto-funnel/SKILL.md (introduced by #278):
  - tags: trim to controlled vocab → "defi, write, mainnet-only, requires-funds, l2"

skills.json regenerated via bun run manifest to reflect all changes.

Also adds .quests/ to .gitignore (pre-staged harness addition).

Refs: FINDINGS.md in .planning/2026-04-15-bff-comp-review-4/
Rule tightening: #135

Note to repo owner: branch protection on main should require the
CI job so future comp batches cannot admin-merge past red CI.

Co-Authored-By: Claude <noreply@anthropic.com>
whoabuddy added a commit that referenced this pull request Apr 15, 2026
Three skills admin-merged on 2026-04-08 with CI in FAILURE state.
Zod validation rules were tightened in #135 (2026-03-13) before
those PRs landed. Fixes frontmatter-only; no code changes.

- hermetica-yield-rotator: user-invocable false; trim tags (#273)
- jingswap-cycle-agent: valid requires + trim tags (#294)
- sbtc-auto-funnel: trim tags (#278)

Regenerates skills.json. All 152 SKILL.md files pass validate.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ensure compliance with agentskills.io spec

3 participants