Skip to content

fix(skillhub): accept hub archives that set the data-descriptor flag - #371

Merged
quickbeard merged 1 commit into
mainfrom
fix/skillhub-descriptor-flag
Sep 16, 2026
Merged

quickbeard merged 1 commit into
mainfrom
fix/skillhub-descriptor-flag

Conversation

@quickbeard

Copy link
Copy Markdown
Owner

Fixes the "The Skill Hub could not deliver this skill. (ADM-ZIP: No descriptor present)" error a user hit installing outlook-local from the desktop Skill Hub.

Root cause

The hub re-packs every uploaded skill with adm-zip to inject _meta.json (src/lib/zipMeta.ts in the hub). adm-zip's writer copies each original entry's general-purpose flags but never writes a data descriptor. When the upload was produced by a zipper that sets bit 3 ("sizes and crc follow the data" — macOS Archive Utility, Windows Explorer, most streaming zippers), the archive the hub serves has bit 3 set on those entries, the real sizes and crc in both the local and central headers, and no descriptor record after the data.

adm-zip 0.5.16, which @codev/skillhub pinned, treated "next local header where the descriptor should be" as fatal and threw No descriptor present from getData(). The error surfaced in detectAndStripRoot (and would again in extractZip), after the download and the listing had both succeeded — which is why the skill could be browsed but never installed. Every client shares this path: the desktop app, the TUI, and codev skill pull.

outlook-local has 8 such entries. Of the 24 most-downloaded skills and all 6 stacks on the live hub it is the only one affected today, but any future upload from those zippers hits it.

Fix

  • Bump adm-zip to 0.6.1 (published 2026-09-11). Its crc32OK validates a bit-3 entry against the central directory's crc instead of hunting for the descriptor (upstream issues #533, #548, #554). No public API changes between 0.5.16 and 0.6.1; the two additions are a per-entry inflate cap at the declared size and rejection of duplicate entry names, both of which tighten guards archive.ts already relies on (comment updated).
  • Regression test: rewrites a normal archive into the hub's shape (bit 3 set in every local and central header, no descriptor) and asserts inspectZip, detectAndStripRoot, and extractZip all succeed, and that a wrong crc is still refused.
  • CHANGELOG entry under Unreleased › Skills.

No upstream files touched, so no DIVERGENCES.md row.

Verification

  • packages/codev-skillhub: 249 pass (3 new), bun typecheck clean; packages/server bun typecheck clean.
  • packages/opencode HttpApi exerciser --include skillhub: 7/7 pass.
  • Real archive: installSkill("outlook-local") through the package's own install path against the live hub now writes SKILL.md, _meta.json, .netmind-preinstalled.json, and the six scripts. Before the bump the same call threw the reported error.

Hub-side follow-up (not in this PR)

The hub should clear bit 3 when it re-serializes an upload in zipMeta.ts (or bump its own adm-zip past 0.6.0 and re-pack), so older CoDev builds that still ship 0.5.16 can install these skills too.

🤖 Generated with Claude Code

Installing some skills from the Skill Hub failed with "ADM-ZIP: No
descriptor present". The hub re-packs every upload with adm-zip to inject
_meta.json; adm-zip's writer keeps each entry's original general-purpose
flags but never emits a data descriptor, so an upload whose zipper set bit 3
(macOS Archive Utility, Windows Explorer, streaming zippers) comes back with
the flag set, real sizes/crc in both headers, and no descriptor. adm-zip
0.5.16 refused exactly that shape; 0.6.1 validates such entries against the
central directory's crc instead (upstream issues #533/#548/#554), which is
what every other unzip tool does.

Bump adm-zip to 0.6.1 and add a regression test that rewrites a normal
archive into the hub's shape. 0.6.1 also caps inflation at each entry's
declared size and rejects duplicate entry names, both of which tighten the
guards archive.ts already relies on.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@quickbeard
quickbeard merged commit e96b214 into main Sep 16, 2026
0 of 5 checks passed
@quickbeard
quickbeard deleted the fix/skillhub-descriptor-flag branch September 16, 2026 10:04
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