Add git-commit skill definition - #8451
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review infoConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
WalkthroughAdds 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Tip Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
🧹 Nitpick comments (1)
dev/commands/git-commit.md (1)
12-12:git stashis declared inallowed-toolsbut never used in any step.No step in the workflow invokes
git stash. If stash support isn't intentionally reserved for future use, remove it to keep the allowed-tools surface minimal and avoid misleading an agent.🧹 Proposed fix
- Bash(git branch:*) - - Bash(git stash:*) - Bash(git rev-parse:*)🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@dev/commands/git-commit.md` at line 12, The documentation declares "git stash" in the allowed-tools list but no workflow step calls it; remove the unused allowed-tool entry for "git stash" from the allowed-tools section in dev/commands/git-commit.md (search for the literal "git stash" or the Bash(git stash:*) entry) so the allowed-tools surface only contains tools actually invoked by steps and won't mislead agents.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@dev/commands/git-commit.md`:
- Line 149: Fix the typo in the documentation line that currently reads "Never
force push to `stable` or `develop` branche" by changing "branche" to "branches"
so the sentence reads "Never force push to `stable` or `develop` branches";
update the text in dev/commands/git-commit.md where that sentence appears.
- Line 41: Step 2's enumeration of commit types omits "style" causing
inconsistency with the format section; update the sentence that currently lists
"feat, fix, docs, refactor, test, chore" to include "style" so it reads "feat,
fix, docs, style, refactor, test, chore" (refer to the Step 2 instruction and
the format/guidelines references in the same document).
- Around line 64-67: The guide currently instructs to always run "git add -A"
which will stage all changes even when the user intends to use "--amend" only to
change the commit message; update the instructions in dev/commands/git-commit.md
to conditionally run staging: mirror the logic used in step 7 by adding a branch
that runs "git add -A" only when creating a new commit or when amending with new
changes, and explicitly skip running "git add -A" when the user is amending
solely to edit the commit message (i.e., amend-only case).
- Around line 102-105: Add an inline protected-branch guard immediately before
the 'git push --force-with-lease' instruction: detect the current branch (e.g.,
via 'git rev-parse --abbrev-ref HEAD') and if it equals the protected names
'stable' or 'develop', abort and print a clear warning instead of running the
force-push; otherwise continue to run the force-with-lease push. This keeps the
existing guidance but prevents accidental force-pushes to protected branches by
checking the branch name before executing the 'git push --force-with-lease'
step.
---
Nitpick comments:
In `@dev/commands/git-commit.md`:
- Line 12: The documentation declares "git stash" in the allowed-tools list but
no workflow step calls it; remove the unused allowed-tool entry for "git stash"
from the allowed-tools section in dev/commands/git-commit.md (search for the
literal "git stash" or the Bash(git stash:*) entry) so the allowed-tools surface
only contains tools actually invoked by steps and won't mislead agents.
Summary by CodeRabbit