Skip to content

fix(skills): grant the -C form and stop routing the root through a va… - #256

Merged
mergify[bot] merged 1 commit into
mainfrom
fix/skill-allowed-tools
Jul 29, 2026
Merged

fix(skills): grant the -C form and stop routing the root through a va…#256
mergify[bot] merged 1 commit into
mainfrom
fix/skill-allowed-tools

Conversation

@Liu233w

@Liu233w Liu233w commented Jul 28, 2026

Copy link
Copy Markdown
Owner

…riable

Pinning git -C deadened every permission grant in this skill's own frontmatter. Bash rules match on command prefix, so git -C <root> status --short does not begin with git status, and the six Bash(git …:*) entries stopped matching the moment the pin landed — every state-gathering command now prompts. Adds Bash(git -C:*), plus the commands the body actually prescribes and the earlier list omitted: show, rebase, checkout, reset, rev-list for the squash and verification flows, cp for fixup scoping, and ./doit.sh for the per-commit checks.

python3 and sed stay unlisted on purpose. Both appear in the body, but pre-approving arbitrary code execution for the whole turn is a bad trade in a commit skill; the prompt is proportionate friction.

Resolving the root from the skill's base dir is right — a literal breaks under worktrees — but carrying it in ROOT= is not: shell state does not persist between tool calls, and three independent read commands are exactly what gets split into parallel calls. $ROOT is then empty and git -C "" falls back to the drifted cwd, reinstating the bug the pin exists to prevent while looking defended against it. The resolved path is now substituted into each command directly.

…riable

Pinning `git -C` deadened every permission grant in this skill's own frontmatter.
Bash rules match on command prefix, so `git -C <root> status --short` does not
begin with `git status`, and the six `Bash(git …:*)` entries stopped matching the
moment the pin landed — every state-gathering command now prompts. Adds
`Bash(git -C:*)`, plus the commands the body actually prescribes and the earlier
list omitted: show, rebase, checkout, reset, rev-list for the squash and
verification flows, cp for fixup scoping, and ./doit.sh for the per-commit checks.

`python3` and `sed` stay unlisted on purpose. Both appear in the body, but
pre-approving arbitrary code execution for the whole turn is a bad trade in a
commit skill; the prompt is proportionate friction.

Resolving the root from the skill's base dir is right — a literal breaks under
worktrees — but carrying it in `ROOT=` is not: shell state does not persist between
tool calls, and three independent read commands are exactly what gets split into
parallel calls. `$ROOT` is then empty and `git -C ""` falls back to the drifted
cwd, reinstating the bug the pin exists to prevent while looking defended against
it. The resolved path is now substituted into each command directly.
@mergify

mergify Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Queued — the merge queue status continues in this comment ↓.

@mergify mergify Bot added the queued label Jul 28, 2026
@mergify

mergify Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Merge Queue Status

This pull request spent 3 minutes 49 seconds in the queue, including 3 minutes 33 seconds running CI.

Waiting for
  • check-success=validate
All conditions

Reason

The merge conditions cannot be satisfied due to failing checks

  • validate

Failing checks:

Hint

You may have to fix your CI before adding the pull request to the queue again.
If you update this pull request, to fix the CI, it will automatically be requeued once the queue conditions match again.
If you think this was a flaky issue instead, you can requeue the pull request, without updating it, by posting a @mergifyio queue comment.

Requeued — the merge queue status continues in this comment ↓.

@mergify

mergify Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Merge Queue Status

This pull request spent 3 minutes 29 seconds in the queue, including 3 minutes 9 seconds running CI.

Required conditions to merge

@mergify mergify Bot added the queued label Jul 29, 2026
@mergify mergify Bot removed the dequeued label Jul 29, 2026
@mergify
mergify Bot merged commit 7d51919 into main Jul 29, 2026
10 checks passed
@mergify
mergify Bot deleted the fix/skill-allowed-tools branch July 29, 2026 00:50
@mergify mergify Bot removed the queued label Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant