← 返回 Skills 市场
etherman-os

ctx-shrink

作者 etherman · GitHub ↗ · v1.0.1 · MIT-0
cross-platform ✓ 安全检测通过
105
总下载
0
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install ctx-shrink
功能描述
ctx-shrink — Codebase analyzer for AI era. Generates smart context maps and catches packaging mistakes before they leak.
使用说明 (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
安全使用建议
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.
功能分析
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.
能力评估
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.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install ctx-shrink
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /ctx-shrink 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
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.
元数据
Slug ctx-shrink
版本 1.0.1
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 2
常见问题

ctx-shrink 是什么?

ctx-shrink — Codebase analyzer for AI era. Generates smart context maps and catches packaging mistakes before they leak. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 105 次。

如何安装 ctx-shrink?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install ctx-shrink」即可一键安装,无需额外配置。

ctx-shrink 是免费的吗?

是的,ctx-shrink 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

ctx-shrink 支持哪些平台?

ctx-shrink 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 ctx-shrink?

由 etherman(@etherman-os)开发并维护,当前版本 v1.0.1。

💬 留言讨论