feat(skills): add a Skills page under Settings → Build - #6662
Merged
Conversation
Surfaces the org's skill catalog (the same `/fs/skills` data the runtime renders as `<available-skills>`) as a browsable page, with folder-import for new ones. Skills are `SKILL.md` folders on org-fs, so importing is the Library's upload with the format enforced: pick a folder containing a SKILL.md and its files land under `home/skills/<slug>/`, subdirectories intact. Cards reuse the Library's FolderIcon — Finder blue for the org's own, graphite plus a view-only badge for built-in sets and synced repos — and filter chips are derived from the catalog rather than a hardcoded list, so a deployment's own public sets appear automatically. Web-only; no API, schema, or endpoint changes. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Six issues from a review pass over the page: - A failed catalog fetch rendered the "No skills yet" empty state, with an Import CTA — a member missing ORG_FS_READ was told the org had no skills. Now its own error state, with the message and a retry. - Importing over an existing slug silently merged into it: matching filenames overwritten, the old skill's other files left behind. A live `stat` of the destination now refuses, pointing at delete-then-reimport. - The upload loop awaited one directory group at a time (N round-trip waves for N subdirectories) and left earlier groups on disk when a later one failed. One `allSettled` fan-out instead — settled, not `all`, so the catalog refresh can't run while PUTs are still in flight. - The catalog query shared the "/" picker's key but not its staleTime, so every mount and window focus rescanned home plus every synced repo volume. - Folder import had no file filter or cap: a stray `node_modules` fanned out to one PUT per file. Dotfiles and tooling dirs are dropped, the count is capped. - Filter-chip existence was derived from the search-filtered list, so chips vanished and the active filter silently reset while typing. Chips now come from the whole catalog; only their counts narrow. The pure import mapping moves to `skills-import.ts` so it is unit-testable without the route's React module graph.
… tree Follow-up on the review of the previous commit — five of the six were mine: - The slug probe sat outside the try, so a `/stat` that threw (no ORG_FS_READ, object storage unconfigured, a 5xx) became an unhandled rejection: the user picked a folder and nothing happened at all. It is inside now, with the handler's toast. - A partially-failed import left the destination directory behind — a broken skill in `<available-skills>` if SKILL.md landed, and an undeletable blocker on the slug probe if it didn't. The tree is rolled back, but only when the probe proved it ours to delete: rolling back unconditionally would delete an existing skill whenever the probe itself failed. - Where `webkitdirectory` is ignored (iOS Safari) the flat selection imported as `home/skills/skill` with every subdirectory flattened onto the root. Now refused with an explanation. - `upload.isPending` tracked only the last-started group, so the button re-enabled mid-import and a second import could trip the slug guard against the directory the first one had just created. One flag across the handler. - The success toast named the picked folder while every later message named the slug. It reports the slug. - `fetchOrgFsStat` duplicated `useOrgFsStat`'s wire contract; the hook delegates to it.
pedrofrxncx
force-pushed
the
rafavalls/skills-settings-page
branch
from
August 31, 2026 17:48
d8d9341 to
cc6aec8
Compare
decocms Bot
pushed a commit
that referenced
this pull request
Aug 31, 2026
PR: #6662 feat(skills): add a Skills page under Settings → Build Bump type: minor - decocms (apps/api/package.json): 4.308.0 -> 4.309.0 - @decocms/native (apps/native/package.json): 4.308.0 -> 4.309.0 Deploy-Scope: web
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is this contribution about?
Skills already drive agent behaviour at runtime (
buildSkillCatalog→<available-skills>), but the only way to see or add one was to browse raw folders in the Library. This adds Settings → Build → Skills: a page listing the org's whole catalog (its own, built-in public sets, synced repos) with search and origin filter chips, plus folder-import for new ones. Skills areSKILL.mdfolders on org-fs, so import is the Library's upload with the format enforced — pick a folder containing aSKILL.mdand its files land underhome/skills/<slug>/with subdirectories intact (files are grouped by destination dir; flattening would collapsereferences/style.mdonto the root). Cards reuse the Library'sFolderIconso a skill looks like the same object on both pages: Finder blue for the org's own (deletable), graphite plus a view-only badge for read-only sets and repos, with the body glyph naming the origin. Filter chips are derived from the catalog rather than hardcoded, since which public sets exist is deployment config (ORGFS_PUBLIC_SETS) and repo volumes are per-org.Web-only — no API, schema, endpoint or migration changes. Everything composes existing org-fs routes (
/fs/skills,PUT/DELETEfile,list).How did you verify your code works?
tsc --noEmit(apps/web) andoxlintclean on all touched files;knipreports no orphans.bun run --cwd=apps/web test: 2987 pass / 112 fail. I re-ran with this branch's changes stashed and got byte-identical counts (2987/112/13 errors), so the failures pre-date this branch and none are introduced here.react.d.ts(thewebkitdirectoryaugmentation) is load-bearing, not decorative: removing the file reproduces exactly 2webkitdirectorytype errors, so the attribute is genuinely type-checked rather than silentlyany. It lives in its own module file because puttingdeclare module "react"in the script-scopedglobals.d.tsdeclares an ambient module that shadows React entirely (~30 errors acrosspackages/ui).home/skills/weekly-reportwithreferences/{template,tone}.md) into a local org throughOrgFs.write()and confirmed both consumers agree: the route'sfilesExistprobe returnshasSkill=true(so the Library renders a skill card), anddetectSkillsreturnsid=home/skills/weekly-reportwith the parsed name/description (so agents get it in<available-skills>).Screenshots/Demonstration
Page layout follows the Connections page rhythm (title → search → chips → cards on one
gap-6column); cards followProjectCard.How to Test
core/storefrontsets should list as graphite folders with a view-only badge; filter chips show one per origin with counts.SKILL.md(nested subfolders are fine). It appears as a blue folder attributed to your org, with a delete action in its hover menu.SKILL.md— expect a toast telling you to pick the skill's own folder, and no upload./picker.Migration Notes
None.
Review Checklist
🤖 Generated with Claude Code
Summary by cubic
Adds Settings → Build → Skills so orgs can see every skill available to their agents (own, built-in sets, synced repos) and import new ones, instead of browsing raw folders in the Library.
SKILL.mdat its root uploads it underhome/skills/<slug>/with subdirectories intact; other folders are rejected with an error toast.FolderIcon: blue for the org's own deletable skills, graphite with a view-only badge for read-only sets and repos.Written for commit cc6aec8. Summary will update on new commits.