ctx-shrink
ctx-shrink — Codebase analyzer for AI era. Generates smart context maps and catches packaging mistakes before they leak.
- License 许可
- MIT
- 最近更新
- 2026-06-10
- Stars
- ★ 3
- Forks
- 0
01 前言 Front Matter
- id
- ctx-shrink
- name
- ctx-shrink
- risk
- safe
- source
- personal
- category
- developer-tools
- date_added
- 2026-04-05
- description
- ctx-shrink — Codebase analyzer for AI era. Generates smart context maps and catches packaging mistakes before they leak.
03 SKILL.md 正文
🛡️ ctx-shrink — AI Codebase Analyzer
When to Use
This skill is applicable when the user wants to:
- Analyze a codebase and generate a smart context map for AI agents
- Audit a project for accidentally committed secrets (
.env, keys, certs) - Check if a project is safe to publish (source maps, private files)
- Get a quick architecture overview of an unfamiliar codebase
📋 Instructions
You are an expert with ctx-shrink. Your job is to:
- Run ctx-shrink on the user's project directory
- Read the output (
AI-CONTEXT.mdor custom output file) - Explain what it found — architecture, endpoints, models, issues
- Recommend fixes for any security/safety issues found
🚀 Usage
Run analysis
ctx-shrink /path/to/project
ctx-shrink /path/to/project --out report.md
ctx-shrink /path/to/project --format json
Flags
| Flag | Description |
|---|---|
--max-depth N |
Limit directory depth |
--format json |
JSON output |
--out FILE |
Custom output file |
Common use cases
Quick project overview:
ctx-shrink . --out AI-CONTEXT.md
Pre-publish safety check:
ctx-shrink . --out publish-audit.md
For a specific path:
ctx-shrink ~/projects/my-api
📊 What it catches
| Check | What it catches |
|---|---|
| 📊 Project Analysis | Architecture, endpoints, models, dependencies |
| 🛡️ Gitignore Audit | .env, secrets, keys not in .gitignore |
| 📦 Publish Safety | Source maps, private keys, certs that would leak on publish |
⚠️ Rules
- Do not download installers, pipe
curl/wgetto a shell, or write binaries to system paths (/usr/local/bin, etc.). This skill only assumesctx-shrinkis already onPATH. - If
ctx-shrinkis not installed, send the user to the repository install section and let them choose a verified method: https://github.com/etherman-os/ctx-shrink#install - Always read the output file after running
- Present findings in a clear, actionable format
04 同仓库更多 Skills
youtube-content
YouTube transcripts to summaries, threads, blogs.
xurl
X/Twitter via xurl CLI: post, search, DM, media, v2 API.
touchdesigner-mcp
Control a running TouchDesigner instance via twozero MCP — create operators, set parameters, wire connections, execute Python, build real-time visuals. 36 native tools.
test-driven-development
TDD: enforce RED-GREEN-REFACTOR, tests before code.
teams-meeting-pipeline
Operate the Teams meeting summary pipeline via Hermes CLI — summarize meetings, inspect pipeline status, replay jobs, manage Microsoft Graph subscriptions.
systematic-debugging
4-phase root cause debugging: understand bugs before fixing.