Skip to content

fix(skills): accept any SKILL.md casing and list bundled files in detail - #1140

Draft
wen2zhou wants to merge 1 commit into
aipoch:mainfrom
wen2zhou:fix/skill-document-casing
Draft

fix(skills): accept any SKILL.md casing and list bundled files in detail#1140
wen2zhou wants to merge 1 commit into
aipoch:mainfrom
wen2zhou:fix/skill-document-casing

Conversation

@wen2zhou

@wen2zhou wen2zhou commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Problem

Importing a Specialist package whose skill document is skill.md (lowercase, common on macOS/APFS) failed with "Skill document missing", and the skill detail view showed only the SKILL.md body — references/, scripts/, assets/, templates/ were invisible.

Root cause

  • Specialist package validator matched SKILL.md exactly — a string compare on zip entry paths, so the OS's case-insensitivity couldn't help → import blocked.
  • SKILL.md checks were scattered (exact === 'SKILL.md' in some places, ad-hoc toLowerCase() in others) → easy to drift.
  • SkillDetailView never rendered anything but the SKILL.md body.

Fix

  • Centralize the rule in isSkillDocumentName (skill-bundle-paths) and use it everywhere a skill document path/name is matched, so casing can never drift between validation, import, listing, and export: specialist-package validator (the import blocker), skill-bundle-import-owner, agent-home-skill-owner, export, service, skill-bundle-paths, and listSkillFiles.
  • Add listSkillFiles + SkillFileEntry; the skill detail view now lists every bundled file as a directory tree with sizes, excluding the skill document (already the body) and app metadata (.source.json / .specialist-package.json).

Verification

  • npm run typecheck (node + web) ✓
  • eslint clean on all changed files ✓
  • vitest run src/main → 9592 passed (incl. new skill-files unit tests, specialist-package validator/service, SkillDetailView render) ✓

Notes

  • readFile(join(dir, 'SKILL.md')) sites (read a fixed path) are unchanged — on macOS/APFS they already resolve lowercase; cross-platform (Linux) full consistency is a separate follow-up.

Specialist packages built on case-insensitive filesystems (macOS/APFS)
ship the skill document as `skill.md`. The package validator matched
`SKILL.md` exactly, so such packages failed to import with "Skill
document missing". The skill detail view also rendered only the SKILL.md
body, ignoring references/scripts/assets/templates.

Centralize the skill-document rule in isSkillDocumentName
(skill-bundle-paths) and apply it everywhere a skill document path or
name is matched, so casing can never drift between validation, import,
listing, and export: specialist package validator (the import blocker),
skill-bundle-import-owner, agent-home-skill-owner, export, service,
skill-bundle-paths, and skill-files listSkillFiles.

Add listSkillFiles and SkillFileEntry so the skill detail view lists
every bundled file as a directory tree, excluding the skill document
(already rendered as the body) and app metadata files.
@github-actions github-actions Bot added the bug Something isn't working label Aug 12, 2026
@wen2zhou
wen2zhou marked this pull request as draft August 12, 2026 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant