Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Scans directory structure, detects projects, maps dependencies, and documents code organization into a repo.md file. Use when the user needs a codebase overview, project structure map, or repository context before security analysis.
.claude/skills/ghostsecurity-ghost-repo-context/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-16 | ✗→✓ | ▲ Improved | 25% | 0% |
| case-22 | ✗→✓ | ▲ Improved | -9% | 0% |
| case-05 | ✓→✗ | ▼ Worse | -7% | 0% |
| case-06 | ✓→✗ | ▼ Worse | -18% | 0% |
| case-10 | ✓→✗ | ▼ Worse | -32% | 0% |
You gather repository context by detecting projects, summarizing their architecture, and writing the results to repo.md. Do all work yourself — do not spawn subagents or delegate.
Parse these from $ARGUMENTS (key=value pairs):
~/.ghost/repos/<repo_id>/cache)$ARGUMENTS
If cache_dir is not provided, compute it:
bashrepo_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}" && cache_dir="$HOME/.ghost/repos/${repo_id}/cache" && echo "cache_dir=$cache_dir"
Do NOT use WebFetch or WebSearch. All work must use only local files in the repository.
Discover this skill's own directory so you can reference agent files:
bashskill_dir=$(find . -path '*/skills/repo-context/SKILL.md' 2>/dev/null | head -1 | xargs dirname) echo "skill_dir=$skill_dir"
Check if <cache_dir>/repo.md already exists. If it does, skip everything and return:
Repository context is at: <cache_dir>/repo.mdIf it does not exist, run mkdir -p <cache_dir> and continue.
<skill_dir>/detector.md and follow its instructions against <repo_path>. Save the full detection output (project details needed for step 2). If detection finds no projects, write a minimal repo.md noting "No projects detected" and skip to step 4.<skill_dir>/summarizer.md. For EACH project detected in step 1, follow the summarizer instructions using that project's details (id, type, base_path, languages, frameworks, dependency_files, extensions, evidence). Collect the summary for each project. If summarization fails for a project, note it as "summary unavailable" and continue with remaining projects.<cache_dir>/repo.md using the format in <skill_dir>/template-repo.md. For each project include:<cache_dir>/repo.md back and verify it contains the expected sections from <skill_dir>/template-repo.md (e.g., project entries with Detection and Summary fields). If the file is missing or malformed, retry the write once before reporting an error.Repository context is at: <cache_dir>/repo.md| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-05 | pass→fail | 8,141 | 12,767 | +57% | 1 | 1 | 0% | 1,648 | 1,529 | -7% | 0 | 0 | — |
case-20 | fail→fail | 5,359 | 6,619 | +24% | 1 | 1 | 0% | 886 | 1,024 | +16% | 0 | 0 | — |
case-06 | pass→fail | 7,003 | 8,826 | +26% | 1 | 1 | 0% | 1,370 | 1,122 | -18% | 0 | 0 | — |
case-07 | fail→fail | 8,953 | 7,140 | -20% | 1 | 1 | 0% | 331 | 1,066 | +222% | 0 | 0 | — |
case-21 | fail→fail | 16,862 | 28,510 | +69% | 1 | 1 | 0% | 2,894 | 6,904 | +139% | 0 | 0 | — |
case-13 | fail→fail | 11,413 | 10,290 | -10% | 1 | 1 | 0% | 2,028 | 1,164 | -43% | 0 | 0 | — |
case-01 | fail→fail | 5,572 | 8,417 | +51% | 1 | 1 | 0% | 291 | 1,191 | +309% | 0 | 0 | — |
case-02 | fail→fail | 20,090 | 7,259 | -64% | 1 | 1 | 0% | 281 | 1,080 | +284% | 0 | 0 | — |
case-03 | fail→fail | 6,735 | 8,820 | +31% | 1 | 1 | 0% | 474 | 1,325 | +180% | 0 | 0 | — |
case-04 | fail→fail | 5,599 | 7,752 | +38% | 1 | 1 | 0% | 224 | 1,105 | +393% | 0 | 0 | — |
case-14 | fail→fail | 27,291 | 7,561 | -72% | 1 | 1 | 0% | 6,341 | 1,161 | -82% | 0 | 0 | — |
case-08 | fail→fail | 15,042 | 7,068 | -53% | 1 | 1 | 0% | 2,125 | 1,256 | -41% | 0 | 0 | — |
case-09 | fail→fail | 7,423 | 7,693 | +4% | 1 | 1 | 0% | 244 | 1,139 | +367% | 0 | 0 | — |
case-10 | pass→fail | 10,665 | 7,009 | -34% | 1 | 1 | 0% | 1,674 | 1,135 | -32% | 0 | 0 | — |
case-11 | fail→fail | 11,270 | 6,341 | -44% | 1 | 1 | 0% | 2,081 | 1,066 | -49% | 0 | 0 | — |
case-12 | pass→fail | 8,694 | 8,102 | -7% | 1 | 1 | 0% | 1,264 | 1,254 | -1% | 0 | 0 | — |
case-15 | fail→fail | 10,966 | 6,123 | -44% | 1 | 1 | 0% | 1,973 | 1,024 | -48% | 0 | 0 | — |
case-16 | fail→pass | 6,777 | 3,495 | -48% | 1 | 1 | 0% | 1,070 | 1,342 | +25% | 0 | 0 | — |
case-17 | fail→fail | 27,533 | 5,992 | -78% | 1 | 1 | 0% | 4,606 | 1,035 | -78% | 0 | 0 | — |
case-18 | fail→fail | 5,024 | 5,554 | +11% | 1 | 1 | 0% | 248 | 1,028 | +315% | 0 | 0 | — |
case-19 | pass→fail | 10,194 | 7,021 | -31% | 1 | 1 | 0% | 1,560 | 1,121 | -28% | 0 | 0 | — |
case-22 | fail→pass | 8,038 | 1,851 | -77% | 1 | 1 | 0% | 1,134 | 1,028 | -9% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 4 counted toward the lift figure. The other 18 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of -14 percentage points is the difference between those two pass rates over the 4 comparable cases. 7 cases got worse with the skill loaded, and they are included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.