Skip to content
Skill

Secrets in git history

Guides an agent through mining git history for leaked secrets and developer identities

Secrets in git history is an open-source agent skill for security. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

Scripts
None
Platforms
Claude Code, Codex, Cursor
GitHub stars
76
Last commit
License
MIT
Listing updated

Similar skills

About Secrets in git history

This skill walks an agent through investigating a GitHub, GitLab or git repository beyond its current state. It covers pulling commit author emails, resolving GitHub noreply addresses to account IDs, using code search to find internal domains and infrastructure strings, and mapping an organisation's members through their personal repositories, stars and follows. The core method is to mirror-clone a repository, scan all refs rather than only HEAD, and pickaxe for specific strings to see when they entered and left the history.

The workflow names concrete tools: trufflehog and gitleaks run over the mirror, git log with pickaxe and deletion filters, and the commit .patch endpoint. It also gives a grading scheme for findings (confirmed, probable, unconfirmed, rejected), requires a commit SHA, date and file path for each record, and tells the agent to treat placeholders and publishable browser keys as non-findings.

The skill expects a shell with git and the scanners installed, plus network access to the code host. It is written for authorized security, diligence or incident-response work. It instructs the agent never to test a discovered credential against a live service and to recommend rotation through a disclosure channel instead.

When your agent uses it

Mine GitHub, GitLab and git history for identities, infrastructure and leaked credentials using commit author emails, GitHub code search, the commit .patch endpoint, trufflehog, gitleaks, git log pickaxe and full-ref history scans. Use when investigating a developer or organisation on GitHub, finding leaked API keys, AWS keys or tokens in code, enumerating org members and their personal repos, or recovering secrets deleted from HEAD but still present in history or forks. Applies to software supply-chain risk, credential exposure response, M&A technical diligence, and insider-threat investigation. Reference at useosint.com/skills/secrets-in-git-history.

From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.

What it can access

From a static check of its 3 files (31 KB) on GitHub on 5 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.

Check another skill before you install it.

Install

This skill ships in the useosint plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

/plugin marketplace add UseOSINT/Skills
/plugin install useosint@useosint

Or copy only this skill to ~/.claude/skills/secrets-in-git-history:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/UseOSINT/Skills.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/secrets-in-git-history &&
cp -R "$tmp/skills/secrets-in-git-history" ~/.claude/skills/secrets-in-git-history &&
rm -rf "$tmp"

For one project only, put the folder in .claude/skills/secrets-in-git-history inside it instead.

Claude Code docs on skills

Copy the skill folder to ~/.agents/skills/secrets-in-git-history to use it in every repository:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/UseOSINT/Skills.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/secrets-in-git-history &&
cp -R "$tmp/skills/secrets-in-git-history" ~/.agents/skills/secrets-in-git-history &&
rm -rf "$tmp"

For one repository only, put the folder in .agents/skills/secrets-in-git-history inside it instead.

Codex docs on skills

Copy the skill folder to ~/.cursor/skills/secrets-in-git-history to use it in every project:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/UseOSINT/Skills.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/secrets-in-git-history &&
cp -R "$tmp/skills/secrets-in-git-history" ~/.cursor/skills/secrets-in-git-history &&
rm -rf "$tmp"

For one project only, put the folder in .cursor/skills/secrets-in-git-history inside it instead.

Cursor docs on skills

Run in a terminal (add --scope workspace to install it for the current workspace only):

gemini skills install https://github.com/UseOSINT/Skills.git --path skills/secrets-in-git-history

Or copy the folder to ~/.gemini/skills/secrets-in-git-history yourself.

Gemini CLI docs on skills

For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/secrets-in-git-history:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/UseOSINT/Skills.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/secrets-in-git-history &&
cp -R "$tmp/skills/secrets-in-git-history" ~/.copilot/skills/secrets-in-git-history &&
rm -rf "$tmp"

For one project only, put the folder in .github/skills/secrets-in-git-history inside it instead.

VS Code docs on skills

Get the folder:

git clone --depth 1 https://github.com/UseOSINT/Skills.git

Then copy Skills/skills/secrets-in-git-history into your agent's skills folder as secrets-in-git-history. Agents that support SKILL.md read one folder per skill.

The SKILL.md format

What it does

Commit author extraction
Lists distinct author names and emails across all refs of a mirror-cloned repository.
Noreply ID resolution
Resolves GitHub numeric user IDs embedded in noreply addresses to current account names.
Full-history secret scanning
Runs trufflehog and gitleaks over mirror clones so deleted secrets in history are covered.
Pickaxe string tracing
Uses git log -S across all refs to find when a hostname or key entered and left the code.
Organisation member mapping
Maps an organisation's contributors through public members, personal repos, stars and follows.
Finding confidence grading
Grades findings as confirmed, probable, unconfirmed or rejected with citation requirements.

Good for

  • Find the email addresses of developers who committed to a company's repositories
  • Scan a repository's full git history for API keys that were deleted later
  • Trace when an internal hostname first appeared in a codebase
  • Map the engineering team of an organisation from its public code
  • Check whether a deleted config file exposed infrastructure details in past commits

Secrets in git history FAQ

What does the skill need to run?

It relies on git, the trufflehog and gitleaks scanners, and network access to the code host. It also expects the user to be doing authorized security or investigative work.

Does Secrets in git history verify whether a leaked credential is still live?

No. It explicitly forbids authenticating with any discovered credential and recommends reporting it for rotation instead.

Why scan all refs instead of the working tree?

Secrets deleted from HEAD remain in history, clones and forks, so the skill scans mirror clones across every ref.

Does Secrets in git history work with GitLab as well as GitHub?

The description names GitHub, GitLab and git history, but most of the detailed API steps shown in the content target GitHub.

How do I install Secrets in git history in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/secrets-in-git-history to use it in all your projects, or to .claude/skills/secrets-in-git-history in one project. Or install the useosint plugin, which includes it: /plugin marketplace add UseOSINT/Skills, then /plugin install useosint@useosint.

Does Secrets in git history run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

Which AI agents can use Secrets in git history?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

What are the best alternatives to Secrets in git history?

The closest alternatives to Secrets in git history are Osint, Sh kb secrets, Vibe pre commit audit, Secret scanning and Source code scanning.

Where this comes from

  • Description: from the skill's own SKILL.md.

More from UseOSINT/Skills

  1. Maps a target's internet-exposed hosts and services using scan-platform data, without

    • Open source
    • 76 GitHub stars
    • Security
  2. Maps an organisation's subdomains and sibling domains from certificate and passive DNS

    • Open source
    • 76 GitHub stars
    • Security
  3. Checks whether leaked credentials or selectors are circulating and judges if a breach

    • Open source
    • 76 GitHub stars
    • Security
  4. Traces where an image first appeared using reverse image search across several engines

    • Open source
    • 76 GitHub stars
    • Web search and scraping
  5. Traces crypto addresses and transactions on public blockchains with graded confidence

    • Open source
    • 76 GitHub stars
    • Security
  6. Work out where and when a photo was taken from visual clues and map imagery

    • Open source
    • 76 GitHub stars
    • Security