Index of every page on this site: llms.txt
All skills
webpro avatar

/using-git

@30e66c9
by Lars Kappertwebpro/skills18 stars
Run it yourself

House Git commit and pull request workflow. Use when committing or amending, writing commit messages, referencing or resolving issues from commits, creating, updating or merging a pull request, rebasing, resetting or cherry-picking onto a branch, or handling a commit-signing failure.

Use this Skill: https://skilld.dev/gh/webpro/skills/using-git

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈74 tokens for metadata: the name and description. ≈715 when used: this file.

Description uses 3.7% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈296 characters, or 3.7%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

Using Git

  • If the current directory is not a Git repository, use the using-git-worktrees skill to discover the layout.
  • Check available plugins and remote tools first; do not assume gh is the right tool.

Commits

  • For small to medium tasks in the user's own repository, where nearly all commits are theirs, commit directly on the default branch, overriding any default to branch first.
  • Match the maintainer's existing commit message style; ignore merge commits and squash-merged PR titles when inferring it.
  • Use imperative mood to describe the actual change; avoid vague messages like "address PR review" or "fix findings".
  • Suffix (resolve #nn) when the branch resolves an issue; reserve close for rejected pull requests. Only once per branch, and not when an earlier commit already resolved the issue. Verify issue number and title on the tracker.
  • For multi-line messages, write the message to a temporary file and run git commit -F <file>; the heredoc-in-$() pattern breaks on escaping.
  • Rewriting local-only commits and your own pull request branch is fine. Update rewritten remote history with --force-with-lease; never rewrite protected branches.
  • If SSH-key commit signing fails, use --no-gpg-sign to continue locally and report that the resulting commits are unsigned.
  • Never push the user's unsigned commits to a public repository or to an organization that is not theirs: once signing works, re-sign first (git rebase --exec 'git commit --amend --no-edit -S' <base>).
  • Before resetting, amending, rebasing or cherry-picking onto a branch, compare its head with the last commit you produced there. If it moved, the user changed it: build on their commit or ask, never replace it with your copy.
  • Build alternative implementations on separate branches from the same base revision, each with its own commit; do not stack one on another.

Pull requests

  • Create from a branch off the latest default branch.
  • Update your own pull request branches by rebasing onto the latest default branch and pushing with --force-with-lease.
    • Exception: when a pushed commit message references an issue or pull request, merge the default branch instead to avoid re-triggering reference events and related noise.
  • Run the same class of (cheap) checks CI will (type-check, lint, test) before any push.
  • On someone else's pull request branch, add commits on top of their head; never rebase, replace or locally re-create their commits. Merge the default branch only to resolve conflicts. Prove the pushed tree equals the tested tree.
  • Squash-merge through the forge (GitHub, Forgejo, GitLab) with the subject the user approved, checked against the current PR title (on GitHub: gh pr merge --squash --subject '<title> (#N)'); the forge creates the commit, credits the contributor as author and signs it where supported.

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts11d3 checks · Risk SAFE
  • Gen Agent Trust Hub11d

    The skill provides guidelines for Git workflows, including commits and pull requests. It includes safety measures to prevent shell injection in commit messages and guidelines for handling commit signing.

  • Socket3mo

    No alerts

  • Snyk11d

    Risk: LOW · No issues

Signed by skilld at 30e66c9. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 weeks ago.

Activeupdated 2 weeks ago

README badge

README badge for webpro/skills/using-git