git-commit-author-identity

git-commit-author-identity is a skill for Claude Code, Codex from chen3feng/agent-skills. It costs 29 tokens per session (846 once invoked), scanned A, original, Apache-2.0.

A procedure for creating Git commits with the intended author name and email. Git is the version-control tool that records code changes, and the procedure also covers identities that differ between repositories.

In plain words
What is it for?
Use it before committing in a new, shared, temporary, or CI-like repository to read a trusted identity and apply the correct author details safely.
Why use it?
It prevents commits from being attributed to the wrong person or to an unconfigured machine account. It also avoids shell quoting errors when names contain spaces.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/chen3feng/agent-skills/git-commit-author-identity
Any agent
npx skills add chen3feng/agent-skills --skill git-commit-author-identity
Clone the repo
git clone --depth 1 https://github.com/chen3feng/agent-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for git-commit-author-identity

README.md
[![agentmods](https://agentmods.dev/badge/skills/chen3feng/agent-skills/git-commit-author-identity.svg)](https://agentmods.dev/skills/chen3feng/agent-skills/git-commit-author-identity)
Your own site
<a href="https://agentmods.dev/skills/chen3feng/agent-skills/git-commit-author-identity"><img src="https://agentmods.dev/badge/skills/chen3feng/agent-skills/git-commit-author-identity.svg" alt="Measured on agentmods" height="20"></a>
Per session 29 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 846 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00029 $0.00846
Opus 5 $0.00015 $0.00423
Sonnet 5 $0.00006 $0.00169
Haiku 4.5 $0.00003 $0.00085

Measured 3d ago against content hash 56f1e0ac656d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

git-commit-author-identity scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/git-commit-author-identity/SKILL.md · 101 lines

How it starts

The opening of the file, as written. The whole thing — 101 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Git commit author identity across repos

When to use

You're about to create a commit in a repo whose default identity may not match the user's intent — a freshly cloned sibling repo, a throwaway scratch clone, or a CI-like environment where user.name / user.email are unset. Common trigger: the user says "use the same identity as ".

Problem

Two recurring failures:

  1. Committing with the wrong identity (e.g. a work email into a personal OSS repo, or root@hostname from an unconfigured clone).

  2. Trying to override per-command with git -c user.name='First Last' and having the shell split the quoted value, so git sees user.name=First and treats Last as the next config key:

    error: key does not contain a section: useAdd
    fatal: unable to parse command-line config
    

    Or, if it parses, the committed author ends up as First_Last / First because quoting was stripped somewhere along the pipeline.

Solution

  1. Read the target identity from an existing repo the user trusts:

    git -C /path/to/reference-repo config user.name
    git -C /path/to/reference-repo config user.email
    
  2. Commit using environment variables, which survive any shell quoting shenanigans:

    GIT_AUTHOR_NAME="First Last" \
    GIT_AUTHOR_EMAIL="[email protected]" \
    GIT_COMMITTER_NAME="First Last" \
    GIT_COMMITTER_EMAIL="[email protected]" \
    git -C /path/to/repo commit -F .commit_msg.tmp
    
  3. Verify immediately before pushing:

    git -C /path/to/repo log -n1 --format='author=%an <%ae>%n committer=%cn <%ce>'
    
  4. If you got it wrong, fix in place with --amend --reset-author (only safe if you haven't pushed yet):

    GIT_AUTHOR_NAME="First Last" GIT_AUTHOR_EMAIL="[email protected]" \
    GIT_COMMITTER_NAME="First Last" GIT_COMMITTER_EMAIL="[email protected]" \
    git -C /path/to/repo commit --amend --no-edit --reset-author
    

Example

Wrong (will sometimes give First_Last as the author, sometimes error out with key does not contain a section):

Read the full file on GitHub · 101 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 101 lines · 29 tokens per session scan A 56f1e0ac656d

Subscribe to this mod's changes

git-commit-author-identity is a skill published in the GitHub repository chen3feng/agent-skills (5 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 29 tokens to every session and 846 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

semantic-commit

Use when staged/unstaged changes mix multiple unrelated concerns and need splitting into clean conventional commits, or when asked for "semantic commits", "logical commits", or "커밋 분리". Works in any language or ecosystem.

AndrewDongminYoo/cc-agents-kit · 50 tokens

prowler-commit

Creates professional git commits following conventional-commits format. Trigger: When creating commits, after completing code changes, when user asks to commit.

prowler-cloud/prowler · 33 tokens

github-pr-description

Generate and create pull request descriptions automatically using GitHub CLI. Use when the user asks to create a PR, generate a PR description, make a pull request, or submit changes for review. Analyzes git diff and commit history to create comprehensive, meaningful PR descriptions that explain what changed, why it…

tailcallhq/forgecode · 72 tokens

ondb

A logical analysis and reasoning tool for AI. Use when decomposing documents into structured knowledge, querying entities and relations, validating consistency, or indexing files. Trigger on "remember", "what do I know about", "link X to Y", "show dependencies", "analyze this document", entity CRUD, or cross-skill…

x-cmd/x-cmd · 71 tokens

git-commit

Generate well-formatted git commit messages following conventional commit standards.

ThinkInAIXYZ/deepchat · 15 tokens

commits

Use this skill whenever the user asks to commit changes, write or fix a commit message, amend or rename a commit, or do a workflow that includes committing in the IntelliJ repository. This is a thin repo-specific overlay: use IntelliJ commit format, write full commit messages by default, and keep requested suffixes…

JetBrains/MPS · 78 tokens