git-conditional-identities
Use when Git needs to switch user.name and user.email automatically based on repository location (per-folder identities via includeIf gitdir).
Skill by Orchardxyz
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/orchardxyz-git-conditional-identities
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: productivity
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/git-conditional-identities
What's inside
- Skill name
git-conditional-identities- Description
- Use when Git needs to switch user.name and user.email automatically based on repository location (per-folder identities via includeIf gitdir).
- License
- MIT
- Instructions
- 63 lines in SKILL.md · view on GitHub
Files (2)
- README.md
- SKILL.md
SKILL.md (first lines)
# Git Conditional Identities
## Overview
Automatically switch Git `user.name` and `user.email` based on repo location using `includeIf.gitdir`. Keep a global default while assigning per-folder identities for workspaces, clients, or personal projects.
## When to Use
- Need different commit identities for specific folders (e.g., work vs personal) without manual `git config` changes
- Want to enforce a default global identity but override for certain directories
- Supporting multiple clients/organizations where repos live under known paths
## Quick Start
1) **Create a per-identity config file** (example for `~/work`):
```ini
# ~/.gitconfig-work
[user]
name = Your Work Name
email = your.work@example.com
```
2) **Reference it from the global config with includeIf**:
```ini
# ~/.gitconfig
[user]
name = Your Default Name
email = your.default@example.com
[includeIf "gitdir:~/work/"]
path = ~/.gitconfig-work
```
Notes:
- Trailing slash after the directory ensures subfolders match.
- Order matters: global defaults are read first; include overrides when path matches.
3) **Test resolution**:
```bash
git -C ~/work/some-repo config user.name
git -C ~/work/some-repo config user.email
git -C ~/personal/some-repo config user.name
```
Expect work repos to show the override, others to show the global defaults.
## Multiple Directories
Add more blocks for other roots:
```ini
[includeIf "gitdir:~/clients/acme/"]
path = ~/.gitconfig-acme
[includeIf "gitdir:~/oss/"]
path = ~/.gitconfig-oss
```
Create matching files (`~/.gitconfig-acme`, etc.) with the identity for that folder.
## Tips & Gotchas
- Always include the trailing `/` in `gitdir:` when targeting a folder tree.
- Use absolute or `~` paths; avoid environment variables in `gitdir` patterns.
- The first matching include wins for settings defined there; unspecified keys fall back to global defaults.
- To see which file set a value: `git config --show-origin --get user.name`.
- For single-repo overrides, you can set local config inside that repo (`git config user.name ...`), but `includeIf` is better for folder-wide rules.
## Verification Checklist
- Global `user.name`/`user.email` still return defaults outside scoped folders.
- Inside each targeted folder, `git config user.*` reflects the intended identity.
- `git config --show-origin --get user.email` points to the expected include file when inside matched repos.From Orchardxyz/agent-skills, MIT.
More from Orchardxyz/agent-skills
- 0.529score
scheduling-codex-window-starts
Orchardxyz
Use when a Codex user wants recurring start points optimized around predictable daily working periods and a rolling usage window.
SkillBFreshness: BClaude Code +9 - 0.529score
skill-comparison
Orchardxyz
Compare multiple similar skills to help users choose the best one for their needs.
SkillBFreshness: BClaude Code +9 - 0.529score
visualizing-leetcode-solutions
Orchardxyz
Use when turning a LeetCode problem and one chosen solution into a step-by-step HTML walkthrough, especially when code alone is hard to follow and the user…
SkillBFreshness: BClaude Code +9 - 0.529score
oh-my-posh-setup
Orchardxyz
Set up or troubleshoot a modern Windows terminal environment based on Windows Terminal, PowerShell 7, and oh-my-posh.
SkillBFreshness: BClaude Code +9 - 0.526score
windows-fe-dev-setup
Orchardxyz
Set up or repair a Windows frontend development environment with NVM for Windows, Node.js 24 LTS, npm, pnpm, Claude Code, Git, VS Code CLI, PowerShell…
SkillBFreshness: BClaude Code +9 - 0.524score
review-to-docs
Orchardxyz
Use when code from another model or engineer needs a durable review artifact, especially when the user asks for docs/reviews, executor review, handoff review…
SkillBFreshness: BClaude Code +9 - 0.524score
executor-plans
Orchardxyz
Use when implementation work will be handed off to another model or engineer, and a decision-complete execution plan needs to be written into docs/plans for…
SkillBFreshness: BClaude Code +9 - 0.524score
executor-reviews
Orchardxyz
Use when code written by another model or engineer needs to be validated and reviewed, and the results must be written into docs/reviews with findings…
SkillBFreshness: BClaude Code +9 - 0.524score
git-conventions
Orchardxyz
Use when asked for branch names, commit messages, or PR descriptions for code changes.
SkillBFreshness: BClaude Code +9 - 0.524score
decide-before-doing
Orchardxyz
Use when the user says 先别动手, 先讨论, 先给方案, wait for confirmation, clarify before editing, or when an implementation is ambiguous, risky, broad, multi-step, or…
SkillBFreshness: BClaude Code +9 - 0.524score
codex-proxy
Orchardxyz
Configure Codex to use the machine's proxy by detecting the active proxy on Windows or macOS, validating it, and writing the required variables to…
SkillBFreshness: BClaude Code +9 - 0.515score
ask-orchard
Orchardxyz
Ask which Orchard skill or flow fits the current situation.
SkillBFreshness: BClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Aug 10, 2026 (2 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/Orchardxyz/agent-skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from Orchardxyz
- 0.529score
visualizing-leetcode-solutions
Orchardxyz
Use when turning a LeetCode problem and one chosen solution into a step-by-step HTML walkthrough, especially when code alone is hard to follow and the user…
SkillBFreshness: BClaude Code +9 - 0.529score
scheduling-codex-window-starts
Orchardxyz
Use when a Codex user wants recurring start points optimized around predictable daily working periods and a rolling usage window.
SkillBFreshness: BClaude Code +9 - 0.529score
skill-comparison
Orchardxyz
Compare multiple similar skills to help users choose the best one for their needs.
SkillBFreshness: BClaude Code +9 - 0.529score
oh-my-posh-setup
Orchardxyz
Set up or troubleshoot a modern Windows terminal environment based on Windows Terminal, PowerShell 7, and oh-my-posh.
SkillBFreshness: BClaude Code +9 - 0.526score
windows-fe-dev-setup
Orchardxyz
Set up or repair a Windows frontend development environment with NVM for Windows, Node.js 24 LTS, npm, pnpm, Claude Code, Git, VS Code CLI, PowerShell…
SkillBFreshness: BClaude Code +9 - 0.524score
executor-reviews
Orchardxyz
Use when code written by another model or engineer needs to be validated and reviewed, and the results must be written into docs/reviews with findings…
SkillBFreshness: BClaude Code +9
Cite this page
git-conditional-identities skill. Agent Mart. https://agentmart.dev/skills/orchardxyz-git-conditional-identities (last updated 2026-10-24)