Replace guardrail-target commands in claude/skills/#279
Merged
Conversation
The Step 1 example used `pwd | sed 's|/|-|g'` for simple `/` → `-` character translation. `tr` is the dedicated tool for that operation and needs no regex delimiters. This also avoids a self-collision with PreToolUse hooks that soft-deny bare `sed` invocations.
Add an inline note above the `gh api /pulls/N/comments` call in pr-reaction.md explaining that neither the `gh pr-review` extension nor high-level `gh pr` subcommands expose `user.type` on review comments, so the REST API call is the intended path. Without this context, a reader (or a PreToolUse guardrail) sees `gh api` and looks for a replacement that doesn't exist.
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.
Summary
Sweep
claude/skills/for occurrences of Bash commands that the plannedclaude-narrower-bashplugin (see #278) would soft-deny, and either replace them with the narrower dedicated tool or document why the swiss-army form is unavoidable.Motivated by a self-collision this session: the retrospective skill's
SKILL.mdusedpwd | sed 's|/|-|g'and tripped a session-local prototype of the guardrail while running the skill itself.Changes
claude/skills/retrospective/SKILL.md:tris the dedicated tool for single-character translation, needs no regex delimiters, and is the alternative the guardrail's own reason text points to.claude/skills/git-workflow/pr-reaction.md: added an inline note explaining that thegh api /pulls/N/commentscall cannot be replaced. Verified viagh pr view --jsonfield list (no per-line review comments) andgh pr-review review view --help(no flag exposesuser.type). This falls under the guardrail's documented escape hatch for cases where high-levelghcannot express the operation, but a future reader shouldn't have to re-derive that.Verification
pwd | tr '/' '-'produced-Users-ikuwow-dotfiles, matching the transcript directory Claude Code actually writes to.ghtoday:gh pr-review review view --helpexposes no flag foruser.type/ actor kind, andgh pr view --jsonfield list hasreviews/commentsbut nothing that returns per-line review comments with author metadata.Notes
retrospective/analysis.md:156mentionstailin prose. That is documentation text, not a Bash invocation, so no change.Refs: #278 (plugin design), #277 (existing
warn_gh_apihook).