skills/generate-standard-readme/SKILL.md
Generate lean, high-density README. Sections pruned by value threshold — not fixed count. Primary goal — reader knows what the project is, where to look, and how to use it within 30 seconds.
npx skillsauth add nesnilnehc/ai-cortex generate-standard-readmeInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
为任何软件项目或文档仓库生成高信息密度、低冗余的首页文档。
唯一核心目标:读者在 30 秒内知道——
本技能负责:
本技能不负责:
docs/ARTIFACT_NORMS.md 承接generate-agent-entrydecontextualize-text触发信号:用户说"帮我写 README"、"生成自述文件"或直接提供仓库路径。
| 情况 | 行为 |
| :--- | :--- |
| 项目类型已知 | 直接生成,无需询问 |
| 项目类型不明 | 先检查仓库结构(是否有 package.json / pyproject.toml / Dockerfile / INDEX.md 等)推断类型;推断有把握则直接生成并说明推断依据;推断不确定时询问用户 |
| 用户未提供描述 | 从仓库名称和文件结构推断最保守描述,标注 TBD,不臆造 |
| 写文件前 | 默认直接写入 README.md;若仓库已有 README,先提示将覆盖,等待确认 |
# <项目名> [徽章(可选)]
<一句话说明>(必须)
## <核心入口 / 如何使用>(必须)
## License(必须)
其余章节按价值门槛决定是否保留。
判定原则:若某章节不能提供其他章节中不存在的新决策信息,则删除或并入最近的章节。
| 章节 | 类型 | 保留条件 |
| :--- | :--- | :--- |
| 标题 + 一句话说明 | 必须 | 无条件保留 |
| 核心入口 / 如何使用 | 必须 | 无条件保留 |
| License | 必须 | 无条件保留,含有效链接 |
| 功能列表 | 可选 | 存在 ≥2 个非显而易见的功能且一句话说明无法覆盖时 |
| 安装 | 可选(仅 code 类型) | 安装步骤超过 pip install / npm install 单行时 |
| 快速启动 | 可选(仅 code 类型) | 存在可复制粘贴的最小可运行示例时 |
| 配置/使用说明 | 可选 | 有非显而易见的配置项或参数时 |
| 贡献指南 | 可选 | 贡献流程有特殊要求时(PR 规范、测试门槛等) |
| 作者/致谢 | 可选 | 有明确归属需求时 |
省略规则:
doc 类型仓库:默认不生成安装和快速启动节,改为导航索引code 类型(代码/应用仓库)
判定信号:存在 package.json / pyproject.toml / Makefile / Dockerfile / 主程序入口文件。
输出重点:安装路径、最小可运行示例、关键 API 入口。
# MyApp
单行说明项目做什么。
## Installation
\```bash
npm install myapp
\```
## Usage
\```bash
myapp --input file.csv --output result.json
\```
## License
MIT — see [LICENSE](LICENSE)
doc 类型(文档/规范仓库)
判定信号:无可执行入口,主要内容为 .md / .yaml / .json spec 文件,存在 INDEX.md / skills/INDEX.md。
输出重点:导航索引、阅读路径。安装/快速启动默认省略。
# MySpec
单行说明规范/文档的范围和受众。
## 如何使用
- 从 [INDEX.md](INDEX.md) 开始
- 核心定义见 [docs/architecture/terminology.md](docs/architecture/terminology.md)
- 贡献规范见 [CONTRIBUTING.md](CONTRIBUTING.md)
## License
MIT — see [LICENSE](LICENSE)
以下内容禁止出现:
| 禁止模式 | 示例 | 修复方向 |
| :--- | :--- | :--- |
| 空泛形容词堆叠 | "可复用、可治理、可落地" | 删除或替换为具体行为:"通过 skills/INDEX.md 注册并与变更一并自检" |
| 无主语的价值主张 | "提高工程规范" | 删除或具体化:"维护 skills/INDEX.md 与文档链接一致性" |
| 重复已知信息 | 在安装节重述描述节的内容 | 合并或删除 |
| 占位套话 | "欢迎贡献!请提 PR。" | 若无具体流程说明,省略贡献节 |
| 臆造命令或功能 | 无 docker-compose.yml 却写 docker compose up | 用 TBD 或省略 |
每个主张必须落到:具体文件路径 / shell 命令 / 可观测行为 / 明确约束。
| 字段 | 必需 | 说明 |
| :--- | :--- | :--- |
| 项目名称 | 必需 | 用于标题 |
| 一句话描述 | 必需 | 精确说明项目做什么 |
| 项目类型 | 推荐 | code 或 doc;不提供时从仓库结构推断 |
| 许可证 | 推荐 | 类型 + 文件路径;不提供时用 TBD |
| 安装命令 | 可选 | 仅 code 类型项目使用 |
| 快速启动示例 | 可选 | 仅 code 类型项目使用 |
| 核心入口列表 | 可选 | 关键文件、目录、URL |
未提供的字段:用 TBD 占位或直接省略该章节;禁止臆造。
README.md 写入项目根目录TBD 或省略TBD 而非省略生成 README 后逐项核查:
验收标准:以上 8 项全部通过,或对每个未通过项有明确的豁免理由。
输入:名称 img-crush,描述"批量压缩图片",安装 pip install img-crush,用法 img-crush ./images,许可证 MIT。
输出:
# img-crush
批量压缩图片,支持 WebP / PNG / JPEG 格式。
## Installation
\```bash
pip install img-crush
\```
## Usage
\```bash
img-crush ./images # 原地压缩
img-crush ./images -o out/ # 输出到指定目录
\```
## License
MIT — see [LICENSE](LICENSE)
输入:名称 ai-cortex,描述"agent-first 技能库",许可证 MIT,核心入口 skills/INDEX.md、AGENTS.md。
输出:
# ai-cortex
面向软件交付和项目治理的 agent-first 技能库。
## 如何使用
- 从 [AGENTS.md](AGENTS.md) 了解代理行为契约
- 浏览 [skills/INDEX.md](skills/INDEX.md) 查找可用技能
- 核心术语定义见 [docs/architecture/terminology.md](docs/architecture/terminology.md)
## License
MIT — see [LICENSE](LICENSE)
输入:名称 legacy-auth,无描述,无功能列表,安装和环境未知。
处理:
TBDTBD(不省略,只是内容待补)输出:
# legacy-auth
认证服务(详情待补充)。
## 如何使用
TBD — 请参阅项目内部文档。
## License
TBD
症状:为文档规范仓库生成了 ## Installation 节,内容为 npm install 或空 TBD。
根因:未识别项目类型,套用了 code 模板。
修复:检查仓库结构 → 无可执行入口则判定为 doc 类型 → 删除安装/快速启动节,替换为导航索引。
development
Generate an LLM agent test suite (golden cases, mock-LLM unit tests, evaluator harness) from an agent implementation and its agent-test contract. Use when an agent has no tests, or a contract exists but the test code is missing.
development
After code changes, auto-detect the project's build system and local deployment method for a given directory, then build the project and restart its locally-deployed environment (Docker Compose / systemd / process manager). Never assumes — asks only when detection is ambiguous. Caches detected commands per project in .cortex/redeploy-local.yaml; re-invocations on the same project skip re-scanning until signal files change, the cache expires (30 days), or the skill version bumps.
tools
Publish a NATS message conforming to a cross-team contract, using NATS MCP tools. Authors the contract on first use if missing. Reads project-level cache (.cortex/nats.yaml) to avoid re-prompting basics across sessions.
tools
Drain pending NATS messages from a producer contract via NATS MCP tools (default batch / drain-style). Applies Tolerant Reader semantics and per-message ack/nak/term, returning aggregated stats. Reads project-level cache (.cortex/nats.yaml) to avoid re-prompting.