Skip to content

Skills as portable SKILL.md files (8.4.0) - #19

Merged
foursecondfivefour merged 2 commits into
mainfrom
arena/36a4d756-nerveforge
Dec 2, 2026
Merged

foursecondfivefour merged 2 commits into
mainfrom
arena/36a4d756-nerveforge

Conversation

@foursecondfivefour

Copy link
Copy Markdown
Owner

What

The twelve skill procedures were good advice written in a shape only this bridge could read. They now follow the Agent Skills standard (SKILL.md) — the layout Claude Code, Cursor, Codex, Copilot and the rest of the agentskills.io clients load directly.

One file, two audiences

Files moved from skills/<id>.md to skills/<id>/SKILL.md. Front matter is generated by skillcatalog.front_matter() rather than hand-written: name (must match the folder, lowercase, no double hyphens), description (what it does and when to use it, ≤1024 chars), license, and everything the bridge needs under metadata — category, tags, required and optional tools. Tests check the rules a client would otherwise enforce by silently refusing the file.

Three routes make the export real:

Route Answers
GET /api/skills/<id>/SKILL.md text/markdown, ready for .agents/skills/<id>/; /skill.md works too
GET /api/skills/bundle {version, skills: [{id, path, content}]} — twelve files in one request
GET /api/skills/<id>/validate {valid, problems} against the spec

GET /api/skills/<id> still returns the verdict, but body no longer repeats the YAML: two copies of one fact is one too many.

A bug this release found

skills_one is registered with the prefix /api/skills/, and a prefix cannot say where a path ends — so /api/skills/bundle was being answered by the one skill handler with bundle as its id. Table.resolve() now prefers an exact path, then a pattern, then a prefix. Regression tests use the real route table, not a mock, because a mock would have hidden it.

Note this also changes routing for any route added later under an existing prefix: the specific rule now wins instead of silently losing to registration order.

Packaging

toolkit/skills/*/SKILL.md is declared as package data. Verified against a real wheel build: 12 SKILL.md entries. Without it an installed bridge would have listed twelve skills whose bodies degraded to one-line summaries.

Verification

  • python3 -m unittest discover -s tests — 1705 tests, OK (skipped=1)
  • ruff check . — clean
  • scripts/check_docs.py — 19 EN/RU pairs agree
  • scripts/gen_api_doc.py --check, scripts/bump_version.py --check — clean
  • End-to-end through router.dispatch with the real table: SKILL.md → skills_document (text/markdown), /bundle → skills_bundle, /validate → skills_validate, /api/skills/<id> → skills_one

Also: firmware-iOT → firmware-iot (the spec allows lowercase only), the old flat layout is still read as a fallback, and /llms.txt + /api/agent-prompt tell an agent to read a procedure before improvising.

The twelve procedures were good advice in a shape only this bridge could read.
They are now `skills/<name>/SKILL.md` with generated front matter — `name`,
`description`, `license`, and the tool list under `metadata` — which is the
layout Claude Code, Cursor, Codex, Copilot and the other agentskills.io clients
load directly.

- skillcatalog: `front_matter()`, `document()`, `skill_body()`, `name_is_valid()`
  and `skill_path()`; the files moved and `firmware-iOT` became `firmware-iot`,
  because the spec permits lowercase only. The old flat layout is still read.
- routes: `GET /api/skills/<id>/SKILL.md` (`text/markdown`, `/skill.md` too),
  `GET /api/skills/bundle` for the whole catalogue, and
  `GET /api/skills/<id>/validate` for the rules a client would enforce silently.
  `GET /api/skills/<id>` keeps the verdict but drops the YAML from `body`.
- router: `resolve()` now prefers an exact path, then a pattern, then a prefix.
  A prefix cannot say where a path ends, and `skills_one` was answering
  `/api/skills/bundle` before this — the bug would have shipped silently.
- pyproject: `toolkit/skills/*/SKILL.md` ships as package data; verified against
  a built wheel (12 entries), otherwise an installed bridge would show twelve
  one-line summaries.
- system: `/llms.txt` and `/api/agent-prompt` gained a skills section and the
  new endpoints.
- docs: TOOLKIT, AGENTS, README, generated API reference and the Russian
  mirrors; CHANGELOG 8.4.0 in both languages; routes 63 → 66, tests 1680 → 1698.

1705 tests pass, ruff clean, check_docs and gen_api_doc --check clean.

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
@foursecondfivefour
foursecondfivefour force-pushed the arena/36a4d756-nerveforge branch from 16446c5 to 922fbcb Compare December 2, 2026 13:24
The project supports 3.10 and the first CI run of this test failed on the
import, not on what it guards.

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
@foursecondfivefour
foursecondfivefour merged commit b1c4128 into main Dec 2, 2026
3 checks passed
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.

1 participant