agentleFS
OrchardxyzOrchardxyz/agent-skills/skills/deprecated/git-conventions/SKILL.md

git-conventions

Skill0 starsChanged 4 months agoMITView on GitHub

Use when asked for branch names, commit messages, or PR descriptions for code changes. Triggers on requests like "give me a branch name", "write a commit message", "draft a PR", or when the user describes a change and expects git metadata in return. Output is always in English.

12 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use tdd and code-review.

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.
  • AWSSkill

    tdd

    Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.

    Also in 3 projects that use this

  • GoogleSkill

    code-review

    Adversarial systems, concurrency, memory-model, and architecture code review protocol. Use this skill whenever asked to review code, PRs, diffs, or branches in Filament.

    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

13 rules. 0 are common, 9 are distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 11 edited versions we read keep these.

  • 9

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run git diff --cached --stat to see staged files.

    line 16
  2. Very specific:

    If nothing is staged: stop and tell the user: "No changes are staged.

    line 17
  3. Distinctive:

    If there are staged changes, run git diff --cached to understand the nature of the changes.

    line 18
  4. Distinctive:

    When asked for branch / commit / PR metadata:

    line 23
  5. Distinctive:

    Check staging area first: Follow the Staging Check steps above.

    line 25
  6. Very specific:

    Read git log --oneline -10 to detect the repo's existing commit style (prefixes, capitalization, trailers).

    line 26
  7. Very specific:

    Check for .github/PULL_REQUEST_TEMPLATE.md.

    line 27
  8. Distinctive:

    If the repo has no discernible conventions, use the defaults below.

    line 28
  9. Distinctive:

    All output in English.

    line 29
  10. Distinctive:

    Keep it short and scannable — reviewers skim, they don't read essays.

    line 67
  11. Distinctive:

    If the repo has a PR template, fill each section concisely.

    line 69
  12. Distinctive:

    If not, provide a summary, motivation, and verification steps.

    line 70
  13. Very specific:

    Never include Co-Authored-By: Claude or similar trailers unless explicitly asked.

    line 72

“Common” is measured: kept by at least 6 in 10 of the 11 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 Conventions

Safety Rule

Never commit, push, or create a PR unless the user explicitly asks you to do that specific action. Providing a branch name, commit message, or PR draft is not permission to execute it.

Staging Check (required)

Before producing any git metadata, check the staging area. The types and scope must reflect what's actually staged, not what's in the working tree or on the branch.

  1. Run git diff --cached --stat to see staged files. Also run git diff --cached --name-only for a clean file list.
  2. If nothing is staged: stop and tell the user: "No changes are staged. Please stage the changes you want metadata for (e.g., git add <files>), then ask again." Do not produce output based on unstaged changes.
  3. If there are staged changes, run git diff --cached to understand the nature of the changes. Use this to determine the correct type prefix and scope.
  4. Also check git log --oneline -10 to derive the branch name format the repo uses.

Workflow

When asked for branch / commit / PR metadata:

  1. Check staging area first. Follow the Staging Check steps above. Do not skip this.
  2. Read git log --oneline -10 to detect the repo's existing commit style (prefixes, capitalization, trailers). Adopt it. Also inspect merge commits to derive the branch name convention (e.g., type/description vs type/scope-description).
  3. Check for .github/PULL_REQUEST_TEMPLATE.md. If present, match its sections exactly.
  4. If the repo has no discernible conventions, use the defaults below.
  5. All output in English.

Type Prefix Table

PrefixWhen you...
featAdd new behavior, capability, or feature
fixCorrect a bug, crash, or incorrect behavior
styleChange visuals only — CSS, layout, spacing, icons
refactorRestructure code without changing external behavior
perfImprove performance without changing behavior
choreUpdate deps, config, build scripts — no product code
docsChange documentation only
testAdd or fix tests only

Edge cases: visual-only → style, not feat or fix. Logic fix + UI change → fix. Dead code removal → chore.

Branch Name

Derive the branch name format from the repo's actual branch names in git log --oneline (look at merge commits like Merge pull request #N from …). Common patterns:

  • type/description — two segments (e.g., feat/i18n, refactor/monorepo)
  • type/scope-description — three segments (e.g., fix/auth-token-expiry)

Lowercase, kebab-case, 4-5 words max. Match the repo's convention; do not impose a format it doesn't use.

Commit Message

type(scope): brief subject in sentence case

Body paragraph(s) explaining what and why. Hard-wrap at 72 chars.

Subject: ≤50 chars, stands alone in git log --oneline. Body: what and why, no filler. Match the repo's style if it uses a different format.

PR Description

  • Keep it short and scannable — reviewers skim, they don't read essays.
  • Bullet points over paragraphs. One sentence per point.
  • If the repo has a PR template, fill each section concisely.
  • If not, provide a summary, motivation, and verification steps.
  • For UI changes that affect multiple states, include a test prompt the reviewer can paste and run.
  • Never include Co-Authored-By: Claude or similar trailers unless explicitly asked.

Anti-Patterns

Don'tDo
Produce metadata without checking staging areaRun git diff --cached --stat first; prompt user to stage if empty
Invent a style without checking git logRead 10 commits, adopt the repo's conventions
Ignore the repo's PR templateCheck .github/PULL_REQUEST_TEMPLATE.md
Output in ChineseEnglish for all git metadata
Commit / push / create PR without being askedOnly provide the text; let the user execute
Use fix for CSS-only changesUse style
Use feat for visual polishUse style

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.