git
SkillAI & modelsgit workflows for agents. use when handling commits, atomic split commits, selective staging, hunk-level staging with `git-hunk`, branch pushes, or pull request creation with `gh`. triggers on: commit, pr, push, stage, hunk, git-hunk, selective staging, pull request, atomic commit.
Available today. Use it from your connected AI after setup.
No other account needed.
Connect ahel once, and every AI you use reads what you have installed.
Then ask your AI: use the git skill
What this skill tells your AI
The instructions your AI receives, as published by nexxeln/opencode-config in skill/git/SKILL.md and read by ahel’s review.
use this skill when the job is to turn a messy diff into clean commits or a clean pull request. prefer atomic commits, short lowercase conventional messages, and explicit staging over convenience.
defaults
- use conventional prefixes:
featfixrefactorperftestdocschorebuildcistylerevert - keep commit subjects short, lowercase, and direct; no trailing period
- add a scope only when it adds signal:
fix(auth): refresh session - stage only what you mean to commit; never use
git add -A - never force push
- prefer
ghfor github operations - leave unrelated user changes alone
commit message convention
- default format:
type(scope): subjectortype: subject - prefer the smallest honest type; do not inflate
featwhen the change is reallyfix,refactor, orchore - make the subject describe the shipped change, not the process
- good:
fix(cache): avoid stale reads - good:
refactor(router): split auth helpers - good:
docs: add local setup note
commit workflow
if the user provides extra instructions, treat them as constraints on scope, file selection, commit count, message hints, or exclusions.
-
inspect the entire change first
- run
git status,git diff,git diff --staged, andgit log --oneline -10 - reason about the full diff before staging anything
- identify the smallest meaningful commit boundaries by intent, not by file count
- run
-
decide how to split
- separate independent bug fixes, refactors, tests, docs, formatting, and generated changes when they can stand alone
- keep tightly coupled code and tests together when one without the other would be misleading or broken
- if the diff is already one unit, make one commit
-
stage the next atomic unit
- if whole files belong together, stage files explicitly with
git add <file ...> - if a file mixes multiple concerns, use
git-hunk - before using
git-hunk, readreferences/git-hunk.md
- if whole files belong together, stage files explicitly with
-
use
git-hunksafely when needed- prefer
git-hunk scan --mode stage --compact --json - prefer
change_keyoverchange_id - prefer selector bundles from
scanorresolvejson instead of rebuilding selectors by hand - use
git-hunk resolvewhen you only have a file and line hint - keep the returned
snapshot_idand rescan after every successfulstage,unstage, orcommit - if a snapshot goes stale, use
git-hunk validateto recoverchange_keyselections before retrying - use
git-hunk stage --dry-run ... --json,unstage --dry-run ... --json, orcommit --dry-run ... --jsonbefore a risky partial mutation - treat raw line ranges as a last resort unless the user asked for an exact range
- if a path is reported as unsupported, fall back to normal git for that path
- prefer
-
commit and continue
- write a short lowercase conventional message
- create exactly one atomic commit for the selected unit
- re-check
git statusand the remaining diff - repeat until the requested work is committed
-
failure handling
- if there is nothing to commit, do not create an empty commit
- if a hook changes files or rejects the commit, inspect the new diff, fix the issue, and create a new commit instead of amending by default
- ask only if ownership or grouping is genuinely ambiguous and the wrong split would be misleading
pull request workflow
if the user provides extra instructions, treat them as constraints on commit scope, base branch, title, body, draft state, labels, reviewers, or other gh options.
- run the commit workflow first for all intended uncommitted changes
- inspect branch state with
git status,git branch --show-current, tracking status,git log, andgit diff <base>...HEAD - if the current branch is the default branch (e.g.
main), create a new branch namednxl/<short-descriptive-name>before pushing (e.g.nxl/fix-auth-refresh,nxl/add-usage-metrics) - choose the base branch from arguments when provided; otherwise prefer the repo default or current tracking setup
- push the branch with
git push -u origin <branch>when needed; never force push - create the pull request with
gh pr create - keep the PR title concise and aligned with the overall change set
- keep the PR body short and useful; default shape:
## summary
- ...
- ...
## testing
- ...
- return the PR URL
argument handling
- accept natural language arguments and explicit flags or key-value hints
- honor user-provided titles, scopes, prefixes, commit-count limits, base branches, draft requests, labels, and reviewer hints when they are safe
- if arguments conflict with atomicity, preserve correctness first and explain the tradeoff briefly
references
- read
references/git-hunk.mdbefore any hunk-level staging or committing - the reference is adapted from the upstream
git-hunkskill so the workflow stays self-contained
Signals
- GitHub stars
- 211
- Forks
- 9
- Last commit
- May 2026
Advanced
- Catalog kind
- skill
- Gateway key
git-nexxeln- Source
- github.com/nexxeln/opencode-config