secrets-in-git-history

secrets-in-git-history is a skill for Claude Code from tonydzi/second-brain-starter-kit. It costs 82 tokens per session (3,234 once invoked), scanned A, a copy of secrets-in-git-history, MIT.

A method for investigating public GitHub and GitLab repositories and their Git history. It looks for developer identities, organisation links, infrastructure details, and credentials that may have been committed and later deleted.

In plain words
What is it for?
It is for tracing commit email addresses, finding related accounts and repositories, and searching all repository history for exposed keys, tokens, or specific strings.
Why use it?
A secret removed from the current files can still remain in older commits or other reachable copies. Scanning only the current checkout can therefore miss it.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the second-brain-skills plugin — 259 skills, 3 agents, 1 plugin shipped together

Good fit It is for tracing commit email addresses, finding related accounts and repositories, and searching all repository history for exposed keys, tokens, or specific strings.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/tonydzi/second-brain-starter-kit/secrets-in-git-history
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.

Any agent
npx skills add tonydzi/second-brain-starter-kit --skill secrets-in-git-history
Clone the repo
git clone --depth 1 https://github.com/tonydzi/second-brain-starter-kit

Made for: Claude Code.

Or install second-brain-skills, the plugin that ships this one along with the rest of its 259 skills, 3 agents, 1 plugin.

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 secrets-in-git-history

README.md
[![agentmods](https://agentmods.dev/badge/skills/tonydzi/second-brain-starter-kit/secrets-in-git-history/github.svg)](https://agentmods.dev/skills/tonydzi/second-brain-starter-kit/secrets-in-git-history)
Your own site
<a href="https://agentmods.dev/skills/tonydzi/second-brain-starter-kit/secrets-in-git-history"><img src="https://agentmods.dev/badge/skills/tonydzi/second-brain-starter-kit/secrets-in-git-history/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for secrets-in-git-history

Your own site · 80×15
<a href="https://agentmods.dev/skills/tonydzi/second-brain-starter-kit/secrets-in-git-history"><img src="https://agentmods.dev/badge/skills/tonydzi/second-brain-starter-kit/secrets-in-git-history.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 82 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,234 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin 89% copy Near-identical to another mod 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.1 $0.00082 $0.03234
Opus 5.5 $0.00033 $0.01294
Sonnet 5.5 $0.00016 $0.00647
Haiku 4.5 $0.00008 $0.00323

Measured 1mo ago against content hash b9b59af9432c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

secrets-in-git-history scanned grade A with 1 finding 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 1mo 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -s https://github.com/example-org/example-repo/commit/<sha>.patch | head -5
Origin

This is a copy

89% identical to secrets-in-git-history — 31 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/secrets-in-git-history/SKILL.md · 262 lines

How it starts

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

Secrets in git history

A repository is three intelligence products: a list of humans with real email addresses, a map of the organisation's infrastructure, and a credential store nobody meant to publish. The costly mistake is scanning the working tree. Secrets deleted from HEAD stay in history forever, and commits deleted from a branch stay reachable through the fork network — scan only what is checked out and you are searching the one place the secret was definitely removed from.

What you're holding, and where to start

You have Start with Why
An organisation name Public org members, then their personal repos Corporate repos are reviewed; personal ones are not
A developer's name or handle Commit emails across their repos Yields an email nothing else gives you
A commit email Reverse-search across hosts; resolve any noreply ID Links accounts across orgs and platforms
A suspected credential leak Both scanners over a mirror clone, all refs HEAD-only scanning misses the point entirely
A specific string — hostname, key prefix git log -S pickaxe across all refs Tells you when it entered and when it left
A live domain Check for an exposed .git — see the legal note Full history from a web server, if authorized
Nothing but a company website Code search the org's internal domain names Finds repos with no obvious link to the org

The commit email leak

Git records an author identity on every commit, self-asserted rather than verified. That cuts both ways: emails are trivially forged, and they are also the most reliable public link between a code-host identity and a real mailbox.

git clone --mirror https://github.com/example-org/example-repo.git repo.git
git --git-dir=repo.git log --all --format='%an <%ae>' | sort -u

GitHub's web UI does not display commit emails, which leads people to assume they are hidden. They are not. Append .patch to any commit URL for a mail-format patch whose From: header carries the author name and email; the API returns the same under commit.author.email.

Read the full file on GitHub · 262 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 1mo ago Changed b9b59af9432c
  2. 1mo ago Changed · -1 lines 4ac0ccf41b9d
  3. 2mo ago First seen · 263 lines · 82 tokens per session scan A 022506b95004

Subscribe to this mod's changes

secrets-in-git-history is a skill published in the GitHub repository tonydzi/second-brain-starter-kit (16 stars, last pushed yesterday), licensed MIT. It adds 82 tokens to every session and 3,234 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). It is 89% identical to secrets-in-git-history, differing in 31 lines, and is treated as a copy.

Related

secrets-in-git-history compared with skills from other repositories

secrets-in-git-history next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
secrets-in-git-historytonydzi/second-brain-starter-kitSkill16yesterdayMITA82Claude Code
gh-issue-triageLinearl/reasonix_skill_repoSkill320d agononeA52Claude Code, Codex
wikiAgriciDaniel/claude-obsidianSkill17ktodayMITA84Claude Code
obsidian-markdownAgriciDaniel/claude-obsidianSkill17ktodayMITA68Claude Code
wiki-lintAgriciDaniel/claude-obsidianSkill17ktodayMITA79Claude Code
commit-changesatman-33/workhubSkill3yesterdayMITA36Claude Code
statusjohnfkoo951/cmds-llm-wikiSkill1073d agononeA51Claude Code, Codex