Skip to content

feat(skills): publish complete skill archives with hardened generation - #95

Merged
nibzard merged 1 commit into
mainfrom
fix/pr-review-findings
Jul 30, 2026
Merged

feat(skills): publish complete skill archives with hardened generation#95
nibzard merged 1 commit into
mainfrom
fix/pr-review-findings

Conversation

@nibzard

@nibzard nibzard commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

What

Follows up #89: the Agent Skills discovery index now publishes one complete tar.gz archive per skill (type: "archive") instead of per-file skill-md entries, so agents fetch a skill's SKILL.md together with its references, scripts, and templates in a single download.

  • The manifest and every skill file are read from one commit-pinned snapshot of steel-dev/skills, so an index can never mix files from different commits.
  • Archive bytes are deterministic (normalized tar headers, zeroed gzip metadata): a fixed upstream commit always produces a fixed sha256 digest.
  • Generation fails closed on any catalog error; partial output cannot deploy.

Hardening (from code review)

  • Never republish stray upstream files: hidden files/dirs are excluded from archives and uncompressed content is capped at 5 MB per skill, so an accidentally committed .env.local or oversized fixture upstream cannot reach docs.steel.dev or OOM a deploy.
  • Manifest path is optional, falling back to the skill name exactly like upstream's meta.path ?? name, so a legal upstream manifest cannot break docs deploys.
  • YAML errors name their skill: invalid SKILL.md frontmatter now fails with the skill name instead of a bare YAMLException.
  • Markdown negotiation excludes all of /.well-known (RFC 8615 namespace is machine-readable by definition) plus .gz/.tar/.tgz assets, replacing three one-off path entries.
  • Cache-Control (max-age=300, must-revalidate) on index.json and the tarballs: they change together on deploy, so a stale index can no longer fetch tarballs whose digest it must reject as tampered.
  • CI runs the generator with secrets.GITHUB_TOKEN, surfacing rate-limit or upstream drift failures in PRs instead of at deploy time.

Testing

  • 10 new tests (red first, then green): archive layout, determinism, dotfile exclusion, size ceiling, path fallback, YAML attribution, /.well-known and archive-extension negotiation.
  • Full suite: 252 pass / 0 fail; typecheck, Biome, cspell clean.
  • Generator run end-to-end against real upstream: 5 archives at 35bf2783, none containing hidden entries.

Replace the per-file skill-md discovery entries with one complete
tar.gz archive per skill, built from a single commit-pinned
steel-dev/skills snapshot so the manifest and every supporting file
come from the same commit. Archive bytes are deterministic (normalized
tar headers and gzip metadata), digested with sha256, and the build
fails closed on any catalog error.

Hardening from code review:
- Exclude hidden files/dirs from archives and cap uncompressed content
  at 5 MB per skill, so stray upstream files (.env.local, fixtures)
  can never be republished on docs.steel.dev
- Fall back to the manifest key when a skill entry omits path,
  matching upstream's own `meta.path ?? name` resolution
- Attribute YAML frontmatter parse failures to the offending skill
- Exclude the whole RFC 8615 /.well-known namespace and archive
  extensions (.gz/.tar/.tgz) from markdown content negotiation
- Serve index.json and tarballs with a short shared Cache-Control
  lifetime so a stale index cannot digest-mismatch fresh tarballs
- Run agent-skills generation in CI so failures surface pre-deploy
@vercel

vercel Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview Jul 30, 2026 3:00pm

Request Review

@nibzard
nibzard merged commit bb24bf5 into main Jul 30, 2026
3 checks passed
@nibzard
nibzard deleted the fix/pr-review-findings branch July 30, 2026 15:01
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