feat: add claude-scope Claude Code skill (#139)#142
Merged
Conversation
A Claude Code skill that wraps the existing `claude-scope-cli` binary so Claude can view and move Claude Code permission rules between settings scopes in conversation, without alt-tabbing to the GUI. No bundled wrapper scripts — the CLI's `--json` output is already machine-readable and Claude parses JSON natively, so the skill is SKILL.md instructions only. The skill's safety protocol mirrors the GUI's confirm modal: always run `move --dry-run` first, show the preview, get explicit confirmation, then apply. Lives in `skill/` at the repo root (per the #13 discussion) so the skill and the CLI it targets stay in lockstep on argument shape. `skill/README.md` covers the `cargo install` prerequisite and how to install the skill into `~/.claude/skills/`. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #139.
Summary
skill/claude-scope/SKILL.mdthat wraps the existingclaude-scope-clibinary — lets Claude view and move Claude Code permission rules between settings scopes in conversation.--jsonoutput is already machine-readable; the skill is SKILL.md instructions only. Less surface to maintain, no duplication of the CLI's arg shape.move --dry-runfirst, shows the preview, requires explicit confirmation, then applies — mirroring the GUI's confirm modal. The CLI independently refuses bad writes regardless of caller.skill/README.mddocuments thecargo installprerequisite and how to install the skill into~/.claude/skills/.Context
This is Layer 2 of the now-split #13. Layer 1 (the CLI) was already shipped; #13 was closed and split into #139 (this), #140 (
move-key), #141 (doctor).Verification
Smoke-tested every command the SKILL.md tells Claude to use, against the real repo:
version --json,scopes --json,list-rules --json,show --effective --json— all produce the documented JSON.move … --dry-run --json— produces the preview, exits 0, writes nothing (confirmed the source rule still present afterward).error: …on stderr, as the SKILL.md's "Exit codes" section documents.Test plan
cp -r skill/claude-scope ~/.claude/skills/), start a fresh Claude Code session, ask it to move a permission rule — confirm it triggers, dry-runs first, and waits for confirmation before applying.Notes
The repo
README.md/ mdbook could get a pointer toskill/in a follow-up doc sync — left out here to keep this PR focused.🤖 Generated with Claude Code