Skip to content

fix(uninstall): keep --json from bypassing dirty-repo protection #242

Closed

Description

@hhh2210

Problem

skillshare uninstall <tracked-repo> --json currently sets force=true internally. As a result, asking for structured output also bypasses the tracked repository check for uncommitted changes.

Reproduction:

skillshare install owner/repo --track
touch ~/.config/skillshare/skills/_repo/local-change
skillshare uninstall repo --json

The command moves the dirty repository to trash without requiring an explicit --force.

Expected behavior

--json should suppress confirmation prompts and return structured output, but it should not weaken the dirty repository guard. A dirty tracked repository should produce a JSON error unless the caller also passes --force.

Clean repositories should remain non-interactive with --json, and --json --force should preserve the current forced behavior.

Proposed scope

  • Stop treating --json as implicit --force for uninstall.
  • Keep JSON mode non-interactive.
  • Add coverage for dirty tracked repositories in JSON mode.
  • Update the uninstall help and reference documentation.

This report covers global skill uninstall. Project skill and agent JSON behavior are separate concerns.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions