agentleFS
bntvllntbntvllnt/agent-skills/git/SKILL.md

git

Skill16 starsChanged 8 months agoMITView on GitHub

Unified git workflow for branch-first development: status/diff review, security-first commits, worktrees, and PR creation/review via gh. Auto-activates on: "commit", "push", "branch", "worktree", "pr", "pull request", "merge", "rebase", "git".

  • Commits and pushes

57 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use sql, databases and 9 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.
  • thechandanbhagatSkill

    sql

    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

  • mrgoonieSkill

    databases

    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

  • mrgoonieSkill

    devops

    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

  • MicrosoftSkill

    typescript

    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

  • VercelSkill

    react

    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 AzureSkill

    test

    Also in 8 projects that use this

The file

We split this skill into the rules it gives an agent

10 rules. 0 are common, 7 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 51 edited versions we read keep these.

  • 7

    Distinctive

    This author's own choices. Worth a look.

  • 3

    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
  1. Distinctive:

    Use the smallest workflow that matches the user intent.

    line 19
  2. Very specific:

    If you want a different location (e.g.

    line 46
  3. Very specific:

    If multiple worktree root folders are detected (example: both ./.worktrees/ and ../repo-feature-x/ exist), do not delete anything by …

    line 50
  4. Very specific:

    Prefer consolidating into WORKTREES_DIR using git worktree move (when possible) or a remove+re-add plan.

    line 51
  5. Distinctive:

    If stale metadata exists, propose a cleanup plan: git worktree prune + remove/quarantine orphan directories (with confirmation).

    line 52
  6. Distinctive:

    Never force push to main/master.

    line 56
  7. Distinctive:

    Never commit secrets (env files, keys, credentials).

    line 57
  8. Distinctive:

    Never rewrite history that is already pushed unless explicitly requested.

    line 58
  9. Distinctive:

    Always show what will change before an irreversible action.

    line 59
  10. Distinctive:

    Read-only commands are always OK.

    line 63

“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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Git

Clear, repeatable git workflow with a bias toward safety.

Router

Use the smallest workflow that matches the user intent.

User saysLoad referenceDo
status / what changed (no "worktree" prefix)references/read-only.mdread-only inspection
help / usage / manreferences/cli-help.mdshow CLI help safely
commit / stagereferences/commit-workflow.mdstage + commit safely
branch / switchreferences/branch-workflow.mdbranch operations
worktree create/remove/listreferences/worktree-workflow.mdworktree operations
worktree cleanup / normalize / consolidatereferences/worktree-maintenance.mdauto-clean + consolidate worktrees
worktree summary / worktree status / show worktreesreferences/worktree-summary.mdproactive analysis: PR status, change classification, safe-to-delete verdicts
tag / versionreferences/tag-workflow.mdcreate/list/inspect tags
pr / pull requestreferences/pr-workflow.mdcreate/update PR via gh
pr review / fix pr comments / threadsreferences/pr-review-workflow.mdreview + respond + fix
merge / rebase / reset / revertreferences/advanced-workflows.mdadvanced/recovery (confirm first)

Config (Edit Here)

Worktree working directories (the folders you cd into) live outside .git/.

Set this once and use it everywhere:

WORKTREES_DIR=./.worktrees
WORKTREE_PATH=$WORKTREES_DIR/<topic>

If you want a different location (e.g. ../.worktrees or ~/worktrees/<repo>), update WORKTREES_DIR above and follow the same shape in references/worktree-workflow.md.

Resilience Rules (Worktrees)

  • If multiple worktree root folders are detected (example: both ./.worktrees/ and ../repo-feature-x/ exist), do not delete anything by default.
  • Prefer consolidating into WORKTREES_DIR using git worktree move (when possible) or a remove+re-add plan.
  • If stale metadata exists, propose a cleanup plan: git worktree prune + remove/quarantine orphan directories (with confirmation).

Global Safety Rules (Never Violate)

  • Never force push to main/master.
  • Never commit secrets (env files, keys, credentials).
  • Never rewrite history that is already pushed unless explicitly requested.
  • Always show what will change before an irreversible action.

Confirmation Policy

Read-only commands are always OK.

Everything that changes state/history/remote requires explicit user confirmation:

  • git add, git commit, git push
  • git merge, git rebase, git reset, git revert
  • git worktree add, git worktree remove
  • git tag (create/delete)
  • git branch -d/-D

Quick Start

# Read-only
git status
git diff

# Commit
git diff --cached
git commit -m "feat(scope): why"

# Worktrees
git worktree list

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.