fix(skills): auto-detach agents when pruned skill is in use during repo sync

During a repo sync (scan button), if a skill was removed from the source
and is still assigned to agents, the skill is now automatically detached
from those agents before deletion, rather than leaving it attached.
Manual delete-by-source is unchanged (still blocks if in use).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-11 10:56:59 -04:00
committed by Pawla Abdul (Bot)
parent ba44667ae3
commit 2e522c9b37
2 changed files with 16 additions and 5 deletions
@@ -294,7 +294,7 @@ describe("company skill mutation permissions", () => {
skipped: [],
conflicts: [],
warnings: [
'Skill "ghost-skill" was removed from https://github.com/vercel-labs/agent-browser but is still used by Builder. It will not be automatically removed.',
'Skill "ghost-skill" was removed from https://github.com/vercel-labs/agent-browser and detached from Builder.',
],
});