Endpoint
This endpoint requires authentication and validates write permissions for the skill’s vault.
Input Schema
UUID of the skill to delete
Output Schema
Always returns
true on successful deletionBehavior
Permission Validation
- Verifies the skill exists
- Validates user has write permission to the skill’s vault
- Throws
FORBIDDENif:- User lacks write access
- Vault is read-only (system_default or enterprise without admin role)
Cascade Deletion
Foreign key constraints automatically cascade the deletion:- Resources: All
skillResourcerecords linked to the skill are deleted - Links: All
skillLinkrecords where:sourceSkillId = skill.id, ortargetSkillId = skill.id, orsourceResourceIdreferences a deleted resource, ortargetResourceIdreferences a deleted resource
Hard Delete
Skills are hard deleted (not soft-deleted). The row is removed from the database immediately.TypeScript Example
Confirm Before Delete
Bulk Delete
Check Permissions Before Delete
Error Handling
NOT_FOUND
- Skill does not exist
- User lacks read permission to the skill’s vault (skill is hidden)
FORBIDDEN
- User lacks write permission to the skill’s vault
- Vault is read-only:
system_defaultvaults (always read-only)enterprisevaults where user is not admin
UNAUTHORIZED
No valid session
Impact on References
Incoming References
When a skill is deleted, other skills that mentioned it lose those links:skillLinkrecords are automatically deleted- Mention syntax (
@[skill-name](skill-id)) remains in source markdown - Next render shows the mention as unresolved or plain text
Outgoing References
Deleting a skill removes all its outgoing mentions:- Links from the skill to other skills/resources are deleted
- Referenced targets remain unchanged
- No orphaned data is left behind
Notes
- Deletion is atomic: either the entire operation succeeds or nothing changes
- Database foreign key constraints ensure referential integrity
- No way to recover deleted skills (consider backup/export before deletion)
- Personal vault skills can always be deleted by the owner
- System default skills cannot be deleted by any user
- Enterprise vault skills can only be deleted by vault admins
- Deleting a skill with many incoming references will break those mention links