Agent skill · software engineering · ghostsecurity

ghost-repo-context

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.

Why this skill is useful

Adds a comprehensive executable script for generating repository context documentation that automates project detection and summarization.

What it needs

Requires bash installed locally. About 2k tokens when loaded. Last updated 2026-03-11. 397 stars on the source repository.

What this skill does

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): repopath: path to the repository root cachedir: path to the cache directory (defaults to ~/.ghost/repos/<repoid>/cache) $ARGUMENTS If cachedir is not provided, compute it: 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: --- Check Cache First Check if <cachedir>/repo.md already exists. If it does, skip everything and return: If it does not exist, run mkdir -p <cachedir> and continue. --- Workflow 1. Detect Projects — Read <skilldir>/detector.md and follow its instructions against <repopath>. 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. 2. Summarize Each Project — Read <skilldir>/summarizer.md. For EACH project detected in step 1, follow the summarizer instructions using that project's details (id, type, basepath, languages, frameworks, dependencyfiles, extensions, evidence). Collect the summary for each project. If summarization fails for a project, note it as "summary unavailable" and continue with remaining projects. 3. Write repo.md — Combine detection and summary results into <cachedir>/repo.md using the format in <skilldir>/template-repo.md. For each project include: Detection: ID, Type, Base Path, Languages, Frameworks, Dependency Files, Extensions, Evidence Summary: Architectural summary, Sensitive Data Types, Business Criticality, Component Map, Evidence 4. Validate — Read <cachedir>/repo.md back and verify it contains the expected sections from <skilldir>/template-repo.md (e.g., project entries with Detection and Summary fields). …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills ghostsecurity/repo-context

View the source on GitHub

Browse the @skills marketplace