Token导航 LogoToken导航TokenDH.com
研究检索敏感数据github未标认证来源可访问clear审计异常

sanitize-git-repo清理 git 仓库

Agent Skill

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

总安装

855

周安装

36

GitHub Stars

93

下载量

389
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 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

简介

sanitize-git-repo 用于查找、检索和筛选相关信息。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中根据关键词、任务场景或来源线索快速定位候选结果。
  • 通过 npx skills add 命令从指定 GitHub 仓库安装,需结合原始 README 确认具体用法。
  • 安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。
  • 当前分类为研究检索,暂无更多功能说明。

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.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

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、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。

来源信息

继续浏览同类 Skills