git
Skill0 starsChanged 2 months agoMITView on GitHub
Project-aware git workflow: conventional commits, PR creation, safe pushes, PR merges, and branch naming suggestions. Triggers on: "conventional commit", "create PR", "push changes".
- Reads credentials
- Deletes or force-pushes
- Commits and pushes
37 other projects use a version of this.
Adopted by
Most recently taken up by
- tsukhani/jclawtheir own version, first seen Oct 5, 2026
- ROCm/rocprofiler-systems-skillstheir own version, first seen Sep 30, 2026
- Conceptual-Machines/magda-coretheir own version, first seen Sep 28, 2026
- therealtinhtute/mono-harnesstheir own version, first seen Sep 27, 2026
- iuliandita/skillstheir own version, first seen Sep 24, 2026
- wangqiqi/cursor-aitheir own version, first seen Sep 23, 2026
Used with
Projects with it also use sql, api and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
thechandanbhagatSkillsql
Write SQL queries, optimize database performance, design schemas, and debug SQL issues. Use for database operations, query optimization, and schema design.
Also in 3 projects that use this
xiaobei930Skillapi
RESTful API design patterns and best practices. Use when creating endpoints, designing APIs, or implementing routes.
Also in 3 projects that use this
MicrosoftSkillscaffold
Also in 4 projects that use this
MicrosoftSkillperf
Speed and memory performance rules for Rust crates, the Node addon, webui-framework, and webui-router.
Also in 3 projects that use this
mrgoonieSkilldevops
Deploy to Cloudflare (Workers, R2, D1), Docker, GCP (Cloud Run, GKE), Kubernetes (kubectl, Helm). Use for serverless, containers, CI/CD, GitOps, security audit.
Also in 3 projects that use this
AnthropicSkilldebug
Structured debugging session — reproduce, isolate, diagnose, and fix. Trigger with an error message or stack trace, "this works in staging but not prod", "something broke after the deploy", or when behavior diverges from expected and the cause isn't obvious.
Also in 7 projects that use this
Other versions37 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 37
- Conceptual-Machines/magda-core★ 229same name
- Rune-kit/rune★ 88same name
- matteing/opal★ 61same name
- maragudk/skills★ 49same name
- xiaobei930/cc-best★ 48same name
- BULDEE/ai-craftsman-superpowers★ 35same name
- hyperb1iss/hyperskills★ 35same name
- tsukhani/jclaw★ 19same name
- jmylchreest/aide★ 18same name
- cfircoo/claude-code-toolkit★ 17same name
27 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository48 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- changelogSkill
- dependabot-sweepSkill
- markdownSkill
- merge-prSkill
- pre-prSkill
- pr-tldrSkill
- tldrSkill
- agents-searchSkill
- audit-and-fixSkill
- aws-specialistSkill
- azure-specialistSkill
- code-simplifierSkill
- create-assessmentSkill
- create-auditSkill
- create-experimentSkill
- create-inspectionSkill
- crossplane-specialistSkill
- deploy-statusSkill
- detect-flakySkill
- fix-with-evidenceSkill
- flyctlSkill
- gcp-specialistSkill
- ground-firstSkill
- handoffSkill
- kubernetes-specialistSkill
- local-attestSkill
- plan-graderSkill
- post-pr-reviewSkill
- pr-conductorSkill
- project-syncSkill
- pulumi-specialistSkill
- quality-reviewSkill
- release-conductorSkill
- reproduce-bugSkill
- review-prSkill
- review-prsSkill
- rollback-prodSkill
- security-auditSkill
- security-reviewSkill
- smoke-testSkill
- specSkill
- terraform-specialistSkill
- terragrunt-specialistSkill
- validate-specSkill
- veracity-auditSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
13 rules. 0 are common, 11 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 29 edited versions we read keep these.
11
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 39
When invoked without a subcommand, execute this workflow:
- Distinctive: line 51
Read the diff to understand:
- Distinctive: line 59
Prefer staging specific files by name rather than git add .
- Distinctive: line 63
Use Conventional Commits format:
- Distinctive: line 152
If git diff shows unrelated changes, warn:
- Distinctive: line 164
If the user confirms, use a multi-line commit body that lists each concern.
- Distinctive: line 181
If merge conflicts occur, report them and do NOT auto-resolve.
- Distinctive: line 182
If the working directory is dirty, warn and abort.
- Distinctive: line 183
If the repo has an explicit rule against committing on main directly (e.g., CLAUDE.md requiring worktrees or PRs), stop and escalate.
- Distinctive: line 235
Create a PR with an auto-generated description.
- Very specific: line 248
Use conventional-commit style: <type>(<scope>): <subject>.
- Very specific: line 309
Never commit secrets: Check for .env, credentials, API keys, tokens in staged files before each commit.
- Distinctive: line 314
Respect project rules: If the repo's CLAUDE.md or equivalent forbids committing on main, or requires worktrees, or demands a PR, follow …
“Common” is measured: kept by at least 6 in 10 of the 29 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
/git
A project-aware git workflow command: craft conventional commits, create PRs, push with the right safety rails, merge into main, and suggest branch names.
Your Domain
| Component | Responsibility |
| Commits | Craft precise, conventional commit messages |
| Staging | Smart git add with awareness of what changed |
| PRs | Generate PR descriptions with /git pr |
| Branches | Branch suggestions with /git suggest |
| Merging | Merge to main with /git main |
| Pushing | Smart push with /git push |
| History | Log analysis, blame, bisect |
Primary Command: Auto-Commit
When invoked without a subcommand, execute this workflow:
Step 1: Analyze Changes
git status --porcelain
git diff --stat
git diff --cached --statStep 2: Understand the Changes
Read the diff to understand:
- What files changed (which area: app code, docs, tests, infra)
- Why they changed (feature, fix, refactor, docs, test, chore)
- Scope of change (single file, single feature, multiple concerns)
Step 3: Stage
Prefer staging specific files by name rather than git add . or git add -A. Only stage what's part of this logical change. If there are unrelated pending changes, surface them and ask.
Step 4: Craft Commit Message
Use Conventional Commits format:
<type>(<scope>): <subject>
[optional body]
[optional footer]Types
| Type | When to Use |
feat | New feature or capability |
fix | Bug fix |
refactor | Code change that neither fixes nor adds |
docs | Documentation only |
test | Adding or updating tests |
chore | Maintenance, deps, config |
style | Formatting, whitespace (no logic change) |
perf | Performance improvement |
ci | CI / workflow changes |
Scopes
Infer the scope from the top-level directory or domain concept touched (e.g., api, frontend, config, docs, deps). If the repo has a CLAUDE.md or CONTRIBUTING.md section listing allowed scopes, follow that. Otherwise, a short area tag is fine.
Subject Rules
- Imperative mood: "add feature" not "added feature"
- No period at the end
- ≤72 characters for the subject line (50 preferred)
- Lowercase first letter
Step 5: Execute Commit
git commit -m "<crafted message>"Step 6: Confirm
Output:
Committed: <hash>
Message: <type>(<scope>): <subject>
Files: <count> changedMessage Crafting Examples
Single File Change
git commit -m "feat(config): add staging environment configuration"Multiple Related Files
git commit -m "feat(api): implement user profile endpoint"Bug Fix
git commit -m "fix(storage): ensure timestamps use timezone-aware UTC"Documentation
git commit -m "docs: mark Phase 2 as complete"Refactor
git commit -m "refactor(config): extract resolver helper function"Multi-Concern Detection
If git diff shows unrelated changes, warn:
Detected multiple unrelated changes:
- <file-a> (bug fix)
- <file-b> (docs update)
Recommendation: commit separately for clean history.
Proceed with combined commit? [y/N]If the user confirms, use a multi-line commit body that lists each concern.
Action: /git main
Checkout main and merge the previous branch into it.
PREVIOUS_BRANCH=$(git branch --show-current)
git checkout main
git pull origin main
git merge "$PREVIOUS_BRANCH"Error handling:
- If merge conflicts occur, report them and do NOT auto-resolve.
- If the working directory is dirty, warn and abort.
- If the repo has an explicit rule against committing on main directly (e.g., CLAUDE.md requiring worktrees or PRs), stop and escalate.
Action: /git push
Push the current branch, using --force-with-lease when history has diverged (post-rebase or post-amend).
BRANCH=$(git branch --show-current)
git fetch origin
LOCAL=$(git rev-parse @)
REMOTE=$(git rev-parse @{u} 2>/dev/null || echo "none")
BASE=$(git merge-base @ @{u} 2>/dev/null || echo "none")
if [ "$REMOTE" = "none" ]; then
git push -u origin "$BRANCH"
elif [ "$LOCAL" = "$REMOTE" ]; then
echo "Already up to date with remote"
elif [ "$BASE" = "$REMOTE" ]; then
git push origin "$BRANCH"
else
echo "Branch has diverged from remote, using --force-with-lease"
git push --force-with-lease origin "$BRANCH"
fiSafety rules:
- Never
--forcewithout--with-lease. - Never force push
mainormasterwithout explicit user confirmation. - Warn if pushing to a protected branch.
Action: /git main push
Combined: merge into main, then push main.
PREVIOUS_BRANCH=$(git branch --show-current)
git checkout main
git pull origin main
git merge "$PREVIOUS_BRANCH"
git push origin mainAction: /git pr
Create a PR with an auto-generated description.
git push -u origin "$(git branch --show-current)"
BRANCH=$(git branch --show-current)
BASE="main"
git log "$BASE..$BRANCH" --oneline
git diff "$BASE...$BRANCH" --stat
gh pr create --title "<generated-title>" --body "<generated-body>"Title rules:
- Use conventional-commit style:
<type>(<scope>): <subject>. - Derive from branch name or most significant commit.
Body template:
## Summary
<2-3 bullets describing what this PR does>
## Changes
<List of key files or areas modified>
## Testing
- [ ] Unit tests pass (<detected test command, e.g. `npm test`, `pytest`, `go test ./...`>)
- [ ] Manual verification completed
- [ ] No regressions introduced
## Related
- Closes #<issue> (if applicable)
- Part of: <milestone> (if applicable)Action: /git suggest
Suggest a branch name for the next unit of work.
- Scan planning documents for next incomplete tasks. Common locations:
docs/roadmap.md,docs/plans/*.md,TODO.md, or GitHub issues viagh issue list --state=open. - Identify the next task by looking for:
- Items marked
[ ]following items marked[x] - Phase/milestone boundaries
- Priority indicators
- Items marked
- Generate a branch name using:
<type>/<scope>-<short-description>| Type | Usage |
feat/ | New features |
fix/ | Bug fixes |
refactor/ | Code restructuring |
docs/ | Documentation updates |
test/ | Test additions |
chore/ | Maintenance tasks |
ci/ | CI/workflow changes |
Scope should match the area conventions used in this repo (detect from recent branch names or CLAUDE.md).
Hard Rules
- Never commit secrets. Check for
.env, credentials, API keys, tokens in staged files before each commit. - Never force push main or master without explicit confirmation.
- Conventional commits format, always.
- Atomic commits. One logical change per commit where possible.
- Imperative mood in subjects ("add" not "added").
- Respect project rules. If the repo's CLAUDE.md or equivalent forbids committing on main, or requires worktrees, or demands a PR, follow that over this command's default flow.
Quick Reference
/git # stage + commit with crafted message
/git main # merge current branch into main
/git push # push current branch (with --force-with-lease when diverged)
/git main push # merge into main AND push
/git pr # create a PR with auto-generated description
/git suggest # suggest next branch name from planning docsSafety Checks (always run before committing)
# Potential secrets
git diff --cached | grep -iE "(api_key|secret|password|token|bearer|ghp_|sk-[A-Za-z0-9]{20,})" && echo "SECRETS SUSPECTED"
# Large additions
git diff --cached --stat | grep -E "\+[0-9]{4,}" && echo "Large addition detected"
# Binary blobs
git diff --cached --numstat | grep "^-" && echo "Binary file detected"Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

