skills/backup/ai-ref-creator/SKILL.md
Converts lengthy official product documentation into concise, high-density AI references. Use when users request: (1) Documentation compression or condensing, (2) Creating AI-friendly reference materials, (3) Reducing token usage for large documentation, (4) Extracting technical specifications from official docs
npx skillsauth add sampx/agent-tools ai-ref-creatorInstall 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.
将冗长的官方产品文档压缩、提炼为简洁、高密度的 AI 友好参考文档。
采用"提炼与重构"方法,而非摘要总结。
关键原则:源文件可追溯性
<!-- Source: path/to/file.md --> 引用压缩(提炼)规则: 参见 references/compression_rules.md 获取完整规则,包括:
何时阅读 compression_rules.md:
docs/link_references/opencode/)index.md 或第一个可用文件以找到实际产品标题(如"OpenCode"而非"opencode_docs")docs/ai-references/<ProductName>/始终运行脚本对原始文档进行分块:
python scripts/bundle_docs.py \
-i <input_docs_dir> \
-o <output_dir> \
--max-size 40
脚本功能:
.bundles_temp/,包含:
*_partNN.md)manifest.json 元数据(源路径、文件计数、大小)阅读 manifest.json 以了解结构:
{
"bundle_file": "_root_part01.md",
"name": "_root_part01",
"file_count": 3,
"total_size_kb": 25.5,
"source_files": [
"docs/link_references/opencode/cli.md",
"docs/link_references/opencode/config.md",
"docs/link_references/opencode/api.md"
]
}
处理策略:
小文档(<3 个分块文件):
大文档(≥3 个打包文件):
Sub Agent 指令(使用并行处理时):
你是一个参考文档压缩器,擅长将官方文档或者教程压缩、提炼成 AI agent 友好的精简的快速参考文档。
任务:读取 <bundle_path> 处的文档并压缩提炼它。
关键约束:
- 将压缩提炼后的 markdown 写入磁盘:<output_path>
- 不要在响应中返回压缩后的内容
- 仅返回简短的状态消息:"Compressed to: <output_path>"
压缩提炼规则:
1. 处理所有 <!-- Source: ... --> 标记的部分
2. **关键:保留所有 Source markers!**
- 每个 `<!-- Source: path/to/file.md -->` 标记必须保留
- 即使内容被压缩,Source markers 也必须留在对应内容之前
- 删除 Source markers 会破坏到原始文档的可追溯性
3. 提取并保留:API 签名、参数、配置、约束、重要参考信息链接
4. 删除:营销文案、教程、重复示例
5. 格式:参数使用表格、TypeScript 风格接口、嵌套列表
6. 保持提炼后的内容高度精简,极具技术参考价值
如遇到复杂文档,需详细规则、示例和边界情况,阅读 references/compression_rules.md。
自动化工作流程:
合并打包脚本:
python scripts/merge_refs.py \
-d <compressed_dir> \
-o <output_file> \
--max-size 40
何时使用自动化合并:
--keep-temp 标志此技能包含以下捆绑资源:
详细的压缩规则、黄金原则和前后对比示例。在处理文档时阅读此文件以确保一致、高质量的输出。
智能文档分块脚本。按标题分割大文件并合并小文件以进行高效处理。
用法:
python scripts/bundle_docs.py -i ./docs -o ./bundles --max-size 40
参数:
-i, --input:包含 Markdown 文件的输入目录-o, --output:打包文件的输出目录--max-size:最大打包文件大小(单位 KB,默认 40)输出结构:
<output_dir>/
├── .bundles_temp/ # 临时目录(自动创建)
│ ├── *_partNN.md # 打包文件
│ └── manifest.json # 打包元数据
└── (压缩后在此处写入最终输出文件)
压缩打包文件的自动化合并脚本。处理验证、token 估算和输出生成。
何时使用: 在 Sub Agent 将所有打包文件压缩到磁盘后(在 .bundles_temp/compressed/ 中)。
用法:
python scripts/merge_refs.py \
-d <compressed_dir> \
-o docs/ai-references/Product/reference.md \
--max-size 40
参数:
-d, --bundles-dir:包含 .bundles_temp 文件夹的目录-o, --output:最终参考文档的输出文件路径--max-size:每个输出文件的最大大小(单位:k,即 tokens/1000,默认 40)--keep-temp:保留临时目录用于调试功能:
输出:
reference.md 或 reference_01.md, reference_02.md 等reference_verification_report.txt任务:将 OpenCode 官方文档压缩为 AI 参考文档
步骤:
docs/link_references/opencode/官方文档/ 和产品名称 "OpenCode"python scripts/bundle_docs.py -i docs/link_references/opencode/官方文档 -o docs/ai-references/OpenCode --max-size 40.bundles_temp/compressed/python scripts/merge_refs.py -d docs/ai-references/OpenCode -o docs/ai-references/OpenCode/reference.md --max-size 40.bundles_temp/。结果:docs/ai-references/OpenCode/reference.md(61KB),保留 33 个 Source markers
tools
Configure ellamaka, a fork of OpenCode with wopal-space mode. MUST use for any task about ellamaka config, agent frontmatter, permission rules, model/provider selection, formatter settings, config loading order, or why config changes are ignored. Trigger on requests about ellamaka or opencode config files, agent permission overrides, restricting subagents, custom/plugin tool permissions (e.g. wopal_task_*), disabling tools, configuring providers or models, formatter setup, config precedence or layering, or debugging settings that do not take effect. Use this skill even when the user says "opencode" if the actual runtime, config path, or behavior is ellamaka. Prefer this skill whenever the answer depends on the difference between ellamaka and upstream opencode, including wopal-space config loading, plugin tool permissions, or agent frontmatter precedence.
development
Plan quality verification for dev-flow. Goal-backward analysis ensures plans WILL achieve their stated goal before execution burns context. ⚠️ MUST use when: (1) Reviewing Plan quality before approve (2) Wopal completes Plan writing and needs quality gate (3) User asks to "check plan", "verify plan", "review plan" (4) Plan enters planning status and needs pre-execution validation 🔴 Trigger automatically when Plan is ready for review, even if user doesn't explicitly say "review". Agent: rook (read-only verification subagent) Mode: verification, not execution
development
Review implementation results for goal achievement and code quality. Supports both Plan-backed review and planless diff review. ⚠️ MUST use when: (1) Wopal delegates rook to review fae implementation output, (2) Prompt contains "review_type: implementation", (3) Prompt contains changed code file list or Plan path + implementation scope, (4) Any code review request from Wopal. 🔴 Trigger even when user does not explicitly mention "review" if the task involves verifying implementation results. This skill is rook-exclusive (only rook agent can load it).
tools
Foundation rules for how Wopal collaborates with sub-agents such as fae and rook. ⚠️ MUST load before ANY delegation — covers delegation tool APIs, task lifecycle, notifications, status handling, and recovery. 🔴 Trigger: "delegate", "let fae implement", "fae task", "rook review", "check task status", "cancel task", "abort task", "agent collaboration", "委派", "让 fae 执行", "fae 任务", "rook 审查", "检查状态", or any intent to hand work to a sub-agent. 🔴 Never delegate without loading this skill first. Skipping it is serious negligence. Note: this skill does not include workflow-specific prompt templates such as dev-flow templates. Those belong to the corresponding workflow skills.