ホーム/安全与合规/ghost-repo-context
G

ghost-repo-context

by @ghostsecurityv
4.8(7)

プロジェクトの検出とアーキテクチャの要約を通じてリポジトリのコンテキスト情報を収集し、結果を `repo.md` ファイルに書き込みます。

Repository SecurityCode ScanningSupply Chain SecurityGit SecurityVulnerability ManagementGitHub
インストール方法
npx skills add ghostsecurity/skills --skill ghost-repo-context
compare_arrows

Before / After 効果比較

1
使用前

新しいプロジェクトや複雑なコードベースに直面すると、そのアーキテクチャとコンテキストを理解するのに時間と労力がかかります。ファイル構造や依存関係を手動で整理することは非効率的で、エラーが発生しやすいです。

使用後

プロジェクトを自動的に検出し、アーキテクチャを要約し、詳細なリポジトリコンテキストレポートを迅速に生成します。理解効率を大幅に向上させ、開発とセキュリティ分析を加速します。

description SKILL.md

ghost-repo-context

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:

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:

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

Detect Projects — Read <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.

Summarize Each Project — Read <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.

Write repo.md — Combine detection and summary results into <cache_dir>/repo.md using the format in <skill_dir>/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

Validate — Read <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.

Output — Return: Repository context is at: <cache_dir>/repo.md

Weekly Installs453Repositoryghostsecurity/skillsGitHub Stars362First SeenFeb 20, 2026Security AuditsGen Agent Trust HubPassSocketPassSnykPassInstalled onclaude-code386kimi-cli87gemini-cli87amp87github-copilot87codex87

forumユーザーレビュー (0)

レビューを書く

効果
使いやすさ
ドキュメント
互換性

レビューなし

統計データ

インストール数352
評価4.8 / 5.0
バージョン
更新日2026年3月17日
比較事例1 件

ユーザー評価

4.8(7)
5
0%
4
0%
3
0%
2
0%
1
0%

この Skill を評価

0.0

対応プラットフォーム

🔧Claude Code
🔧OpenClaw
🔧OpenCode
🔧Codex
🔧Gemini CLI
🔧GitHub Copilot
🔧Amp
🔧Kimi CLI

タイムライン

作成2026年3月17日
最終更新2026年3月17日