documentation-standards by terrylica/cc-skills
npx skills add https://github.com/terrylica/cc-skills --skill documentation-standards为同时优化大型语言模型(LLM)使用和通过 Pandoc 转换为专业 PDF 而制定的 Markdown 文档编写标准。确保所有文档的一致性。
在以下情况时使用:
机器可读优先:OpenAPI 3.1.0 规范、JSON Schema、YAML 规范优先于人工编写的文档。
原因:结构化格式提供了明确的契约,人类和 LLM 都能可靠地使用。人工文档是对机器可读规范的补充,而非替代。
应用:
specifications/ 目录下的 OpenAPI 3.1.1 YAML 文件模式:中心枢纽(如 CLAUDE.md、INDEX.md)链接到详细的辐射分支(技能、文档目录)。
结构:
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
CLAUDE.md (中心 - 仅包含要点)
↓ 链接到
Skills (辐射分支 - 渐进披露)
├── SKILL.md (概述 + 快速开始)
└── references/ (详细文档)
规则:
关键规则:切勿手动为 Markdown 标题编号。
❌ 错误示例:
## 1. 介绍
### 1.1 背景
### 1.2 目标
## 2. 实现
✅ 正确示例:
## 介绍
### 背景
### 目标
## 实现
理由:
--number-sections 标志在生成 PDF 时会自动为所有章节编号规则:如果 Markdown 文件可能转换为 PDF,切勿手动为标题编号。使用语义化的标题层级(##, ###),让工具处理编号。
在创建或审查文档时使用此检查清单:
[文本](url),而非裸 URLdocs/standards/skills/{技能名称}/references/{项目}/.claude/ 或 {项目}/docs/INDEX.md, README.md)中心枢纽(CLAUDE.md):
## 从 Markdown 生成 PDF
**快速开始**:使用 pandoc-pdf-generation 技能
**关键规则**:
1. 切勿编写临时性的 pandoc 命令
2. 展示前务必验证 PDF
3. 详细原则请参见技能文档
辐射分支(skill/SKILL.md):
references/ 获取详细文档工作流规范(specifications/hook-prompt-capture.yaml):
openapi: 3.1.1
info:
title: Hook Prompt Capture Workflow
version: 1.0.0
paths:
/capture-prompt:
post:
summary: Capture user prompt from hook
# ... 详细规范
人工文档(README.md):
## 工作流
完整的工作流规范请参见 [hook-prompt-capture.yaml](./specifications/hook-prompt-capture.yaml)。
快速概述:...
文档标准确保:
所有文档都应遵循这些标准。
| 问题 | 原因 | 解决方案 |
|---|---|---|
| PDF 中出现重复章节编号 | Markdown 中手动编号 | 移除手动编号,仅使用 --number-sections |
| PDF 中链接失效 | 相对路径不正确 | 对于跨文档链接,使用基于仓库根目录的路径 |
| 代码块无语法高亮 | 缺少语言标识符 | 在开头的三个反引号后添加语言 |
| 表格渲染不佳 | 列宽过宽 | 使用更短的标题或管道表格格式 |
| 中心文档过长 | 中心包含过多细节 | 将细节移至辐射分支文档,从中心链接 |
| 内容重复 | 相同信息出现在多个文档中 | 识别单一事实来源,移除重复项,添加链接 |
| YAML 规范未渲染 | 文件扩展名错误 | OpenAPI 规范使用 .yaml 扩展名 |
| 缺少索引导航 | 没有 INDEX.md 或 README.md | 在每个目录中创建导航索引 |
每周安装次数
80
仓库
GitHub 星标数
26
首次出现
2026年1月24日
安全审计
安装于
opencode75
gemini-cli74
codex73
github-copilot71
claude-code70
cursor70
Standards for writing markdown documentation optimized for both LLM consumption and conversion to professional PDFs using Pandoc. Ensures consistency across all documentation.
Use when:
Machine-Readable Priority : OpenAPI 3.1.0 specs, JSON Schema, YAML specifications take precedence over human documentation.
Why : Structured formats provide unambiguous contracts that both humans and LLMs can consume reliably. Human docs supplement, don't replace, machine-readable specs.
Application :
Pattern : Central hubs (like CLAUDE.md, INDEX.md) link to detailed spokes (skills, docs directories).
Structure :
CLAUDE.md (Hub - Essentials Only)
↓ links to
Skills (Spokes - Progressive Disclosure)
├── SKILL.md (Overview + Quick Start)
└── references/ (Detailed Documentation)
Rules :
Critical Rule : Never manually number markdown headings.
❌ Wrong :
## 1. Introduction
### 1.1 Background
### 1.2 Objectives
## 2. Implementation
✅ Correct :
## Introduction
### Background
### Objectives
## Implementation
Rationale :
--number-sections flag auto-numbers all sections when generating PDFsRule : If markdown might ever convert to PDF, never manually number headings. Use semantic heading levels (##, ###) and let tools handle numbering.
Use this checklist when creating or reviewing documentation:
[text](url), not bare URLsHub (CLAUDE.md) :
## PDF Generation from Markdown
**Quick Start**: Use pandoc-pdf-generation skill
**Critical Rules**:
1. Never write ad-hoc pandoc commands
2. Always verify PDFs before presenting
3. See skill for detailed principles
Spoke (skill/SKILL.md) :
Workflow Specification (specifications/hook-prompt-capture.yaml):
openapi: 3.1.1
info:
title: Hook Prompt Capture Workflow
version: 1.0.0
paths:
/capture-prompt:
post:
summary: Capture user prompt from hook
# ... detailed spec
Human Documentation (README.md):
## Workflow
See [hook-prompt-capture.yaml](./specifications/hook-prompt-capture.yaml)
for complete workflow specification.
Quick overview: ...
Documentation standards ensure:
Follow these standards for all documentation.
| Issue | Cause | Solution |
|---|---|---|
| Double section numbers in PDF | Manual numbering in markdown | Remove manual numbers, use --number-sections only |
| Broken links in PDF | Relative paths incorrect | Use repo-root paths for cross-document links |
| Code block no syntax color | Missing language identifier | Add language after opening triple backticks |
| Tables render poorly | Column widths too wide | Use shorter headers or pipe-table format |
| Hub doc too long | Too much detail in hub | Move details to spoke documents, link from hub |
| Duplicate content | Same info in multiple docs | Identify SSoT, remove duplicates, add links |
| YAML spec not rendering | Wrong file extension | Use .yaml extension for OpenAPI specs |
| Index navigation missing | No INDEX.md or README.md | Create navigation index in each directory |
Weekly Installs
80
Repository
GitHub Stars
26
First Seen
Jan 24, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode75
gemini-cli74
codex73
github-copilot71
claude-code70
cursor70
Claude技能创建器指南:构建模块化AI技能包,优化工作流与工具集成
5,700 周安装
lp-agent:自动化流动性提供策略工具 | Hummingbot API 与 Solana DEX 集成
217 周安装
SkyPilot 多云编排指南:跨 AWS/GCP/Azure 自动优化机器学习成本与分布式训练
215 周安装
邮件序列设计指南:自动化营销策略、模板与最佳实践 | 提升转化率
218 周安装
开发者成长分析工具 - 基于Claude Code聊天历史识别编码模式和改进领域
218 周安装
高级全栈开发技能:项目脚手架与代码质量分析工具,快速搭建Next.js/FastAPI/MERN项目
215 周安装
PyMC贝叶斯建模指南:Python概率编程与MCMC采样实践教程
220 周安装