# Docs Generator

Creates task-oriented technical documentation with progressive disclosure.

- Repository: https://github.com/zhaoxuya520/reverse-skill (43923 stars)
- Category: Testing
- License: MIT
- Last updated: 2026-09-22
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add zhaoxuya520/reverse-skill --skill docs-generator -g -a claude-code -y`
Codex: `npx skills add zhaoxuya520/reverse-skill --skill docs-generator -g -a codex -y`
Cursor: `npx skills add zhaoxuya520/reverse-skill --skill docs-generator -g -a cursor -y`
Gemini CLI: `npx skills add zhaoxuya520/reverse-skill --skill docs-generator -g -a gemini-cli -y`

## Description

Creates task-oriented technical documentation with progressive disclosure. Use when writing READMEs, API docs, architecture docs, or markdown documentation. Also use this skill at the END of any completed reverse engineering, penetration testing, CTF, or security analysis task to generate a formal report in the user's project directory. Trigger keywords: 写报告, 写文档, 出报告, writeup, 技术文档, report, documentation.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Technical Documentation

## ACTION REQUIRED（读完后立刻执行）

1. `NOW`：确认当前任务是否命中本 skill 的适用范围
2. `NOW`：读取 `../tool-index.md`，校验工具可用性和实际路径
3. `NEXT`：缺工具时调用 bootstrap，不要猜路径
4. `ACT`：进入"工作流"第一步并执行，不要停在确认状态

For writing style, tone, and voice guidance, use `Skill(ce:writer)` with **The Engineer** persona.

## 安全/逆向任务文档输出

当逆向/渗透/CTF/安全分析任务完成后，本 skill 负责在**用户项目目录**生成正式技术文档。

### 触发时机

1. 逆向任务完成，已产出核心结论（算法还原、签名破解、绕过方案等）
2. 渗透测试完成，已发现并验证漏洞
3. CTF 题目解出，已拿到 flag
4. 用户明确要求"写一份报告/文档/writeup"

### 模板选择

| 任务类型 | 使用模板 |
|---------|---------|
| APK/二进制/so 逆向 | `references/security-report-templates.md` → 逆向工程报告 |
| 渗透测试/漏洞挖掘 | `references/security-report-templates.md` → 渗透测试报告 |
| CTF 解题 | `references/security-report-templates.md` → CTF Writeup |
| JS/Web 签名逆向 | `references/security-report-templates.md` → 签名逆向报告 |
| 恶意软件 / APT / 病毒分析报告 | `references/security-report-templates.md` + **`references/vendor-report-rules.md`** |
| 通用技术文档 | `references/templates.md` → README / API 文档 |

### 厂商报告结构（Issue #65）

安全类正式报告 **MUST** 读取 `references/vendor-report-rules.md`（只取结构，不抄厂商原文）。仅在任务证据或用户明确要求时选择厂商 flavor；普通逆向和其他任务使用 `flavor = null`。

| Flavor / Overlay | 何时用 | 主参考骨架 |
|------------------|--------|------------|
| `malware` | 明确恶意样本、木马、白加黑、钓鱼投毒 | 火绒式：概述→流程→样本分析→应急处置→IOC |
| `apt` | APT/战役/团伙/多阶段感染链/行业定向 | 卡巴斯基 Securelist 式：摘要→感染链→调查叙事→Interesting findings→技术分析→检测缓解→IOC |
| `flavor = null` | 普通 APK/ELF/PE/Mach-O 逆向、算法/固件分析、渗透 / CTF / JS 签名 | 原任务模板 + Base 通用元素；不套 malware/APT 专属章节 |
| thin `vuln` | 用户明确要求漏洞/补丁/CVE 技术分析 | 概述→影响/复现→崩溃与补丁分析→防护建议（叠加在 null 上，非第 3 默认全文 flavor） |

原则：**模板在精不在多**, , 仅 2 个厂商全文 flavor；`vuln` 仅为可选 thin overlay，不另建第三套默认全文模板。
与 §0 Evidence→Finding→Path **同时生效**；冲突时 Evidence 契约优先。

### 输出规范

- **输出位置**：用户当前项目目录（不是 skill 包目录）
- **文件名格式**：`YYYY-MM-DD_[类型]-[目标简称]-report.md`
- **如果项目有 `docs/` 目录**：优先放在 `docs/` 下
- **编码**：UTF-8
- **语言**：跟随用户对话语言（中文对话出中文报告，英文对话出英文报告）

### 质量要求

The rest: https://github.com/zhaoxuya520/reverse-skill/blob/HEAD/skills/docs-generator/SKILL.md
