ghost-repo-context

Solid

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.

Data & Documents 386 stars 26 forks Updated 3 months ago Apache-2.0

Install

View on GitHub

Quality Score: 86/100

Stars 20%
86
Recency 20%
50
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Repository Context Builder 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. ## Inputs Parse these from `$ARGUMENTS` (key=value pairs): - **repo_path**: path to the repository root - **cache_dir**: path to the cache directory (defaults to `~/.ghost/repos/<repo_id>/cache`) $ARGUMENTS If `cache_dir` is not provided, compute it: ```bash 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}" && cache_dir="$HOME/.ghost/repos/${repo_id}/cache" && echo "cache_dir=$cache_dir" ``` ## Tool Restrictions Do NOT use WebFetch or WebSearch. All work must use only local files in the repository. ## Setup Discover this skill's own directory so you can reference agent files: ```bash skill_dir=$(find . -path '*/skills/repo-context/SKILL.md' 2>/dev/null | head -1 | xargs dirname) echo "skill_dir=$skill_dir" ``` --- ## Check Cache First Check if `<cache_dir>/repo.md` already exists. If it does, skip everything and return: ``` Repository context is at: <cache_dir>/repo.md ``` If it does not exist, run `mkdir -p <cache_dir>` and continue. --- ## Workflow 1. **Detect Projects** — Read `<skill_dir>/detector.md` and follow its instructions against `<repo_path>`. Save the full detection output (proj...

Details

Author
ghostsecurity
Repository
ghostsecurity/skills
Created
4 months ago
Last Updated
3 months ago
Language
Shell
License
Apache-2.0

Similar Skills

Semantically similar based on skill content — not just same category