The user wants to remove a skill, agent, or prompt from the library catalog and optionally delete the local copy.
The user provides a skill name or description.
Pull the latest catalog before modifying:
cd <LIBRARY_SKILL_DIR>
git pull- Read
library.yaml - Search across all sections for the matching entry
- Determine the type (skill, agent, or prompt)
- If no match, tell the user the item wasn't found in the catalog
Show the entry details and ask:
- "Remove from the library catalog?"
- If installed locally, also ask: "Also delete the local copy at
<path>?"
- Remove the entry from the appropriate section (
library.skills,library.agents, orlibrary.prompts) - If other entries depend on this one (via
requires), warn the user before proceeding
If the user confirmed local deletion:
- Check the default directory for the type (from
default_dirs) - Check the global directory
- Remove the directory or file:
rm -rf <target_directory>/<name>
cd <LIBRARY_SKILL_DIR>
git add library.yaml
git commit -m "library: removed <type> <name>"
git pushTell the user:
- The entry has been removed from the catalog
- Whether the local copy was also deleted
- If other entries depended on it, remind them to update those entries