Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
3.2 KiB
3.2 KiB
name, description
| name | description |
|---|---|
| skill-delete | Remove a skill from the jsc skill set safely. List skills from the Gitea canonical marketplace (cloning any missing domain repo) and let the user pick, inventory every file referencing the skill via a sub agent, fix each affected file through decision-tree questions until guideline checks pass, then delete the skill, verify the removal is clean, and open a PR via jsc-git pr. Use only for removal; not for renaming (use skill-update). |
skill-delete — delete a skill
Single source of guidelines: ../../references/guidelines.md.
Flow
- Query Gitea for the canonical skill set first: run
jsc-gitea/tools/gitea.sh api GET /repos/plugins/meta/raw/.claude-plugin/marketplace.jsonto get the authoritative domain list, then scan localjsc-*/skills/*/SKILL.mdand present a "domain / name / description" list covering every domain in the marketplace. Completion condition: the list covers all marketplace domains. - For any marketplace domain whose repo is missing from the working directory, clone it first (
gitea.sh clone-url plugins/{domain}), then rescan. Completion condition: every domain repo exists locally. - Let the user pick the skill to delete. Options state the impact scope: which skills reference it, and that its command stops working after deletion.
- Inventory every file related to the skill: run
tools/find-skill-refs.sh {domain} {name}to list every file across all jsc-* repositories referencing the skill name or its/jsc-{domain}:{name}command form (covers other SKILL.md files, the domain README's 「Skills 目錄」 section, the two marketplace.json files inplugins/metaplus their synced copies in every domain repo,tools/, and thejsc-hookswiring). Completion condition: the tool's file list is captured for step 5. - For each affected file:
- Decide whether the file needs a fix to keep its current behavior after the deletion. If no fix is needed, skip the rest of this loop.
- Ask for fix details via the
jsc-ask:askdecision tree (call a replacement skill? move a deterministic input/output flow totools/? run the detailed flow as a sub agent? drop the feature too?). If the fix touches wiki or Gitea access, confirm it reads inherited environment variables before asking the user. Every option states its impact scope. - After fixing, check the guidelines.md audit checklist. On failure, return to step 5.2.
- Delete the skill directory
skills/{name}/, then runtools/sync-skill-manifest.sh {domain-path}directly (no sub agent needed) to sync the domain README and bump the version in all three manifests. - Deep-delete verification — this step MUST run as a sub agent: after deleting via each CLI's native plugin commands, physically inspect every installed CLI's on-disk skill and hook storage. Detect CLIs via
jsc-cli/tools/detect-clis.sh; check Claude's~/.claude/plugins/cache/and hook entries in settings, plus the equivalent locations for codex / copilot / antigravity / kiro. Confirm no file or hook wiring for the deleted skill remains. Completion condition: every location checked and clean; remove any leftover by hand and recheck. - Call
jsc-git:prto open a Push Request.