Token导航 LogoToken导航

Agent Skill · 研究检索

sanitize-git-repo(清理 git 仓库)

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

sanitize-git-repo 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为接触敏感数据;许可证为 MIT,第三方扫描有未通过项,按安装量在研究检索类的 73,675 个 Skill 里排第 45,360。

总安装 855周安装 36GitHub Stars 93下载 389核验 2026-05-01

安装说明

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

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/letta-ai/skills --skill sanitize-git-repo

这个 Skill 是做什么的

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

sanitize-git-repo 用于查找、检索和筛选相关信息。适合在 Codex、Claude、Cursor、Gemini CLI 中根据关键词、任务场景或来源线索快速定位候选结果。通过 npx skills add 命令从指定 GitHub 仓库安装,需结合原始 README 确认具体用法。

安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。当前分类为研究检索,暂无更多功能说明。

来源仓库内路径:skills/sanitize-git-repo

上手步骤

4 步
  1. 1

    确认自己的宿主工具

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

  2. 2

    拿到安装命令

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

  3. 3

    安装后重启宿主

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

  4. 4

    按最小权限试用

    它需要接触敏感数据,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

sanitize-git-repo 怎么安装?

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

sanitize-git-repo 支持哪些 AI 工具?

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

sanitize-git-repo 需要什么权限?

权限级别是接触敏感数据。该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

sanitize-git-repo 是免费的吗?

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

sanitize-git-repo 用的人多吗?

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

sanitize-git-repo 安全吗?

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

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

值得选的地方

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

先想清楚的地方

  • 需要接触敏感数据,装到常用环境前要先评估影响面。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

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

不太适合

  • 环境里有大量密钥、凭证,不方便给第三方 Skill 读取的人。
  • 需要厂商级技术支持和 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调用外部服务未明确有提醒
sanitize-git-repo

清理 git 仓库 · 本页

85593接触敏感数据MIT未通过

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

SKILL.md 原文

Sanitize Git Repository

This skill provides guidance for systematically identifying and replacing sensitive information in git repositories, including API keys, tokens, passwords, and other credentials.

When to Use This Skill

  • Sanitizing a repository before sharing or open-sourcing
  • Removing accidentally committed secrets from a codebase
  • Replacing hardcoded credentials with placeholders
  • Auditing a repository for sensitive information
  • Preparing code for security review

Recommended Approach

Phase 1: Comprehensive Discovery

Build a complete inventory of all sensitive values before making any changes. This prevents the common mistake of discovering additional secrets mid-process.

Common Secret Patterns to Search:

TypePattern/PrefixExample
AWS Access KeysAKIA[A-Z0-9]{16}AKIAIOSFODNN7EXAMPLE
AWS Secret Keys40-char base64 stringsOften near access keys
GitHub Tokensghp_, gho_, ghs_, ghr_ghp_xxxxxxxxxxxx
Huggingface Tokenshf_hf_xxxxxxxxxxxx
Generic API Keysapi[_-]?key, apikeyVaries
Bearer Tokensbearer, tokenVaries
Private Keys-----BEGIN.*PRIVATE KEY-----RSA/EC keys
Database URLspostgres://, mysql://, mongodb://Connection strings
Password Fieldspassword, passwd, pwdVaries

Discovery Strategy:

  1. Search for known prefixes and patterns using regex
  2. Search for common variable names (API_KEY, SECRET, TOKEN, PASSWORD, CREDENTIAL)
  3. Check configuration files (.env, config.*, settings.*, *.json, *.yaml, *.yml)
  4. Examine test fixtures and mock data files
  5. Check embedded data within other formats (JSON encoded in strings, base64 encoded content)

Important Locations to Check:

  • Configuration files and environment templates
  • Test fixtures and sample data
  • Documentation and README files
  • CI/CD configuration files
  • Docker and deployment configurations
  • JSON/YAML data files (secrets may be embedded in structured data)
  • Git diff outputs or patch files stored in the repository

Phase 2: Inventory Documentation

Before making changes, create a documented list of:

  1. Each unique sensitive value found
  2. All file locations where each value appears
  3. The exact string to match (including surrounding context if needed for uniqueness)
  4. The placeholder to use for replacement

Placeholder Conventions:

  • Use descriptive placeholders that indicate the type: <AWS_ACCESS_KEY>, <GITHUB_TOKEN>, <DATABASE_PASSWORD>
  • Maintain consistency across all replacements
  • Match the format specified by the user if provided

Phase 3: Systematic Replacement

Execute replacements methodically:

  1. Work through the inventory one secret at a time
  2. For each secret, replace ALL occurrences across ALL files
  3. Verify each replacement immediately after making it
  4. Use exact string matching to avoid unintended modifications

Replacement Best Practices:

  • Read files before editing to ensure exact string matching
  • Handle whitespace and formatting precisely
  • Consider secrets embedded in JSON or other structured formats (may require escaping)
  • Use batch replacements when the same value appears multiple times in one file

Phase 4: Verification

After all replacements:

  1. Re-run all original discovery searches to confirm no secrets remain
  2. Search for partial matches of sensitive values
  3. Run any provided test suites to validate the sanitization
  4. Check that placeholders are properly formatted

Common Pitfalls

1. Incomplete Initial Discovery

Problem: Secrets discovered incrementally during the replacement process, requiring backtracking.

Prevention: Invest time upfront in comprehensive searching using multiple patterns and checking all file types, including data files and embedded content.

2. Secrets in Unexpected Locations

Problem: Secrets appear in JSON files, embedded strings, test fixtures, or encoded data that aren't found by simple searches.

Prevention: Search recursively through all file types. Check JSON and YAML files specifically. Look for base64-encoded content that might contain secrets.

3. Exact String Matching Failures

Problem: Edit operations fail due to whitespace differences or character encoding issues.

Prevention: Always read the target file first to understand exact formatting. Copy strings exactly as they appear in the file, including whitespace.

4. Missing Occurrences

Problem: Multiple occurrences of the same secret exist, but only some are replaced.

Prevention: After each replacement, immediately verify by searching for the original value again. Use replace-all functionality when available.

5. Git History Considerations

Problem: Secrets remain in git history even after being removed from current files.

Prevention: Clarify with the user whether git history sanitization is required. If so, tools like git filter-branch or BFG Repo-Cleaner may be needed (this is a separate, more complex operation).

6. Tool Availability Assumptions

Problem: Specialized search tools (like ripgrep) may not be available in all environments.

Prevention: Have fallback approaches ready. Standard grep -r works in most environments. Test tool availability before relying on it.

Verification Checklist

Before considering the task complete:

  • All known secret patterns have been searched for
  • Configuration files have been examined
  • JSON/YAML data files have been checked
  • Test fixtures and mock data have been reviewed
  • Each identified secret has been replaced in all locations
  • Verification searches confirm no original secrets remain
  • Placeholders follow a consistent format
  • Any provided tests pass successfully

Search Commands Reference

Standard grep (widely available):

# Search for AWS access keys
grep -rn "AKIA[A-Z0-9]\{16\}" . --exclude-dir=.git

# Search for common token prefixes
grep -rn "ghp_\|gho_\|ghs_\|hf_" . --exclude-dir=.git

# Search for password-related strings
grep -rn -i "password\|passwd\|pwd" . --exclude-dir=.git

# Search for API key patterns
grep -rn -i "api[_-]\?key\|apikey" . --exclude-dir=.git

Always exclude the .git directory from searches to avoid noise from git internals.

平台分布

Claude Code

28.3%
按下载量换算110

Gemini CLI

24.05%
按下载量换算94

Codex

15.39%
按下载量换算60

Antigravity

10.83%
按下载量换算42

OpenCode

7.25%
按下载量换算28

windsurf

3.25%
按下载量换算13

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

未通过

权限和风险

接触敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

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

继续浏览同类 Skills