From 26e0f5f3b4d52d87cdcfed19abefd7ffacb92bb1 Mon Sep 17 00:00:00 2001 From: Josh Ferge Date: Thu, 19 Feb 2026 17:00:51 -0500 Subject: [PATCH] fix(create-pr): Split compound shell command into parseable steps Replace the BASE=$(...) shell substitution with a standalone gh repo view command so Claude Code can parse and pattern-match it for permission allow-listing. Subsequent git commands now use a placeholder (BASE) that the agent substitutes with the actual branch name, keeping each command clean and individually allowable. Co-Authored-By: Claude --- plugins/sentry-skills/skills/create-pr/SKILL.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/plugins/sentry-skills/skills/create-pr/SKILL.md b/plugins/sentry-skills/skills/create-pr/SKILL.md index 4c90003..3bf7345 100644 --- a/plugins/sentry-skills/skills/create-pr/SKILL.md +++ b/plugins/sentry-skills/skills/create-pr/SKILL.md @@ -25,12 +25,14 @@ If the output shows any uncommitted changes (modified, added, or untracked files ### Step 1: Verify Branch State ```bash -# Detect the default branch -BASE=$(gh repo view --json defaultBranchRef --jq '.defaultBranchRef.name') +# Detect the default branch — note the output for use in subsequent commands +gh repo view --json defaultBranchRef --jq '.defaultBranchRef.name' +``` -# Check current branch and status +```bash +# Check current branch and status (substitute the detected branch name above for BASE) git status -git log $BASE..HEAD --oneline +git log BASE..HEAD --oneline ``` Ensure: @@ -43,11 +45,11 @@ Ensure: Review what will be included in the PR: ```bash -# See all commits that will be in the PR -git log $BASE..HEAD +# See all commits that will be in the PR (substitute detected branch name for BASE) +git log BASE..HEAD # See the full diff -git diff $BASE...HEAD +git diff BASE...HEAD ``` Understand the scope and purpose of all changes before writing the description.