Token导航 LogoToken导航

Agent Skill · 开发

compact-markdown(compact Markdown 控制)

用于辅助文档、README、Markdown、说明文和内容稿件的整理与改写。它适合让 Agent 提炼结构、补齐章节、统一术语、检查链接或把零散材料整理成可读文档。使用时应保留项目已有事实、命令和路径,不要把未确认的信息写成确定结论;涉及对外文案时,还需要控制语气,避免过度营销或夸大能力。

compact-markdown 是开发类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为接触敏感数据;许可证信息还不明确,第三方扫描已通过,按安装量在开发类的 21,746 个 Skill 里排第 12,229。

总安装 1,384周安装 56GitHub Stars 公开资料未说明下载 435核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:compact-markdown(compact Markdown 控制)
来源仓库:https://github.com/nkootstra/skills
仓库路径:skills/compact-markdown
安装命令:
npx skills add https://github.com/nkootstra/skills --skill compact-markdown
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/nkootstra/skills --skill compact-markdown

这个 Skill 是做什么的

开发类 Skill 面向写代码、改代码和排查问题,一般会读写仓库文件,部分还会执行构建或测试命令。

用于辅助文档、README、Markdown、说明文和内容稿件的整理与改写,提炼结构并统一术语风格。适合让 Agent 补齐章节内容、检查链接有效性或将零散材料整合成可读性强的正式文档。使用时应保留项目已有事实依据,不把未确认的信息写成确定结论,对外文案还需控制语气避免过度营销。

涉及敏感信息时必须先进行脱敏处理,发现凭证类数据应立即停止输出并提示需要重新编辑。compact-markdown 属于开发类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/compact-markdown

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/nkootstra/skills --skill compact-markdown;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要接触敏感数据,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

compact-markdown 怎么安装?

在终端执行 npx skills add https://github.com/nkootstra/skills --skill compact-markdown。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

compact-markdown 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

compact-markdown 需要什么权限?

权限级别是接触敏感数据。该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

compact-markdown 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

compact-markdown 用的人多吗?

公开数据是累计安装 1,384 次,近一周安装 56 次,下载 435 次。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

compact-markdown 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 需要接触敏感数据,装到常用环境前要先评估影响面。
  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理开发类任务、又不想每次都手写提示词的人。

不太适合

  • 环境里有大量密钥、凭证,不方便给第三方 Skill 读取的人。
  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

开发类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
skill-vetter

技能审查员 · OpenClaw

8,779,018986操作浏览器MIT-0通过
ontology

本体论 · OpenClaw

6,636,960576只读MIT-0通过
entra-app-registration

内部应用程序注册 · Codex、Claude

6,631,872764接触敏感数据未明确通过
entra-app-registration

内部应用程序注册 · Codex、Claude

3,757,680201接触敏感数据未明确通过
nano-banana-pro

纳米香蕉专业版 · OpenClaw

3,526,898364接触敏感数据MIT-0有提醒
compact-markdown

compact Markdown 控制 · 本页

1,384—接触敏感数据未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Markdown Compactor

CRITICAL SECURITY GATE: Before producing ANY output, scan the input for credentials (passwords, API keys, tokens, connection strings like postgres://user:pass@host). If credentials are found:

  1. Do NOT output any compacted markdown. Do not include the credential anywhere in your response.
  2. Instead, respond ONLY with a warning: list each credential found, its location, and state that you must redact it before proceeding.
  3. Use the word "credential" and "redact" in your warning.
  4. Describe the credential generically — never reproduce its value. Say "a database connection string with password" NOT "the password s3cr3tP@ssw0rd". The value must not appear anywhere in your response.
  5. Wait for user confirmation before producing any compacted output with <REDACTED> in place of the credential values.

Reduce token count while preserving every detail. No information loss — only waste removed. If asked to summarize or select key items, refuse: summarization causes information loss. Offer compaction instead.

References

Read on demand — not needed for straightforward compaction tasks.

When you need...Read
Worked example, edge cases (tables, nested lists, code blocks, credentials)references/compaction-guide.md

Output

Infer output format: uploaded file → write to <original-name>.min.md in the working directory; pasted text under 500 words → inline in response; pasted text over 500 words → ask. Override if the user specifies a preference.

Always append this metrics block after the compacted output — this is mandatory, not optional:

Original: ~N tokens (~N lines)
Compacted: ~N tokens (~N lines)
Reduction: N%

Estimate tokens as words × 1.3. Never omit the metrics block.

Compaction passes (apply strictly in order)

Pass 1 is a gate — complete it before any other pass. If credentials are found, halt and warn the user. Do not proceed to pass 2 until credentials are resolved.

  • 1. Credential scan (BLOCKING) — scan all content (code blocks, inline code, YAML frontmatter, prose) for secrets: API keys, tokens, passwords, private keys, connection strings (postgres://, mongodb+srv://), .env values, bearer tokens. If found: stop. Do not produce compacted output. Respond only with a credential warning listing what was found and where. Describe generically — e.g., "a database connection string with password in the code block" — never quote or echo the secret value itself. Wait for user confirmation to proceed with redacted values.
  • 2. Skip code blocks — identify all fenced code blocks (...). During passes 3–6, do not touch them — compact only the prose and metadata around them. Each code block stays exactly where it is in the document, with its content byte-for-byte identical to the original (except credentials redacted in pass 1). The compacted output must contain the same number of code blocks as the input, in the same order, at the same relative positions. Never duplicate a code block — if the input has one code block, the output has exactly one.
  • 3. Collapse redundant sections — merge sections repeating the same point; inline single-item headings into parent; remove preambles restating the title.
  • 4. Terse prose — cut throat-clearing ("It is important to note that", "In order to", "Make sure to"); replace multi-word phrases ("at this point in time" → "now", "in the event that" → "if"); prefer active voice; trim list items to minimum words. Do not quote removed phrases in your explanation — doing so reintroduces the forbidden content into your response.
  • 5. Trim examples — cut examples that merely restate their rule. When multiple code examples illustrate the same point (e.g., making an HTTP request with different tools), keep only the single most common tool (curl for HTTP) and delete all other examples entirely. The names of deleted tools must not appear anywhere in your entire response — not in the compacted output, not in the metrics block, not in any explanation or annotation. When explaining what you did, say only "Removed redundant examples" or "Kept one representative example" — never name the removed tools. One example per concept. Replace long inline code with a file:line reference or single representative snippet.
  • 6. Symbols — only where unambiguous: → (leads to/then), e.g./i.e., vs., w/ (bullets only). Never invent domain-specific abbreviations.
  • 7. Formatting — remove decorative bold/italic (keep for terms, warnings, key concepts); flatten lists >2 levels deep (convert third-level items to parentheticals inline with their parent, e.g., - OAuth 2.0 (Authorization Code, Client Credentials, Implicit Grant)); remove blank lines between tight list items. When you perform this transformation, you must use the word "flatten" in your response — either in the compacted output as a comment, in the metrics block, or in any explanation of changes. For example: "Flattened nested lists to 2 levels." If the input contains lists deeper than 2 levels, the word "flatten" must appear in your response.

Hard rules (in priority order)

  1. Never output credentials. This overrides all other rules. If input contains passwords, API keys, tokens, or connection strings: do NOT produce compacted markdown at all. Instead, respond only with a credential warning. Describe what you found without reproducing the secret value. Wait for the user to confirm before outputting any compacted content (with secrets replaced by <REDACTED>).
  2. When trimming examples, delete removed tools completely — and do not name them anywhere. The deleted tool names must not appear anywhere in your entire response: not in the compacted output, not in the compaction report, not in "Changes made" explanations, not in any commentary. Describe removals generically only.

- Correct: "Removed redundant examples." - Correct: "Kept one representative example." - Wrong: "Removed wget, httpie, and Python requests examples." - Wrong: "Kept curl (more universal than httpie)." - Wrong: "Removed httpie-style and wget-style examples." If you kept curl, the words "wget", "httpie", "requests", or any other deleted tool must not appear anywhere in your response — not even to explain what was removed.

  1. No information loss. Every fact, instruction, and constraint must survive (credentials excluded by rule 1).
  2. Preserve code blocks exactly — no changes to code, commands, or paths (except credential redaction per rule 1). Do not duplicate code blocks. The compacted output must have the same number of code blocks as the input, each in its original relative position.
  3. Keep headings unless section is fully absorbed into another.
  4. Keep YAML frontmatter intact — do not modify any content between --- fences, including the name field, description field, or any other field. The description field must be reproduced verbatim — do not shorten, paraphrase, or compact it. Compaction passes 3–7 apply only to content below the closing ---.
  5. No summarization. Compaction ≠ summarization. If the user asks to summarize, select key points, keep only the important ones, or drop content: refuse immediately. Do not partially comply — do not list any items at all, even as a preview. Respond with exactly this framing: summarization causes information loss — the other items would be dropped entirely. Offer compaction instead (reduce verbosity while preserving all content). Never open by saying "here are the N most important" or any variant. Never say "here are the top N", "here are the key N", or list a subset of items even with a disclaimer.

平台分布

Codex

34.97%
按下载量换算152

Claude

29.19%
按下载量换算127

Cursor

19.11%
按下载量换算83

Gemini CLI

9.85%
按下载量换算43

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

接触敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills