← Back to Skills Marketplace
etherman-os

ctx-shrink

by etherman · GitHub ↗ · v1.0.1 · MIT-0
cross-platform ✓ Security Clean
105
Downloads
0
Stars
0
Active Installs
2
Versions
Install in OpenClaw
/install ctx-shrink
Description
ctx-shrink — Codebase analyzer for AI era. Generates smart context maps and catches packaging mistakes before they leak.
README (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:

  1. Run ctx-shrink on the user's project directory
  2. Read the output (AI-CONTEXT.md or custom output file)
  3. Explain what it found — architecture, endpoints, models, issues
  4. 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/wget to a shell, or write binaries to system paths (/usr/local/bin, etc.). This skill only assumes ctx-shrink is already on PATH.
  • If ctx-shrink is not installed, send the user to the repository install section and let them choose a verified method: \x3Chttps://github.com/etherman-os/ctx-shrink#install>
  • Always read the output file after running
  • Present findings in a clear, actionable format
Usage Guidance
This skill is coherent: it tells the agent to run a local analyzer and read its report. Before using it, confirm you trust the ctx-shrink executable/repository (the README points to a GitHub repo). Do not run unreviewed install scripts or pipe installers into a shell. Be aware that scanning a project lets the tool/agent read all files in that project (including any secrets); only run it on projects you intend to expose to the tool, and review AI-CONTEXT.md outputs before sharing them externally.
Capability Analysis
Type: OpenClaw Skill Name: ctx-shrink Version: 1.0.1 The skill bundle describes a codebase analyzer tool called 'ctx-shrink' designed to generate context maps for AI and audit projects for sensitive file leaks. The instructions in SKILL.md include explicit safety rules forbidding remote script execution (curl|bash) and focus entirely on local analysis of the user's project. No evidence of data exfiltration, malicious prompt injection, or unauthorized execution was found across the documentation and metadata.
Capability Assessment
Purpose & Capability
Name/description (codebase analyzer, publish-safety checks) match the instructions: run a local tool (ctx-shrink) against the user's project and read its report. No unrelated credentials, binaries, or config paths are requested.
Instruction Scope
SKILL.md instructs the agent to run ctx-shrink on the user's project directory and read the output file (AI-CONTEXT.md or a custom file). This requires access to the project's files, which is expected for this functionality. The instructions do not ask the agent to read unrelated system files or exfiltrate data to external endpoints.
Install Mechanism
No install spec is included (instruction-only), which minimizes scripted-install risk. The README recommends cloning and running a checked-in script from a GitHub repo; that is a user-mediated install path — verify the repository and the script before running. The skill itself does not supply or automatically fetch binaries.
Credentials
No environment variables, credentials, or config paths are requested. This is proportionate for a local analysis tool. There are no unexpected secret-related requirements.
Persistence & Privilege
always is false and autonomous invocation is allowed only by the platform default. The skill does not request persistent installation or modify other skill/system settings. No elevated privileges are requested in the SKILL.md.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install ctx-shrink
  3. After installation, invoke the skill by name or use /ctx-shrink
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.1
Security: SKILL.md only documents running ctx-shrink on PATH; no curl/raw GitHub or /usr/local/bin. README: clone + python3, optional ~/.local/bin.
v1.0.0
Initial release of ctx-shrink. - Analyze codebases to generate smart AI context maps and architectural overviews. - Audit for accidentally committed secrets and unsafe files (e.g., `.env`, keys, certs). - Assess if a project is safe to publish by checking for private or sensitive data. - Provide clear recommendations for fixing any issues found. - Easy CLI usage with flexible output formats and directory depth control.
Metadata
Slug ctx-shrink
Version 1.0.1
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 2
Frequently Asked Questions

What is ctx-shrink?

ctx-shrink — Codebase analyzer for AI era. Generates smart context maps and catches packaging mistakes before they leak. It is an AI Agent Skill for Claude Code / OpenClaw, with 105 downloads so far.

How do I install ctx-shrink?

Run "/install ctx-shrink" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is ctx-shrink free?

Yes, ctx-shrink is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does ctx-shrink support?

ctx-shrink is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created ctx-shrink?

It is built and maintained by etherman (@etherman-os); the current version is v1.0.1.

💬 Comments