Always invoke this skill for any git-related request (commit messages, staging review, history, PR descriptions, etc.) so git workflows are handled consistently.
80
75%
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
Passed
No known issues
Optimize this skill with Tessl
npx tessl skill review --optimize ./git-workflows/SKILL.mdGenerate comprehensive pull request descriptions by analyzing git state: staged changes, commit history, and diffs between commits or branches.
Use the scripts in scripts/ to extract git data. Do not run raw git diff or git log commands directly — always use these scripts to ensure consistent output and exclude patterns.
scripts/git-diff.sh <ancestor> # Diff between ancestor and HEAD
scripts/git-cached-diff.sh # Staged (cached) changes
scripts/git-unstaged-diff.sh # Unstaged changes (working tree vs index)
scripts/git-commit-messages.sh <ancestor> # Commit messages from ancestor to HEADScripts must be run from the skill directory, or invoked with their full path relative to the repository root (e.g., git-workflows/scripts/git-diff.sh main).
Exclude patterns: Files matching patterns in scripts/excludes.conf are excluded from diff output. Set the GIT_SKILL_EXCLUDES env variable (colon-separated patterns) to override.
references/general_code_review_guidelines.md for the general guidelines.references/python_code_review_guidelines.md if you are reviewing Python code.references/rust_code_review_guidelines.md if you are reviewing Rust code.references/auto_commit_workflow.md for the grouping algorithm and step-by-step process.Read the appropriate reference files for code review tasks (see Building Blocks above) before proceeding. Then choose the appropriate sub-operation based on the user's request:
Review modifications that have been staged (added to the index) but not yet committed:
scripts/git-cached-diff.shReview modifications in the working directory that have not yet been staged:
scripts/git-unstaged-diff.shReview the diff introduced between any two commits, branches, or refs:
HEAD~3 and HEAD, or main and a feature branch).scripts/git-diff.sh <base-ref> (compares base-ref to HEAD).scripts/git-commit-messages.sh <base-ref> to understand the intent behind the changes.Present findings clearly, distinguishing between blocking issues and optional suggestions.
Extract commit messages to understand the history:
scripts/git-commit-messages.sh <commit-or-branch>
Returns commit hashes and messages, useful for:
Create a descriptive commit message based on staged changes through an iterative review process:
references/general_code_review_guidelines.md (and any language-specific guidelines), then perform a code review using the process described in the "1a. Review Staged Changes" section.scripts/git-commit-messages.sh HEAD~3) to ensure historical context.{cwd}/cache/commit_message.txt in the conventional commit format ({cwd} is the directory in which the agent was invoked; first remove the file if it already exists, then write to it):
<type>(<scope>): <subject>
<body>
Commit message generated by <your name><harness name> (<model name>) (e.g., Claude Code (Sonnet 4.6))Use the diff and recent commits to compose a structured PR body:
origin/main).Format suggestions:
## Summary
[Commit-driven overview]
## Key Changes
- `[File]`: [Primary modification]
- ...origin/main or main).scripts/git-diff.sh origin/main and scripts/git-commit-messages.sh origin/main to gather the data.Automatically analyze, group, and commit unstaged changes into organized conventional commits.
Read references/auto_commit_workflow.md for the full workflow. Summary:
If a script fails:
chmod +x scripts/*.sh)348c2c1
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.