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,237 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 — 248 skills, 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 248 skills, 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,237 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.03237
Opus 5.5 $0.00033 $0.01295
Sonnet 5.5 $0.00016 $0.00647
Haiku 4.5 $0.00008 $0.00324

Measured 11d ago against content hash 4ac0ccf41b9d, 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 11d 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. 11d ago Changed · -1 lines 4ac0ccf41b9d
  2. 16d 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 (9 stars, last pushed today), licensed MIT. It adds 82 tokens to every session and 3,237 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

Other skills, from other repositories

gh-issue-triage

An automated workflow for handling issues in a project's GitHub repository, from collecting and analysing them through fixing, testing, and closing them.

Linearl/reasonix_skill_repo · 52 tokens

canvas

Create, inspect, and update Obsidian JSON Canvas boards with text, file, link, group, and edge nodes. Use for canvas status, canvas lists, visual maps, zones, spatial layouts, adding vault notes or media to a .canvas file, and requests such as create canvas, add to canvas, or put this on the canvas.

AgriciDaniel/claude-obsidian · 72 tokens

wiki

Initialize, adopt, and route work for a separate Obsidian knowledge vault through the portable claude-obsidian core. Use for vault setup, scaffolding, workspace selection, cross-project configuration, or choosing the correct wiki sub-skill. Triggers: /wiki, set up wiki, scaffold vault, create knowledge base, adopt…

AgriciDaniel/claude-obsidian · 84 tokens

defuddle

Plan and, with explicit network consent, use an optional external Defuddle cleaner to extract article-like HTTPS pages as Markdown. Use for defuddle, clean this URL, strip page clutter, readable Markdown from a web page, or preparing a web source for later wiki ingestion.

AgriciDaniel/claude-obsidian · 57 tokens

obsidian-markdown

Explain, draft, or validate Obsidian Flavored Markdown syntax: properties, wikilinks, embeds, callouts, tags, comments, highlights, block references, math, and Mermaid. Use when the user explicitly requests Obsidian note formatting or syntax help, not for general Markdown or broad vault operations.

AgriciDaniel/claude-obsidian · 68 tokens

wiki-fold

Create a bounded, extractive, structurally idempotent rollup of recent Obsidian wiki log entries, with dry-run preview by default and one optional transaction apply. Use for manual log compression without modifying child pages. Triggers: fold the log, run a fold, run wiki-fold, log rollup, roll up log entries, commit…

AgriciDaniel/claude-obsidian · 76 tokens