Skip to content

fix(#683): claw skills remove/add/uninstall/delete emits typed error, exit 1#3095

Closed
code-yeongyu wants to merge 1 commit into
mainfrom
fix-683-unsupported-skills-action
Closed

fix(#683): claw skills remove/add/uninstall/delete emits typed error, exit 1#3095
code-yeongyu wants to merge 1 commit into
mainfrom
fix-683-unsupported-skills-action

Conversation

@code-yeongyu

Copy link
Copy Markdown
Collaborator

Summary

Fixes #683: claw skills remove/add/uninstall/delete no longer silently exits 0 with help text (stealth-success). Instead, it emits a typed kind:"unsupported_skills_action" structured error and exits 1.

Changes

  • Guard in parse_args: Before dispatching skills commands, check if the first word is remove, add, uninstall, or delete. If so, return a structured error string containing "unsupported skills action".
  • Error classification: Added unsupported_skills_action to classify_error_kind() so JSON output surfaces the correct machine-readable kind.
  • Regression test: Added unsupported_skills_actions_return_typed_error_683 which verifies all four forbidden actions error out and are classified correctly.
  • Build fixes: Fixed pre-existing compile errors (stale retry_after field in ApiError, missing Team variant in SlashCommand) so the crate builds.

Verification

cd rust && cargo test -p rusty-claude-cli --bin claw unsupported_skills_actions_return_typed_error_683

Test plan

  1. claw skills remove → exits 1, stderr contains "unsupported skills action: remove", JSON output has kind: "unsupported_skills_action"
  2. claw skills add → same pattern
  3. claw skills uninstall → same pattern
  4. claw skills delete → same pattern
  5. claw skills list / claw skills install ./path / claw skills help → continue to work normally

… exit 1

- Add unsupported skills action guard in parse_args for remove/add/uninstall/delete
- Add unsupported_skills_action to classify_error_kind for structured JSON errors
- Fix pre-existing compile errors (stale retry_after field, missing Team variant)
- Add regression test unsupported_skills_actions_return_typed_error_683
@code-yeongyu code-yeongyu force-pushed the fix-683-unsupported-skills-action branch from 47e9dcb to 99db1be Compare May 25, 2026 02:30
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