git-profile

Manage git identity and GPG signing profiles across repositories.

189|25|Updated Jan 30, 2026
One-click install
npx skills add https://github.com/sd0xdev/sd0x-harness --skill git-profile-sd0xdev
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: git-profile
Source: https://github.com/sd0xdev/sd0x-harness/tree/main/skills/git-profile
Command: npx skills add https://github.com/sd0xdev/sd0x-harness --skill git-profile-sd0xdev

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires jq, and includes scripts (resource) components.

What problem does it solve? Switching between work and personal git identities across repositories is error-prone: wrong committer emails leak into commits, GPG signing keys expire unnoticed, and global config edits affect every repo. This Skill discovers, registers, and switches per-repository git identities with GPG signing health checks. ## Core Features & Use Cases - Diagnostics (doctor): Reports effective identity, signing config, GPG key status, environment variable overrides, and linked-worktree warnings as structured JSON. - Profile registry: Auto-discovers profiles from GPG secret keys and git config, stores them in a local registry, and lists them with active-repo matching. - Safe switching: The use subcommand builds a plan with a hash, asks for confirmation, applies only --local config writes, backs up the existing config, and verifies the result. - Verification: The verify subcommand checks key expiry (90-day warning), email-to-UID matching, and registry consistency. - Use Case: A consultant commits to client repos and personal projects on one machine. Run doctor to confirm the current repo uses the client identity with a valid signing key before pushing. ## Quick Start Ask the assistant to run the git-profile doctor check on this repository and report whether my identity and GPG signing are configured correctly.

Frequently Asked Questions about git-profile

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I switch git identity per repository?▼

Use the `use <profile>` subcommand, which builds a plan of local config changes, shows a diff of current versus new values, and asks for confirmation before applying. It writes only to the repository's local config, never the global gitconfig.

How to check if my GPG signing key is still valid for git commits?▼

Run the `doctor` or `verify` subcommand. They parse `gpg --list-secret-keys` output, match your configured signing key, and report whether it is active, expired, revoked, or expiring within 90 days.

Does this tool modify my global gitconfig file?▼

No. All writes use `git config --local` scope only. The safety rules explicitly forbid writing to ~/.gitconfig or enabling extensions.worktreeConfig; linked worktrees are detected and only warned about.

Can it discover profiles automatically from my GPG keys?▼

Yes. On the first `doctor` run with no registry, auto-discovery parses active GPG secret keys and git config identities, generates candidate profiles, and offers to save them to the registry after your confirmation.

What happens if I remove a profile still used by other repos?▼

The `remove` flow first runs a safety check listing all active repos using that profile. If any exist, removal requires explicit confirmation and the `--force` flag; otherwise the operation aborts.