git-leak-recovery

Recover secrets from Git history via reflog and dangling objects.

134|21|Updated Nov 12, 2025
One-click install
npx skills add https://github.com/letta-ai/skills --skill git-leak-recovery
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-leak-recovery
Source: https://github.com/letta-ai/skills/tree/main/ai/benchmarks/letta/terminal-bench-2/trajectory-feedback/git-leak-recovery
Command: npx skills add https://github.com/letta-ai/skills --skill git-leak-recovery

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill guides recovering secrets or sensitive data that were removed from Git history (reflog, dangling objects) and securely cleaning up the repository afterward.

Core Features & Use Cases

  • Inspect reflog, fsck for unreachable objects, and stash history
  • Extract and recover data from identified commits
  • Cleanup steps to ensure secrets are not recoverable

Quick Start

Identify a leaked secret in reflog or dangling commits, extract it, and perform a cleanup pass to purge history.

Frequently Asked Questions about git-leak-recovery

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I recover secrets from Git reflog after they've been removed from history?

Recover secrets from Git reflog by inspecting unreachable objects using git reflog and git fsck, then extracting data from identified commits. The reflog retains deleted commits temporarily, allowing you to locate and extract sensitive data before permanent cleanup.

What Git forensics techniques help find dangling commits with leaked data?

Git forensics uses reflog inspection, fsck to scan for dangling objects, stash history examination, and branch/tag/notes enumeration. These techniques traverse Git's internal state to discover commits outside the current branch history that may contain recoverable secrets.

Can I completely remove a secret from Git history after recovery?

Yes. After extracting recovered data, expire reflog entries, run aggressive garbage collection with git gc, and verify cleanup using fsck. These steps purge unreachable objects and ensure secrets are not recoverable from the local repository.

When should I use reflog and fsck instead of rewriting Git history with filter-branch?

Use reflog and fsck when secrets are already removed and you need forensic recovery of past state. This approach discovers what exists in dangling commits without rewriting active history, preserving the repository for investigation before cleanup.

What's the difference between Git reset, rebase, and amend for removing data, and how do I recover from each?

Reset, rebase, and amend all create dangling commits visible in reflog. Recovery is identical for all three: inspect reflog, identify target commits with fsck, extract contents, then expire and garbage-collect to clean up. The removal method doesn't affect recoverability.