Skip to content

Skills: upload a SKILL.md to create a skill - #274

Merged
TheGreatAxios merged 2 commits into
mainfrom
cl-skill-upload
Aug 21, 2026
Merged

Skills: upload a SKILL.md to create a skill#274
TheGreatAxios merged 2 commits into
mainfrom
cl-skill-upload

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Contributor

Summary

  • The Skills page only supported authoring a skill by pasting name/description/body into a form. Uploading a SKILL.md elsewhere in the product landed it as a generic document instead of a skill.
  • Extends the existing create path (no parallel one): POST /api/tenants/:id/skills now accepts either the existing {name, description, body, scope} fields or a raw {source, scope} SKILL.md, parsed with the same parseSkillMd the registry already uses to read a skill back.
  • create-skill-dialog.tsx gains an Upload tab (Tabs + FileInput from @corbits/react-ui, the same composition AddArtifactDialog already uses) next to the existing Paste tab.
  • A malformed upload is rejected with the same plain-language SkillContentError message the paste path already surfaces, and nothing is created.
  • Single-file only: workbench's skill registry stores one <name>/SKILL.md per asset today (no attachments/blob table), so upload is deliberately one file — no folders, zips, or bundles.

Test plan

  • packages/skills: bun test (81 pass, incl. 2 new upload-path route tests)
  • apps/web: bun test test/skills-page.test.tsx (12 pass, incl. new upload success + malformed-upload tests, existing paste-path tests unchanged)
  • apps/web: bunx tsc --noEmit, bunx eslint on changed files, bunx prettier --check on changed files
  • apps/web: full bun test (834 pass / 3 pre-existing unrelated failures — test/tailwind-build.test.ts requires a dist/ build artifact not present in a fresh worktree)

CL-6561

Covers the route accepting a raw SKILL.md source alongside the
existing name/description/body fields, a malformed upload being
rejected with a clear message and creating nothing, and the
create-skill dialog's upload tab wiring through to that route.
The create dialog only ever accepted paste-in-a-form; uploading a
SKILL.md elsewhere in the product (e.g. Files) landed it as a generic
document instead of a skill. Extend the same create path rather than
building a parallel one: the dialog gains an Upload tab next to Paste,
and the registry's POST /skills route now accepts either the existing
{name, description, body} fields or a raw {source} SKILL.md, parsing
the latter with the same parseSkillMd the registry already uses to
read a skill back. A file that fails to parse is rejected with a
plain-language message and nothing is created.

A skill is still one SKILL.md per asset, so upload is single-file —
no folders, zips, or attachments.
@TheGreatAxios
TheGreatAxios merged commit b586fde into main Aug 21, 2026
5 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