Skip to content

Let people delete skills and playbooks from the library - #394

Merged
abhishekgahlot2 merged 3 commits into
useagenthq:mainfrom
coolestnick:delete-skills-and-playbooks
Nov 2, 2026
Merged

abhishekgahlot2 merged 3 commits into
useagenthq:mainfrom
coolestnick:delete-skills-and-playbooks

Conversation

@coolestnick

@coolestnick coolestnick commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Closes #286

What and why

Skills and playbooks could be created and imported but never removed in the app, even though the backend already exposes a delete endpoint. This adds a Delete action to the skill detail dialog and to the playbook detail, so people can clear out what they no longer need.

How it works

Both surfaces share one small component, SkillDeleteAction, which reuses the existing InlineDeleteConfirm strip rather than inventing a new pattern:

  • A quiet Delete button opens a confirm strip with Cancel and a red Delete.
  • Confirming calls the existing delete endpoint, refreshes the list, and closes the dialog.
  • If the call fails, a plain error line appears and the strip stays so you can retry.
  • Cancel leaves the item untouched.

Deleting the last variant of a grouped skill closes the dialog; deleting one of several leaves the rest open. Runs that already used a skill keep their recorded version, so history is preserved.

Tests

A new interaction test covers the confirm and the list refresh, Cancel leaving the item untouched, and the failed-delete error path. Full suite green: typecheck, bun run test (1771 pass), lint, and build.

How to see it

Open a skill (Skills) or a playbook (Playbooks), and use the new Delete button at the bottom of the detail.

Before / after

Before After
Skill detail before-skill after-skill-confirm
Playbook detail before-playbook after-playbook
Confirm strip after-playbook-confirm after-skill-confirm

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

coolestnick and others added 3 commits October 30, 2026 03:55
Skills and playbooks could be created and imported but never removed in
the app, even though the backend already exposes a delete endpoint. This
adds a Delete action to the skill detail dialog and to the playbook
detail.

Both surfaces share one small component, SkillDeleteAction, which reuses
the existing InlineDeleteConfirm strip: a quiet Delete button opens a
confirm with Cancel and a red Delete, calls the delete endpoint,
refreshes the list and closes the dialog, and shows a plain error line
if the call fails. Deleting the last variant of a grouped skill closes
the dialog; deleting one of several leaves the rest open.

A test covers the confirm and list refresh, Cancel leaving the item
untouched, and the failure path.

Closes useagenthq#351.
Deleting a skill pinned by an enabled automation or bot routine left every
later firing failing with missing_skill_revision, and the scheduler only
logged it. DELETE /api/skills/:id now answers 409 skill_in_use while any
enabled schedule in the same org pins the skill, with the first five
holders by name (a routine also names its bot) and the total count. Other
orgs' schedules never count; a paused or repointed one no longer holds it.

The confirm strip says who still uses it and to pause them or change what
they use first. A 404 means a teammate already deleted it, so the list
refreshes instead of showing an error, and the remaining failure line uses
plain words. The strip gains an optional problem line, announced as an
alert, so the reason shows where the member pressed Delete.
@abhishekgahlot2
abhishekgahlot2 merged commit 7ec897f into useagenthq:main Nov 2, 2026
21 checks passed
@abhishekgahlot2

Copy link
Copy Markdown
Contributor

Merged, thanks @coolestnick! I added one thing on top: the delete now refuses while an enabled automation or bot routine still uses the skill, and the confirm strip names them, so nothing stops running quietly.

@github-actions github-actions Bot locked and limited conversation to collaborators Nov 2, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Let people delete a skill or playbook they no longer need

2 participants