ghost-scan-secrets by ghostsecurity/skills
npx skills add https://github.com/ghostsecurity/skills --skill ghost-scan-secrets你是机密信息扫描的顶层编排器。你的唯一工作是调用 Task 工具来生成子代理执行实际工作。下面的每个步骤都为你提供了要使用的确切 Task 工具参数。不要自己执行工作。
~/.ghost/repos/<repo_id>/scans/<short_sha>/secretsgit rev-parse --short HEAD(对于非 git 目录,回退到 YYYYMMDD)$ARGUMENTS
上面提供的任何值都将覆盖默认值。
运行此 Bash 命令来计算仓库特定的输出目录、创建它并定位技能文件:
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
repo_name=$(basename "$(pwd)") && remote_url=$(git remote get-url origin 2>/dev/null || pwd) && short_hash=$(printf '%s' "$remote_url" | git hash-object --stdin | cut -c1-8) && repo_id="${repo_name}-${short_hash}" && short_sha=$(git rev-parse --short HEAD 2>/dev/null || date +%Y%m%d) && ghost_repo_dir="$HOME/.ghost/repos/${repo_id}" && scan_dir="${ghost_repo_dir}/scans/${short_sha}/secrets" && cache_dir="${ghost_repo_dir}/cache" && mkdir -p "$scan_dir/findings" && skill_dir=$(find . -path '*skills/scan-secrets/SKILL.md' 2>/dev/null | head -1 | xargs dirname) && echo "scan_dir=$scan_dir cache_dir=$cache_dir skill_dir=$skill_dir"
存储 scan_dir(~/.ghost/repos/ 下的绝对路径)、cache_dir(仓库级别的缓存目录)和 skill_dir(包含 agents/、scripts/ 等的技能目录的绝对路径)。
此步骤之后,你唯一剩下的工具就是 Task。对于步骤 1–4,不要使用 Bash、Read、Grep、Glob 或任何其他工具。
调用 Task 工具来初始化 poltergeist 二进制文件:
{
"description": "Initialize poltergeist binary",
"subagent_type": "general-purpose",
"prompt": "You are the init agent. Read and follow the instructions in <skill_dir>/agents/init/agent.md.\n\n## Inputs\n- skill_dir: <skill_dir>"
}
初始化代理将 poltergeist 安装到 ~/.ghost/bin/poltergeist(在 Windows 上是 poltergeist.exe)。
调用 Task 工具来运行 poltergeist 扫描器:
{
"description": "Scan for secret candidates",
"subagent_type": "general-purpose",
"prompt": "You are the scan agent. Read and follow the instructions in <skill_dir>/agents/scan/agent.md.\n\n## Inputs\n- repo_path: <repo_path>\n- scan_dir: <scan_dir>"
}
扫描代理返回候选结果数量,并将结果写入 <scan_dir>/candidates.json。
如果候选结果数量为 0 : 跳过步骤 3,直接进入步骤 4(汇总),无发现结果。
调用 Task 工具来分析候选结果:
{
"description": "Analyze secret candidates",
"subagent_type": "general-purpose",
"prompt": "You are the analysis agent. Read and follow the instructions in <skill_dir>/agents/analyze/agent.md.\n\n## Inputs\n- repo_path: <repo_path>\n- scan_dir: <scan_dir>\n- skill_dir: <skill_dir>\n- cache_dir: <cache_dir>"
}
分析代理为每个候选结果生成并行分析器,并将发现结果文件写入 <scan_dir>/findings/。
调用 Task 工具来汇总发现结果:
{
"description": "Summarize scan results",
"subagent_type": "general-purpose",
"prompt": "You are the summarize agent. Read and follow the instructions in <skill_dir>/agents/summarize/agent.md.\n\n## Inputs\n- repo_path: <repo_path>\n- scan_dir: <scan_dir>\n- skill_dir: <skill_dir>\n- cache_dir: <cache_dir>"
}
执行完所有任务后,向用户报告扫描结果。
如果任何 Task 调用失败,请重试一次。如果再次失败,则停止并报告失败。
每周安装量
800
仓库
GitHub 星标数
370
首次出现
2026年2月20日
安全审计
安装于
claude-code618
codex308
gemini-cli307
opencode307
amp306
github-copilot306
You are the top-level orchestrator for secrets scanning. Your ONLY job is to call the Task tool to spawn subagents to do the actual work. Each step below gives you the exact Task tool parameters to use. Do not do the work yourself.
~/.ghost/repos/<repo_id>/scans/<short_sha>/secretsgit rev-parse --short HEAD (falls back to YYYYMMDD for non-git dirs)$ARGUMENTS
Any values provided above override the defaults.
Run this Bash command to compute the repo-specific output directory, create it, and locate the skill files:
repo_name=$(basename "$(pwd)") && remote_url=$(git remote get-url origin 2>/dev/null || pwd) && short_hash=$(printf '%s' "$remote_url" | git hash-object --stdin | cut -c1-8) && repo_id="${repo_name}-${short_hash}" && short_sha=$(git rev-parse --short HEAD 2>/dev/null || date +%Y%m%d) && ghost_repo_dir="$HOME/.ghost/repos/${repo_id}" && scan_dir="${ghost_repo_dir}/scans/${short_sha}/secrets" && cache_dir="${ghost_repo_dir}/cache" && mkdir -p "$scan_dir/findings" && skill_dir=$(find . -path '*skills/scan-secrets/SKILL.md' 2>/dev/null | head -1 | xargs dirname) && echo "scan_dir=$scan_dir cache_dir=$cache_dir skill_dir=$skill_dir"
Store scan_dir (the absolute path under ~/.ghost/repos/), cache_dir (the repo-level cache directory), and skill_dir (the absolute path to the skill directory containing agents/, scripts/, etc.).
After this step, your only remaining tool is Task. Do not use Bash, Read, Grep, Glob, or any other tool for Steps 1–4.
Call the Task tool to initialize the poltergeist binary:
{
"description": "Initialize poltergeist binary",
"subagent_type": "general-purpose",
"prompt": "You are the init agent. Read and follow the instructions in <skill_dir>/agents/init/agent.md.\n\n## Inputs\n- skill_dir: <skill_dir>"
}
The init agent installs poltergeist to ~/.ghost/bin/poltergeist (or poltergeist.exe on Windows).
Call the Task tool to run the poltergeist scanner:
{
"description": "Scan for secret candidates",
"subagent_type": "general-purpose",
"prompt": "You are the scan agent. Read and follow the instructions in <skill_dir>/agents/scan/agent.md.\n\n## Inputs\n- repo_path: <repo_path>\n- scan_dir: <scan_dir>"
}
The scan agent returns the candidate count and writes <scan_dir>/candidates.json.
If candidate count is 0 : Skip to Step 4 (Summarize) with no findings.
Call the Task tool to analyze the candidates:
{
"description": "Analyze secret candidates",
"subagent_type": "general-purpose",
"prompt": "You are the analysis agent. Read and follow the instructions in <skill_dir>/agents/analyze/agent.md.\n\n## Inputs\n- repo_path: <repo_path>\n- scan_dir: <scan_dir>\n- skill_dir: <skill_dir>\n- cache_dir: <cache_dir>"
}
The analysis agent spawns parallel analyzers for each candidate and writes finding files to <scan_dir>/findings/.
Call the Task tool to summarize the findings:
{
"description": "Summarize scan results",
"subagent_type": "general-purpose",
"prompt": "You are the summarize agent. Read and follow the instructions in <skill_dir>/agents/summarize/agent.md.\n\n## Inputs\n- repo_path: <repo_path>\n- scan_dir: <scan_dir>\n- skill_dir: <skill_dir>\n- cache_dir: <cache_dir>"
}
After executing all the tasks, report the scan results to the user.
If any Task call fails, retry it once. If it fails again, stop and report the failure.
Weekly Installs
800
Repository
GitHub Stars
370
First Seen
Feb 20, 2026
Security Audits
Gen Agent Trust HubFailSocketPassSnykWarn
Installed on
claude-code618
codex308
gemini-cli307
opencode307
amp306
github-copilot306