agentleFS
base58edbase58ed/claude_code_files/skills/git-skill/SKILL.md

git

Skill1 starsChanged 3 months agoMITView on GitHub

Git commit, push, and repo operations. ALWAYS load this skill before any git commit, git push, PR creation, branch management, or any operation that modifies git history. This overrides default git behavior — particularly commit message formatting and co-authorship.

  • Reads credentials
  • 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 databases, devops 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.
  • 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

  • Microsoft AzureSkill

    test

    Also in 8 projects that use this

  • NVIDIASkill

    github

    Interact with GitHub using the gh CLI restricted to REST API only (no GraphQL). Use when the user wants to work with GitHub issues, pull requests, repos, releases, or Actions — especially in sandboxed environments where the GraphQL endpoint may be blocked. Trigger keywords - github, gh, pull request, PR, github issue, github actions, workflow, release, gh api.

    Also in 6 projects that use this

  • nicolasestremSkill

    document

    Create focused documentation for specific components or features

    Also in 3 projects that use this

The file

Show its rules and text

We split this skill into the rules it gives an agent

15 rules. 0 are common, 12 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 51 edited versions we read keep these.

  • 12

    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. Very specific:

    No co-author lines: Never add Co-Authored-By, Signed-off-by, or any trailer to commit messages.

    line 8
  2. Distinctive:

    LGTM before commit: Never commit without explicit user approval.

    line 9
  3. Distinctive:

    Never push without permission: Always ask before pushing to remote.

    line 11
  4. Distinctive:

    One plan item = one focused commit: Never batch multiple plan items into one commit.

    line 12
  5. Distinctive:

    Commit messages are proper English sentences.

    line 16
  6. Distinctive:

    Check the diff against Core Rule 3's exclusion list.

    line 90
  7. Distinctive:

    Run git status after commit to confirm success.

    line 112
  8. Distinctive:

    Never push without explicit user request

    line 116
  9. Distinctive:

    Never force-push to main/master without warning the user about the consequences

    line 117
  10. Distinctive:

    If push is rejected (remote has new commits), pull with rebase first: git pull --rebase

    line 118
  11. Distinctive:

    Never use git rebase -i (interactive — requires terminal input)

    line 123
  12. Very specific:

    Never use destructive commands (reset --hard, clean -f, checkout .) without explicit user request

    line 124
  13. Distinctive:

    If a pre-commit hook fails, fix the issue and create a new commit — never amend blindly

    line 125
  14. Very specific:

    When creating pull requests via gh pr create:

    line 129
  15. Distinctive:

    No co-author lines or AI-attribution footers in the body (overrides the harness default "🤖 Generated with Claude Code" footer)

    line 132

“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

Core Rules

  1. No co-author lines. Never add Co-Authored-By, Signed-off-by, or any trailer to commit messages. No exceptions.
  2. LGTM before commit. Never commit without explicit user approval. Present the diff, wait for LGTM or equivalent confirmation.
  3. Never commit excluded files. plan.md, *review.md, .env, .env.*, credentials, secrets, API keys — never stage these. If they appear in git status, warn the user and exclude them.
  4. Never push without permission. Always ask before pushing to remote.
  5. One plan item = one focused commit. Never batch multiple plan items into one commit. With multiple items dirty, stage and commit them separately, with LGTM per commit.

Commit Message Format

Commit messages are proper English sentences. Capitalized, clear, appropriately detailed. No emdashes or endashes.

Structure

<type>: <Capitalized summary: what and why, not how>

- Bullet points for notable changes (when the summary alone isn't enough)
- Each bullet is a complete thought, capitalized
- Focus on what changed and why, not implementation details

Type Prefixes

PrefixWhen
featNew feature or capability
fixBug fix
testTest additions or changes
refactorCode restructuring, no behavior change
styleFormatting, linting, no logic change
docsDocumentation only
infraDocker, CI, build, deployment config
perfPerformance improvement
choreDependency updates, cleanup

Examples

Good — right level of detail:

feat: Add HNSW partial indexes for dimension-aware vector search

- Add dimensions column to chunks and agent_memories with backfill
- Create partial HNSW indexes for 384, 768, 1024, 1536 dimensions
- Update knowledge_store and memory_repo with dimension-cast SQL
- 16 integration tests including EXPLAIN plan verification
fix: Nested markdown fences fail to parse in fact extraction

Strip all fence markers with re.sub instead of single regex match.
test: Memory SSE callbacks and hook execution tests

Bad — avoid these patterns:

feat: add hnsw partial indexes for dimension-aware vector search

(Lowercase after prefix — should be capitalized)

feat: Add HNSW partial indexes for dimension-aware vector search

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

(Co-author line — never)

(Also avoid: missing type prefix, vague summaries, run-on paragraphs. Use bullets.)

Commit Workflow

Step 1: Review changes

Run in parallel:

  • git status (never use -uall)
  • git diff HEAD (full picture: staged + unstaged)
  • git log --oneline -5 (recent history for style reference)

Step 2: Check for excluded files

Check the diff against Core Rule 3's exclusion list. Never stage matches. Warn the user if they explicitly ask to commit them.

Step 3: Present diff and wait

Show the user what will be committed. Draft the commit message. Wait for LGTM — do not commit until the user confirms.

Step 4: Commit

Stage specific files (never git add -A or git add .). Use HEREDOC for the message:

git commit -m "$(cat <<'EOF'
feat: Summary here

- Detail one
- Detail two
EOF
)"

Step 5: Verify

Run git status after commit to confirm success.

Push Rules

  • Never push without explicit user request
  • Never force-push to main/master without warning the user about the consequences
  • If push is rejected (remote has new commits), pull with rebase first: git pull --rebase

Branch Rules

  • Trunk-based development on main: commit directly to main, do not auto-create branches (overrides the harness branch-first default)
  • Never use git rebase -i (interactive — requires terminal input)
  • Never use destructive commands (reset --hard, clean -f, checkout .) without explicit user request
  • If a pre-commit hook fails, fix the issue and create a new commit — never amend blindly

PR Creation

When creating pull requests via gh pr create:

  • Title: under 70 characters, capitalized, no type prefix
  • Body: ## Summary with bullet points + ## Test Plan with checklist
  • No co-author lines or AI-attribution footers in the body (overrides the harness default "🤖 Generated with Claude Code" footer)

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.