Git Setup
Skill0 starsChanged 4 months agoMITView on GitHub
Set up, repair, upgrade, and optimize your GLOBAL git config — prove commits actually verify, not just that config is set. Use to SET UP recommended settings + SSH commit signing + delta + a global gitignore (and work-vs-personal identities via conditional includes), REPAIR a broken setup (commits signed but unverified, wrong identity resolving, HTTPS re-prompts), UPGRADE by adopting newer git defaults and refreshing tooling, or OPTIMIZE with a prioritized gap report against the live config. Verification-first — a test commit is made to prove signatures verify and identities resolve.
- Reads credentials
In this repository12 other files it gives its agents.
- Brew DoctorSkill
- Credential StoreSkill
- Dev EnvironmentSkill
- DotfilesSkill
- Ghostty ConfigSkill
- Identity ProfilesSkill
- macOS DefaultsSkill
- Neovim ConfigSkill
- Runtime VersionsSkill
- Shell SyncSkill
- SSH ConfigSkill
- Terminal ThemeSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 72
Read ~/.config/devenv/config.toml before prompting.
- Very specific: line 90
Back up
~/.gitconfig: before editing (cp ~/.gitconfig ~/.gitconfig.bak).
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Git setup
Audit and harden the user's global git configuration, and — the golden rule — prove it works: a signed commit that actually verifies, an alias that runs, the right identity resolving in a work directory. Setting config is not the finish line; verification is.
Route to a workflow
| The user wants to… | Workflow |
| Apply recommended settings, signing, delta, gitignore (+ work/personal identity) | reference/setup.md |
| Fix a broken setup — signed-but-unverified, wrong identity, cred re-prompts | reference/repair.md |
| Adopt newer git defaults + refresh tooling | reference/upgrade.md |
| See what's set and what's missing/risky (prioritized gap report) | reference/optimize.md |
| Confirm signing verifies / identity resolves | reference/verification.md |
Supporting reference (not a standalone path): reference/identity.md —
work-vs-personal identities via includeIf conditional includes, pulled in by setup and
repair.
The scripts (call these, don't re-derive them)
scripts/ is the tested toolbox — call a script by name instead of re-deriving the same
git config --global --get probes or the throwaway-repo signing dance each session. Full table +
conventions in scripts/README.md. All read-only except where noted.
| Script | Use it to… |
scripts/git_audit.py | Run first. Whole global config as key<TAB>value facts + a gap report sorted 🔴 → 🟡 → 🟢, each with its fix command. |
scripts/git_identity.py [path] | Which identity + signing key resolves in a directory (evaluates includeIf as git sees it) and the file each value came from. |
scripts/verify_signing.py [--self-test|--key <pub>] | PROVE a signature verifies — a test commit in a throwaway repo it owns and cleans up (never a real repo). --self-test proves the pipeline with an ephemeral key; no flag reflects your real global state. |
scripts/git_audit.py # discovery + gap report — always run first
scripts/git_audit.py | grep '^gap' # just the prioritized gapsUnder the hood, discovery is these read-only commands (the script just packages them):
git --version
git config --global --list --show-origin # the whole global config + where each value lives
uname -s # Darwin -> prefer SSH signing + osxkeychain
git config --global --get commit.gpgsign # signing on? (empty = off)
git config --global --get core.pager # delta? (empty = plain)
ls ~/.gitconfig ~/.config/git/ 2>/dev/null # main config + any conditional-include files
command -v delta # pager installed?--show-origintells you which file a value comes from — the key to understanding conditional-include (per-directory) identities. Don't assume; read it each time.- macOS (
Darwin) → prefer SSH commit signing and the osxkeychain credential helper.
Core principles
- Verify, don't assume. Prove a signed commit verifies (
git log --show-signature), an alias runs, and the right identity resolves per directory — see reference/verification.md. - Global scope, deliberate changes. This skill hardens
~/.gitconfig. Back it up before edits; confirm before changing signing, identity, or email. - Signing affects "Verified" on GitHub. Changing
gpg.format/user.signingkeychanges whether commits show as verified — treat it as a gated change, not a default. - Read the real config each time.
git config --global --list --show-origin, not memory.
Settings
Read ~/.config/devenv/config.toml before prompting; if a [git-setup] section exists, use it as
defaults (precedence: explicit answer this session > config.toml > ask). Had to ask? Offer to save
the answer back. Managed by the devenv skill. Keys honored:
signing— commit signing method:"ssh"(preferred on macOS),"gpg", or"none".pager— diff pager:"delta"or"less".identities— map of directory → email, e.g.{ "~/work/" = "you@work.example", "~/personal/" = "you@personal.example" }, driving the per-directory conditional includes.
Cross-skill coherence
- ssh-config — SSH commit signing reuses an SSH key; coordinate so
user.signingkeypoints at the right~/.ssh/*.puband theallowedSignersFilemaps that email → public key. - dotfiles — track
~/.gitconfigand the~/.config/git/*.gitconfigidentity files via chezmoi. - dotfiles (secrets) — NEVER commit a private signing key. The SSH public key and the
allowedSignersfile are safe to track; the private key is not.
Safety
- Never commit private signing keys. Public key + allowedSigners only.
- Back up
~/.gitconfigbefore editing (cp ~/.gitconfig ~/.gitconfig.bak). - Changing signing config affects whether commits show as Verified on GitHub — confirm first.
- Confirm before altering global identity / email; a wrong
user.emailmisattributes commits. - Writing config is mutating — this skill's pre-approved tools are read-only; each
git config --global <key> <val>is proposed and run with the user's confirmation.
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
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.

