feat(skills): add DELETE endpoint to permanently remove a skill - #499
Open
kristopolous wants to merge 1 commit into
Open
feat(skills): add DELETE endpoint to permanently remove a skill#499kristopolous wants to merge 1 commit into
kristopolous wants to merge 1 commit into
Conversation
There is currently no way to disable/remove a configured skill: the "Enabled" list in Settings > Skills is wired to a Remove button, but it's gated on skillCatalog.deleteSkill, which was never implemented because no backend DELETE route existed for skills at all — the button silently never rendered. Add IMcpServerStore-style deleteSkill for both Postgres and SQLite, the DELETE route, and its handler. Mirrors the equivalent MCP connector work (truefoundry#494/truefoundry#495) exactly: idempotent, 200 with {} on success, same pattern as the existing delete-agent/delete-mcp-server routes. Backend only, same reason as truefoundry#495: packages/trueforge-sdk is Fern-generated in CI and fork PRs cannot receive that regen commit. The "Edit" button + wired Disable action in the Skills settings UI is a fast-follow once this merges and the SDK regenerates on main. Full field editing (description, repo/path/ref) needs a separate follow-up — the SkillCatalogServer port has no updateSkill method and the list view doesn't expose a skill's current source, so that's a real port/data-shape change, not just a UI addition. Fixes truefoundry#498 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MxyEPwQ73B27NTr83U69Ba
kristopolous
requested review from
bhaveshpatel640,
chiragjn,
debajyoti-truefoundry,
heerambavi1998,
sr07asthana and
thesujai
as code owners
August 29, 2026 21:43
🦋 Changeset detectedLatest commit: d06cd36 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
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.
Summary
Fixes #498.
There is currently no way to disable/remove a configured skill. In Settings → Skills, the "Enabled" list's flush-right action slot is wired to a
Removebutton (SkillSettings.tsx), but it's gated onskillCatalog.deleteSkill, which was never implemented — the adapter's own comment says why:"Delete omitted (no BE route)". There is noDELETEroute for skills at all today (packages/trueforge/src/routes/skillRoutes.tsonly has list/create/put), so the button silently never renders.This PR adds the missing backend piece:
DELETE /api/v1/settings/skills/{name}.ISkillStore.deleteSkillimplemented for both Postgres and SQLite (DELETE FROM skill WHERE tenant_id = ? AND name = ?).deleteAgentRoute/deleteMcpServerRoute(feat(mcp-servers): add DELETE endpoint to permanently remove a connector #495) pattern: idempotent,200with{}on success.Scope: backend only (same reason as #495)
packages/trueforge-sdkis Fern-generated in CI and that workflow can't push its regen commit to a fork PR branch. A local regen attempt produces the same ~450-file unrelated-churn diff I hit on #495 (different pinned generator behavior than what's currently committed), which doesn't belong in this PR, andAGENTS.mdforbids hand-editingpackages/trueforge-sdk.So this PR is the backend endpoint only, tested. Two follow-ups, both filed as part of #498:
skillCatalog.deleteSkill+ an "Edit"-styled button inSkillSettings.tsxonce this merges and the SDK regenerates onmain— same sequencing as the connector "Remove" button after feat(mcp-servers): add DELETE endpoint to permanently remove a connector #495.SkillCatalogServerport has noupdateSkillmethod at all, andlistSkills()only returns{ id, name, description }— a custom-imported skill's current source isn't visible client-side to safely pre-fill or resubmit an edit form. That's out of scope for a UI-only change.Test plan
skillStoreContractSuite.ts(runs against both backends): delete removes the row; idempotent for an unknown skill, other tenants untouched.tests/unit/apis/skills.test.ts:DELETE /{name}removes the skill; idempotent for an unknown skill.pnpm test:store:sqlite— 133 passed (was 131), 1 skipped; confirmed the two newdeleteSkillcases ran via--verbose.pnpm test(trueforge unit suite) — 294/294 pass, includingskills.test.ts.pnpm run typecheck— clean.pnpm eslinton changed files — clean.@truefoundry/trueforgeminor — new endpoint).postgres:17-alpineservice.🤖 Generated with Claude Code
https://claude.ai/code/session_01MxyEPwQ73B27NTr83U69Ba
Note
Low Risk
Tenant-scoped row delete behind existing settings admin auth; behavior matches other delete endpoints and is covered by contract/API tests.
Overview
Adds
DELETE /api/v1/settings/skills/{name}so configured skills can be removed from the backend (unblocks Settings “Remove” once the SDK catches up).The flow mirrors existing admin delete routes: OpenAPI route with
namepath param, handler returns200and{}, andISkillStore.deleteSkilldeletes by(tenant_id, name)in both Postgres and SQLite with idempotent behavior when the row is already missing. ADeleteSkillResponseSchemadocuments the empty success body; store contract and API unit tests cover removal, idempotency, and tenant isolation.@truefoundry/trueforgegets a minor changeset for the new endpoint.Reviewed by Cursor Bugbot for commit d06cd36. Bugbot is set up for automated code reviews on this repo. Configure here.