Skip to content

Fix skills subcommand JSON help dispatch#2945

Open
Yeachan-Heo wants to merge 1 commit intoultraworkers:mainfrom
Yeachan-Heo:fix/skills-subcommand-help-json
Open

Fix skills subcommand JSON help dispatch#2945
Yeachan-Heo wants to merge 1 commit intoultraworkers:mainfrom
Yeachan-Heo:fix/skills-subcommand-help-json

Conversation

@Yeachan-Heo
Copy link
Copy Markdown
Contributor

Summary

  • Keep claw skills <subcommand> --help --output-format json on the local skills help path instead of prompt/runtime invocation
  • Preserve skills help <topic> skill invocation behavior
  • Add regression coverage for list/install/show/missing-skill JSON help

Tests

  • cargo fmt
  • cargo test -p rusty-claude-cli skills_subcommand_help_json_is_bounded_and_static
  • cargo test -p rusty-claude-cli removed_login_and_logout_subcommands_error_helpfully
  • cargo test -p rusty-claude-cli parses_json_output_for_mcp_and_skills_commands
  • cargo test -p rusty-claude-cli --test output_format_contract

Reproduction

  • Before: timeout --kill-after=1s 8s cargo run --quiet --bin claw -- skills list --help --output-format json exited 124 with empty stdout/stderr in this fresh worktree while the binary built.
  • After build: timeout --kill-after=1s 8s ./target/debug/claw skills list --help --output-format json exits 0 with bounded skills help JSON.

@Yeachan-Heo
Copy link
Copy Markdown
Contributor Author

OMX review verdict: APPROVE, with owner-confirmation gate before merge.

Reviewed exact PR diff and runtime behavior:

  • Changed files:
    • rust/crates/commands/src/lib.rs
    • rust/crates/rusty-claude-cli/src/main.rs
    • rust/crates/rusty-claude-cli/tests/output_format_contract.rs
  • PR head reviewed: 003b739db4f4b4846c86d55ec8e2989cc6084abf
  • GitHub state: MERGEABLE / CLEAN
  • CI: cargo fmt, cargo test --workspace, cargo clippy --workspace, docs source-of-truth all passing

Local verification passed:

git diff --check origin/main...pr-2945
cd rust && cargo fmt --all -- --check
cd rust && cargo test -p rusty-claude-cli skills_subcommand_help_json_is_bounded_and_static
cd rust && cargo test -p rusty-claude-cli removed_login_and_logout_subcommands_error_helpfully
cd rust && cargo test -p rusty-claude-cli parses_json_output_for_mcp_and_skills_commands
cd rust && cargo test -p rusty-claude-cli --test output_format_contract
cd rust && cargo test -p commands accepts_skills_invocation_arguments_for_prompt_dispatch

Manual CLI checks also passed with exit 0, JSON stdout, and empty stderr:

./target/debug/claw skills list --help --output-format json
./target/debug/claw skills install --help --output-format json
./target/debug/claw skills show --help --output-format json
./target/debug/claw skills missing-skill --help --output-format json

Risk: low. The implementation is small and well covered.

Important merge gate: this changes user-facing CLI/help/JSON dispatch semantics. Specifically, any claw skills ... --help form is now treated as local skills help instead of falling through to prompt/runtime invocation. That matches normal CLI help expectations and fixes the bounded JSON help contract, but it is still a user-facing contract surface. Per repo-owner operating rules, merge should wait for explicit owner confirmation.


[repo owner's gaebal-gajae (clawdbot) 🦞]

@Yeachan-Heo
Copy link
Copy Markdown
Contributor Author

Review verdict: APPROVE

Reviewed PR #2945 against current origin/main.

  • Head SHA: 003b739d
  • Current origin/main: 8e45f185
  • GitHub mergeability: MERGEABLE / CLEAN
  • Local merge check against current main: clean, no conflicts

Changed files:

  • rust/crates/commands/src/lib.rs
  • rust/crates/rusty-claude-cli/src/main.rs
  • rust/crates/rusty-claude-cli/tests/output_format_contract.rs

Main behavior reviewed:

  • classify_skills_slash_command() now treats skills args containing -h or --help as local SkillSlashDispatch::Local, instead of falling through toward skill prompt/runtime invocation.
  • Forms like claw skills show --help --output-format json and claw skills missing-skill --help --output-format json now stay bounded/local and return static skills help JSON, e.g. { kind:"skills", action:"help", unexpected:"show", usage:{...} }.
  • claw skills help overview still invokes $help overview, as covered by tests.

CI is green: cargo test, clippy, fmt, and docs source-of-truth all pass.

Targeted local checks passed:

  • cargo test -p rusty-claude-cli removed_login_and_logout_subcommands_error_helpfully -- --nocapture
  • cargo test -p rusty-claude-cli --test output_format_contract skills_subcommand_help_json_is_bounded_and_static -- --nocapture
  • direct smoke checks for skills show --help --output-format json and skills list --help --output-format json
  • git diff --check origin/main...HEAD
  • cargo fmt --all -- --check
  • cargo test -p rusty-claude-cli parses_json_output_for_mcp_and_skills_commands -- --nocapture
  • cargo test -p rusty-claude-cli --test output_format_contract -- --nocapture
  • cargo test -p commands accepts_skills_invocation_arguments_for_prompt_dispatch -- --nocapture
  • merge-check worktree against current main plus targeted output_format_contract test after merge

Blockers: no code blockers found.

Merge risk: LOW technically.

Process gate: owner confirmation required before merge because this changes user-facing CLI/help/JSON dispatch semantics.


[repo owner's gaebal-gajae (clawdbot) 🦞]

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