Token导航 LogoToken导航

Agent Skill · 研究检索

git-leak-recovery(git 泄漏恢复)

git-leak-recovery 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

git-leak-recovery 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证为 MIT,第三方扫描有未通过项,按安装量在研究检索类的 73,675 个 Skill 里排第 45,181。

总安装 865周安装 35GitHub Stars 93下载 272核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:git-leak-recovery(git 泄漏恢复)
来源仓库:https://github.com/letta-ai/skills
仓库路径:skills/git-leak-recovery
安装命令:
npx skills add https://github.com/letta-ai/skills --skill git-leak-recovery
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/letta-ai/skills --skill git-leak-recovery

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

git-leak-recovery 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中根据关键词或任务场景快速定位候选结果。适用于信息检索、线索筛选或基于来源快速匹配相关内容的场景。通过安装命令从指定仓库添加技能,具体功能需参考原始 README 文档。

使用前应确认权限范围和维护状态,注意可能触发的联网或文件操作行为。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

来源仓库内路径:skills/git-leak-recovery

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/letta-ai/skills --skill git-leak-recovery;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

git-leak-recovery 怎么安装?

在终端执行 npx skills add https://github.com/letta-ai/skills --skill git-leak-recovery。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

git-leak-recovery 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

git-leak-recovery 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

git-leak-recovery 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

git-leak-recovery 用的人多吗?

公开数据是累计安装 865 次,近一周安装 35 次,下载 272 次,GitHub 93 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

git-leak-recovery 安全吗?

第三方扫描有未通过项,风险较高。除非你确认过源码,否则不建议直接安装到常用环境。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 3 个目录同时收录,说明这个 Skill 流传比较广。
  • 许可证明确为 MIT,商用和分发边界好判断。

先想清楚的地方

  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
git-leak-recovery

git 泄漏恢复 · 本页

86593需要联网MIT未通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Git Leak Recovery

Overview

This skill guides the process of recovering sensitive data (secrets, credentials, API keys) that have been removed from Git history through history-rewriting operations, extracting the data, and then securely cleaning the repository to ensure complete removal.

Key Concepts

Git Object Persistence

When commits are "removed" via operations like git reset, git rebase, or git commit --amend, the underlying Git objects are not immediately deleted. They become "unreachable" but persist in the repository until garbage collection occurs. This behavior enables recovery but also means secrets remain accessible until explicit cleanup.

Common Hiding Places for Secrets

When searching for removed secrets, check these locations in order of likelihood:

  1. Reflog - Most common location for rewritten history (git reflog)
  2. Dangling commits - Commits with no branch reference (git fsck --unreachable)
  3. Stashes - Often overlooked (git stash list)
  4. Other branches - May contain the original commits
  5. Tags - May reference old commits
  6. Git notes - Annotations attached to commits

Workflow

Phase 1: Reconnaissance

Before attempting recovery, gather information about the repository state:

# View current commit history
git log --all --oneline

# Check reflog for all references
git reflog show --all

# Find unreachable objects
git fsck --unreachable

# List stashes
git stash list

# List all branches
git branch -a

# List tags
git tag -l

Phase 2: Recovery

Once a target commit is identified:

# View commit contents without checking out
git show <commit-hash>

# View specific file from commit
git show <commit-hash>:<path/to/file>

# Extract file to working directory
git show <commit-hash>:<path/to/file> > recovered_file.txt

Phase 3: Cleanup

To completely remove secrets from the repository, perform cleanup in this specific order:

# Step 1: Expire all reflog entries
git reflog expire --expire=now --all

# Step 2: Run aggressive garbage collection
git gc --prune=now --aggressive

The order matters: reflog must be expired first, otherwise GC will not remove the objects since they are still referenced.

Phase 4: Verification

Verify cleanup was successful using multiple approaches:

# Attempt to access the old commit (should fail)
git show <old-commit-hash>

# Search for secret patterns in repository
grep -r "secret_pattern" . .git 2>/dev/null

# Check for unreachable objects
git fsck --unreachable

# Count loose objects (should decrease after GC)
find .git/objects -type f | wc -l

# Verify working tree is clean
git status

Verification Strategies

Confirming Recovery Success

  • Verify the recovered data matches expected format/content
  • Write recovered data to the designated output location
  • Confirm existing commits and history remain intact after recovery

Confirming Cleanup Success

  • Old commit hash should return error when accessed via git show
  • grep -r for secret patterns should return no matches
  • git fsck --unreachable should show no objects containing the secret
  • Compare object count before and after GC to confirm removal

Common Pitfalls

Investigation Pitfalls

  1. Only checking recent history - Use git reflog show --all not just git reflog to see all references
  2. Forgetting stashes - Stashes are a common place for accidentally stored secrets
  3. Missing other branches - Always check all branches with git branch -a

Cleanup Pitfalls

  1. Wrong order of operations - Always expire reflog before running GC
  2. Missing the --all flag - git reflog expire --expire=now without --all only affects HEAD
  3. Using --prune without =now - Default prune time is 2 weeks, use --prune=now for immediate effect
  4. Not using --aggressive - Standard GC may not remove all unreachable objects

Verification Pitfalls

  1. Only checking working directory - Secrets in .git directory require explicit checks
  2. Not verifying object removal - Always confirm the commit hash is inaccessible
  3. Incomplete grep patterns - Search for multiple variations of the secret pattern

Decision Tree

Is the task about recovering lost data from Git?
├── Yes → Check reflog first (git reflog show --all)
│   ├── Found in reflog → Use git show <hash> to view/extract
│   └── Not in reflog → Check fsck, stashes, branches, tags
│
└── Is the task about cleaning up secrets from Git?
    ├── Yes → Follow cleanup sequence:
    │   1. git reflog expire --expire=now --all
    │   2. git gc --prune=now --aggressive
    │   3. Verify with multiple methods
    │
    └── Both recovery AND cleanup needed?
        → Complete recovery first, verify data saved,
          then proceed with cleanup

Important Considerations

  • Backup first: Before any cleanup operations, ensure recovered data is saved outside the repository
  • Remote repositories: This cleanup only affects the local repository; if secrets were pushed to a remote, additional steps are needed
  • Cloned copies: Any cloned copies of the repository may still contain the secrets
  • Credential rotation: After recovering exposed secrets, rotate them immediately regardless of cleanup success

平台分布

Claude Code

26.04%
按下载量换算71

Gemini CLI

21.43%
按下载量换算58

Codex

17.86%
按下载量换算49

Antigravity

12.67%
按下载量换算34

OpenCode

8.21%
按下载量换算22

windsurf

3.43%
按下载量换算9

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

未通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。

继续浏览同类 Skills