Repository navigation
fix(skills): delete side-loaded skills and name unnamed skills by directory - #549
Merged
Merged
Conversation
The desktop Skills page could show a skill whose delete button did nothing, and unnamed skills all collapsed into a single 'SKILL' entry. Two independent causes: * agent discovery fell back to the SKILL.md *file* name when frontmatter has no ame:. Every skill entry file is called SKILL.md, so all unnamed skills were named 'SKILL'; duplicate names are skipped during discovery, collapsing them into one entry that no directory can satisfy. * the desktop uninstall only removed <scope>/<id>, so any skill whose reported name differs from its directory (side-loaded, or one level deeper) could not be deleted at all. Discovery now falls back to the skill directory (the install id), and uninstall sweeps every directory the agent would list under that name, in every scope, matching the two-level walk discovery uses. Also stop the CLI resolving ~/.future/agent through raw dirs::home_dir(): on Windows that reads the token profile and ignores a redirected HOME, so command line installs landed outside the tree the agent discovers, and the test suite wrote skill/auth/models fixtures into the developer's real profile. The CLI (image output dir included) and the agent's own tilde expansion now use the agent's home policy (HOME, then USERPROFILE).
huichen
enabled auto-merge (squash)
September 10, 2026 14:29
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.
Problem
The desktop Skills page could list a skill whose delete button silently did nothing, and unnamed skills all collapsed into one entry literally named
SKILL.First seen with side-loaded
SKILL.mdfiles that have noname:frontmatter:Causes
extract_namefell back topath.file_stem(), and every skill entry file is calledSKILL.md— so all unnamed skills becameSKILL.discover_skillsskips duplicate names, collapsing them into a single entry, anduninstall_skillthen deleted the directory<scope>/SKILL, which never exists. Nothing the GUI could click would ever remove the real directories.<scope>/<id>. Any skill whose reported name differs from its directory (side-loaded, or nested one level below a scope root) was undeletable even once it had a distinct name.Changes
agent/src/skills/mod.rs: the name fallback is now the skill directory (the install id), matching how the CLI and the desktop address a skill.desktop/src-tauri/src/skills.rs:uninstall_skillsweeps every directory the agent would list under that name — the same two-level walk discovery uses — across every scope, andskill_namemirrors the agent's name resolution.~/.future/agentthrough rawdirs::home_dir(), which on Windows reads the token profile and ignores a redirectedHOME. Installs throughfuture skills installcould land outside the tree the agent discovers, and the CLI test suite wrote skill/auth/models fixtures into the developer's real profile (this is how the fixtures above ended up in a real~/.future/agent/skills).cli(skills dir, image output dir,auth_file,doctor's agent dir) and the agent's own tilde expansion now use the agent's home policy (HOME, thenUSERPROFILE);shellexpandis dropped as it is the last user of the old resolution.Tests
unnamed_skills_keep_distinct_names,extract_name_falls_back_to_the_skill_directory,expand_tilde_follows_the_redirected_home(agent)skills_dir_follows_the_redirected_home(cli)uninstall_removes_nameless_skills_by_directory_name,uninstall_removes_skills_whose_name_differs_from_their_directory,skill_name_falls_back_to_the_directory(desktop)Verified:
cargo test -p future-agent --lib skills::,cargo test -p future-cli --lib skills::,cargo test --manifest-path desktop/src-tauri/Cargo.toml --lib skills::, pluscargo fmt --checkandcargo clippy --all-targets -- -D warningsfor the touched crates. Remaining failures in the full local suites are pre-existing on Windows and unrelated (Expand-Archiveexit codes, git/remote fixtures, macOS-only dead code under--all-targets); CI runs Linux/macOS.