git
Skill0 starsChanged 4 months agoMITView on GitHub
Git workflow conventions: worktrees, commits, rebase, pre-commit hooks, and pushing branches. Use before starting code changes in a repo, and whenever committing, rebasing, or pushing.
- Deletes or force-pushes
- Commits and pushes
57 other projects use a version of this.
Adopted by
Most recently taken up by
- bmcszk/agent-skillstheir own version, first seen Nov 8, 2026
- BridgLabs/opencodereviewtheir own version, first seen Nov 8, 2026
- Conceptual-Machines/magda-coretheir own version, first seen Nov 7, 2026
- tsukhani/jclawtheir own version, first seen Nov 5, 2026
- cekrauseee/harnesstheir own version, first seen Nov 1, 2026
- AnthonyPoschen/agent-skillstheir own version, first seen Nov 1, 2026
Used with
Projects with it also use sql, databases and 8 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 4 projects that use this
mrgoonieSkilldatabases
Work with MongoDB (document database, BSON documents, aggregation pipelines, Atlas cloud) and PostgreSQL (relational database, SQL queries, psql CLI, pgAdmin). Use when designing database schemas, writing queries and aggregations, optimizing indexes for performance, performing database migrations, configuring replication and sharding, implementing backup and restore strategies, managing database users and permissions, analyzing query performance, or administering production databases.
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 4 projects that use this
MicrosoftSkilltypescript
TypeScript best practices for this monorepo. Use this skill when: (1) writing new TypeScript code, (2) reviewing TypeScript code, (3) working with API responses, fetch calls, or JSON parsing, (4) adding or modifying types and interfaces.
Also in 4 projects that use this
VercelSkillreact
React renderer for json-render that turns JSON specs into React components. Use when working with @json-render/react, building React UIs from JSON, creating component catalogs, or rendering AI-generated specs.
Also in 3 projects that use this
Microsoft AzureSkilltest
Also in 8 projects that use this
Other versions57 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 57
- macro-inc/macro★ 6ksame name
- epicenter-md/epicenter★ 4.8ksame name
- EpicenterHQ/epicenter★ 4.8ksame name
- carapace-sh/carapace-bin★ 2ksame name
- LuisaGroup/LuisaCompute★ 1.1ksame name
- kagenti/kagenti★ 303same name
- Conceptual-Machines/magda-core★ 258same name
- typv/nest-turbo-starter★ 224same name
- BridgLabs/opencodereview★ 79same name
- matteing/opal★ 59same name
47 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 repository12 other files it gives its agents.
- englogSkill
- githubSkill
- git-repos-cleanupSkill
- golang-developmentSkill
- pull-requestSkill
- python-developmentSkill
- review-claude-configSkill
- review-claude-settingsSkill
- review-pull-requestSkill
- session-learningsSkill
- triage-dependency-prsSkill
- untracked-secrets-scanSkill
The file
We split this skill into the rules it gives an agent
8 rules. 0 are common, 3 are distinctive, and 5 are very specific to this project.
0
Common
Most of the 51 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 10
Not required for doc-only repos (listed in your user-level CLAUDE.md).
- Very specific: line 12
Run git worktree list at session start, after a summary, and before creating one.
- Very specific: line 14
Create BEFORE any edit, at .worktrees/<name> (name = branch with / → -.
- Very specific: line 15
Run git worktree add from the repo root after an absolute cd, never with -C.
- Distinctive: line 16
If edits already landed in the main checkout: git stash, create the worktree, git stash pop inside it.
- Very specific: line 23
Always Read/Edit/Write through the worktree's absolute path — main-checkout paths edit main silently.
- Very specific: line 25
After merge: git worktree remove .worktrees/<name> && git branch -d <branch>.
- Distinctive: line 41
After resolving conflicts, audit for orphaned files, stale TODOs about merged PRs, and dead imports.
“Common” is measured: kept by at least 6 in 10 of the 51 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 workflow
Worktrees (all code changes)
Not required for doc-only repos (listed in your user-level CLAUDE.md).
- Run
git worktree listat session start, after a summary, and before creating one; reuse what exists. A.worktrees/<name>/.gitpointing nowhere is a dead leftover, safe torm -rf. - Create BEFORE any edit, at
.worktrees/<name>(name = branch with/→-;.worktrees/is globally ignored). Rungit worktree addfrom the repo root after an absolutecd, never with-C. - If edits already landed in the main checkout:
git stash, create the worktree,git stash popinside it. - Start point:
- New branch: local
main(git worktree add .worktrees/fix-foo -b fix/foo main), since it may hold unpushed commits. Ifgit log main..origin/main --onelineshows it's stale,git fetch origin mainand useorigin/main. - Existing remote branch: same local name, e.g.
git worktree add .worktrees/bootstrap-foo -b bootstrap/foo origin/bootstrap/foo.
- New branch: local
- Always Read/Edit/Write through the worktree's absolute path — main-checkout paths edit main silently. Use
git -C <abs path>across Bash calls (CWD persists between calls). - After merge:
git worktree remove .worktrees/<name> && git branch -d <branch>. For repos outside the primary CWD this fails in the sandbox: give the user one! <command>per repo/branch instead of a cleanup script.
Commits
- Imperative, present tense (
add X,fix Y), subject ≤72 chars; body explains WHY if non-obvious. - Branch names: kebab-case, scoped to the change (
fix-release-tag-parsing). - Amending prior work:
fixup!/squash!commits (autosquash = true). - pre-commit must pass; run
pre-commit runif hooks aren't installed. - Formatter hooks (shfmt, black, end-of-file-fixer) fix files in place when they fail the commit:
git addthe reformatted files and retry.
Rebase
- Rebase, never merge commits on feature branches (
pull.rebase = true). - Non-interactive only:
GIT_EDITOR=true git rebase ...(-ihangs,--no-editis invalid for rebase). - After resolving conflicts, audit for orphaned files, stale TODOs about merged PRs, and dead imports.
Pushing
- New branches: explicit refspec
git push -u origin <name>:<name>.push.default=upstreamotherwise targets the start-point branch. Verify withgh api repos/<o>/<r>/branches/<name>, not the push output. - "Bypassed rule violations for refs/heads/
<branch>" in push output means the push landed on a protected branch without review: stop and verify immediately.
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.

