SR-8 SkillsTab rewrite anchored to type / instance + Add skill picker + Reset to factory #876

Closed
opened 2026-05-05 10:30:12 +00:00 by claude-desktop · 0 comments
Collaborator

User story

As an operator, I want the Skills page on /agents/<type> (and /agents/<type>/<instance>) to show only the rows that fire for that anchor, with simple Add / Edit / Delete / Reset actions, so that I can see at a glance what an agent will run with no scope-ladder gymnastics.

Acceptance criteria

Component rewrite

  • apps/web/src/features/agent-config/skills-tab.tsx is rewritten (or a new component, with the legacy file deleted in SR-10).
  • Two anchored modes — type and instance — driven by route params. No standalone "global" mode.
  • Drops every reference to the four-layer scope ladder, scope chip colours, "Fork to scope" action, "Anchored vs free-floating" toggle, and the diff-vs-builtin button.

Type mode (/agents/<type>/skills)

  • Rows from GET /agents/<type>/skills.
  • Each row has Edit / Delete / Reset to factory actions.
  • "Add skill" button opens a picker showing every entry in GET /agents/skills/library not yet present for this type, plus a "Custom name…" option.
  • Editor is the existing CodeMirror 6 markdown editor + live preview drawer, simplified to a single body pane (no diff toggle).
  • "Reset to factory" reads skills/<name>.md from the library endpoint and overwrites the row body via POST. Disabled when the library has no matching file (operator-created custom skills).
  • Bulk action "Apply this body to other types" — secondary surface, multi-select target types from GET /agents, fires N upserts. Confirmation dialog lists target types and the skill name.

Instance mode (/agents/<type>/<instance>/skills)

  • Rows from GET /agents/<type>/<instance>/skills. List includes both instance-scope rows (editable) and inherited-from-type rows (read-only, "Inherits from type" badge, "Override here" action that copies the body and creates an instance-scope row).
  • Edit / Delete on instance-scope rows behaves as expected.
  • Delete an instance-scope row → row becomes "Inherits from type" again.
  • If the API returns pool_session_warning: true, render an inline warning explaining that this instance's session may diverge from siblings until the next stateless dispatch.

Tests

  • skills-tab.test.tsx covers: list render per mode, Add via picker, Edit, Delete, Reset to factory, Override here in instance mode, bulk-apply confirmation, pool-session warning render.

Out of scope

  • The HTTP endpoints (covered in SR-7).
  • Preview rendered prompt button (covered in SR-9).
  • Removing the legacy /settings/agent-config Skills tab (covered in SR-10).

References

  • Spec: specs/skills-rework.md §CRUD UI.
  • Existing component: apps/web/src/features/agent-config/skills-tab.tsx (1170 lines, mostly to be replaced).
  • Web conventions: apps/web/CLAUDE.md.
  • Depends on SR-7.
## User story As an operator, I want the Skills page on `/agents/<type>` (and `/agents/<type>/<instance>`) to show only the rows that fire for that anchor, with simple Add / Edit / Delete / Reset actions, so that I can see at a glance what an agent will run with no scope-ladder gymnastics. ## Acceptance criteria ### Component rewrite - [ ] `apps/web/src/features/agent-config/skills-tab.tsx` is rewritten (or a new component, with the legacy file deleted in SR-10). - [ ] Two anchored modes — type and instance — driven by route params. No standalone "global" mode. - [ ] Drops every reference to the four-layer scope ladder, scope chip colours, "Fork to scope" action, "Anchored vs free-floating" toggle, and the diff-vs-builtin button. ### Type mode (`/agents/<type>/skills`) - [ ] Rows from `GET /agents/<type>/skills`. - [ ] Each row has Edit / Delete / Reset to factory actions. - [ ] "Add skill" button opens a picker showing every entry in `GET /agents/skills/library` not yet present for this type, plus a "Custom name…" option. - [ ] Editor is the existing CodeMirror 6 markdown editor + live preview drawer, simplified to a single body pane (no diff toggle). - [ ] "Reset to factory" reads `skills/<name>.md` from the library endpoint and overwrites the row body via `POST`. Disabled when the library has no matching file (operator-created custom skills). - [ ] Bulk action "Apply this body to other types" — secondary surface, multi-select target types from `GET /agents`, fires N upserts. Confirmation dialog lists target types and the skill name. ### Instance mode (`/agents/<type>/<instance>/skills`) - [ ] Rows from `GET /agents/<type>/<instance>/skills`. List includes both instance-scope rows (editable) and inherited-from-type rows (read-only, "Inherits from type" badge, "Override here" action that copies the body and creates an instance-scope row). - [ ] Edit / Delete on instance-scope rows behaves as expected. - [ ] Delete an instance-scope row → row becomes "Inherits from type" again. - [ ] If the API returns `pool_session_warning: true`, render an inline warning explaining that this instance's session may diverge from siblings until the next stateless dispatch. ### Tests - [ ] `skills-tab.test.tsx` covers: list render per mode, Add via picker, Edit, Delete, Reset to factory, Override here in instance mode, bulk-apply confirmation, pool-session warning render. ## Out of scope - The HTTP endpoints (covered in SR-7). - Preview rendered prompt button (covered in SR-9). - Removing the legacy `/settings/agent-config` Skills tab (covered in SR-10). ## References - Spec: `specs/skills-rework.md` §CRUD UI. - Existing component: `apps/web/src/features/agent-config/skills-tab.tsx` (1170 lines, mostly to be replaced). - Web conventions: `apps/web/CLAUDE.md`. - Depends on **SR-7**.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/claude-hooks#876
No description provided.