git-workflows/SKILL.md
Always invoke this skill for any git-related request (commit messages, staging review, history, PR descriptions, etc.) so git workflows are handled consistently.
npx skillsauth add ceshine/ceshine-agent-skills git-workflowsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Generate 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 [repo-root] <ancestor> # Diff between ancestor and HEAD
scripts/git-cached-diff.sh [repo-root] # Staged (cached) changes
scripts/git-unstaged-diff.sh [repo-root] # Unstaged changes (working tree vs index)
scripts/git-commit-messages.sh [repo-root] <ancestor> # Commit messages from ancestor to HEAD
Always provide the target Git repository root explicitly. Every script accepts an optional first argument that specifies the root directory of the target Git repository. When omitted it defaults to the current working directory — but relying on the default is error-prone because the agent may be cd'd into the skill directory or another unrelated location. Pass the repository root explicitly to guarantee the scripts operate on the correct repo. The argument is validated with git rev-parse --git-dir; if a path is provided but is not a valid Git repository, the script will exit with an error rather than silently falling back to .:
scripts/git-diff.sh /path/to/repo main
# NOT: cd /path/to/repo && scripts/git-diff.sh main (avoids wrong-cwd bugs)
Scripts are resolved relative to this skill file's directory. Always use the absolute path of the skill directory when invoking them (e.g., <skill-dir>/scripts/git-diff.sh — the agent knows <skill-dir> as the directory containing SKILL.md).
All scripts source common.sh, which provides the parse_repo_root helper for validating and extracting the optional repo-root argument, as well as build_exclude_args for pathspec exclusions.
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.sh <repo-root> (where <repo-root> is the absolute path to the target repository)Review modifications in the working directory that have not yet been staged:
scripts/git-unstaged-diff.sh <repo-root>Review the diff introduced between any two commits, branches, or refs:
HEAD~3 and HEAD, or main and a feature branch).scripts/git-diff.sh <repo-root> <base-ref> (compares base-ref to HEAD).scripts/git-commit-messages.sh <repo-root> <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 <repo-root> <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 <repo-root> 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 <repo-root> origin/main and scripts/git-commit-messages.sh <repo-root> 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:
<repo-root> argument points to a valid Git repository (git -C <repo-root> rev-parse --git-dir)chmod +x scripts/*.sh)tools
Fetch transcripts and create structured watching guides / summaries for YouTube videos. Use when the user asks to (1) get, fetch, extract, or download a transcript or captions from a YouTube video URL, or (2) summarize, create a watching guide, or produce a structured summary of a YouTube video. Trigger on youtube.com/watch, youtu.be, or youtube.com/shorts links.
tools
Run Google searches and fetch JS-rendered web pages as Markdown via `google-search-cli`, a Patchright-based CLI invoked through `uvx` from its GitHub repo (no local install needed). Use when the agent needs (1) fresh Google search results from a query, (2) the Markdown of a URL that plain HTTP fetch (curl/WebFetch) cannot render because it requires JavaScript or evades bots, or (3) inspection of the raw HTML of a Google results page. Trigger phrases include "google for ...", "search the web for ...", "fetch this page as markdown", "this page needs JS to render". Do not use for static doc URLs that WebFetch handles cleanly, or when Chromium cannot be installed on the machine.
tools
Always use this skill at the beginning of a session. It establishes how to find and use skills, and requires relevant Skill tool invocation before ANY response including clarifying questions
tools
Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends the agent's capabilities with specialized knowledge, workflows, or tool integrations.