Skip to content

fix(hub): an agent switched off loses devstack's skills, and no empty folder stays (ADR-0083) - #408

Merged
7schmiede merged 1 commit into
mainfrom
fix/skills-agent-off-cleanup
Nov 2, 2026
Merged

7schmiede merged 1 commit into
mainfrom
fix/skills-agent-off-cleanup

Conversation

@7schmiede

Copy link
Copy Markdown
Member

Switching Codex, GitHub Copilot and OpenCode off on the Skills page cleared the pool's skills from .agents/skills, but devstack's generated skills (devstack, devstack-config) stayed there and were refreshed every minute; and removing a skill left the emptied .agents/skills and .agents behind.

Review card

Approved by the owner in the conversation on 2026-11-02 (both points):

Category Point Beats Reversing costs
concept The hub removes a generated devstack skill (unchanged, untracked) from a folder in a working tree that no agent switched on reads and [agents] skills does not name. Refreshing such a copy everywhere and never removing it (ADR-0079 point 5). Low: switched on again, the agent gets the copy written anew.
concept After removing a skill (a pool's or devstack's), the hub removes the folders it left empty above it, at most up to the working tree's root or the home. Empty .agents/skills and .agents left behind. Low: a folder is made again when a skill is written.

Decided on my own

  • Only folders of agents the user explicitly switched off are cleared; an agent never touched keeps the old refresh rule.
  • .claude/skills counts as named by [agents] skills when the key names none (devstack skills install writes there), so it is never cleared.
  • Unchanged means: the generated marker, and only SKILL.md + .gitignore in the folder (a project's extra file keeps it); the text is not held against the templates, the hub overwrote such copies before as well.
  • Pruning stop for a pool skill: its working tree's root, else the home when the folder is an agent's user folder, else nothing.
  • The hub's tests no longer call local() against this machine's real registry of stacks (they would now delete generated skills in real repositories): the stacks are an injected field.

ADR-0083 records what was built; ADR-0079 point 5 notes the amendment.

Tests

  • devstack-skills: the_hub_takes_a_copy_out_of_a_folder_switched_off, pruning_stops_at_a_folder_with_something_in_it_and_at_the_root
  • devstack-hub: the_generated_skills_leave_the_folders_of_an_agent_switched_off; an_accepted_set_is_installed_into_the_agents_switched_on now checks the emptied ~/.agents goes and a folder with a user's skill stays.

🤖 Generated with Claude Code

… folder stays (ADR-0083)

The hub refreshed a generated devstack skill in every agent's folder and
never removed one, so switching Codex off left .agents/skills/devstack in
place. It now takes a generated copy out of the folders of agents switched
off (none switched on reads it, [agents] skills does not name it), and
after removing any skill it removes the folders left empty, up to the
working tree's root or the home.

The hub's tests no longer reach this machine's registry of stacks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@7schmiede
7schmiede merged commit 4ded190 into main Nov 2, 2026
@7schmiede
7schmiede deleted the fix/skills-agent-off-cleanup branch November 2, 2026 13:20
@7schmiede 7schmiede mentioned this pull request Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant