$npx -y skills add zhaoxuya520/reverse-skill --skill docs-generatorCreates 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
| 1 | # Technical Documentation |
| 2 | |
| 3 | ## ACTION REQUIRED(读完后立刻执行) |
| 4 | |
| 5 | 1. `NOW`:确认当前任务是否命中本 skill 的适用范围 |
| 6 | 2. `NOW`:读取 `../tool-index.md`,校验工具可用性和实际路径 |
| 7 | 3. `NEXT`:缺工具时调用 bootstrap,不要猜路径 |
| 8 | 4. `ACT`:进入"工作流"第一步并执行,不要停在确认状态 |
| 9 | |
| 10 | For writing style, tone, and voice guidance, use `Skill(ce:writer)` with **The Engineer** persona. |
| 11 | |
| 12 | ## 安全/逆向任务文档输出 |
| 13 | |
| 14 | 当逆向/渗透/CTF/安全分析任务完成后,本 skill 负责在**用户项目目录**生成正式技术文档。 |
| 15 | |
| 16 | ### 触发时机 |
| 17 | |
| 18 | 1. 逆向任务完成,已产出核心结论(算法还原、签名破解、绕过方案等) |
| 19 | 2. 渗透测试完成,已发现并验证漏洞 |
| 20 | 3. CTF 题目解出,已拿到 flag |
| 21 | 4. 用户明确要求"写一份报告/文档/writeup" |
| 22 | |
| 23 | ### 模板选择 |
| 24 | |
| 25 | | 任务类型 | 使用模板 | |
| 26 | |---------|---------| |
| 27 | | APK/二进制/so 逆向 | `references/security-report-templates.md` → 逆向工程报告 | |
| 28 | | 渗透测试/漏洞挖掘 | `references/security-report-templates.md` → 渗透测试报告 | |
| 29 | | CTF 解题 | `references/security-report-templates.md` → CTF Writeup | |
| 30 | | JS/Web 签名逆向 | `references/security-report-templates.md` → 签名逆向报告 | |
| 31 | | 通用技术文档 | `references/templates.md` → README / API 文档 | |
| 32 | |
| 33 | ### 输出规范 |
| 34 | |
| 35 | - **输出位置**:用户当前项目目录(不是 skill 包目录) |
| 36 | - **文件名格式**:`YYYY-MM-DD_[类型]-[目标简称]-report.md` |
| 37 | - **如果项目有 `docs/` 目录**:优先放在 `docs/` 下 |
| 38 | - **编码**:UTF-8 |
| 39 | - **语言**:跟随用户对话语言(中文对话出中文报告,英文对话出英文报告) |
| 40 | |
| 41 | ### 质量要求 |
| 42 | |
| 43 | - 所有代码块必须可直接运行或有明确上下文 |
| 44 | - 不要有 placeholder/TODO |
| 45 | - 关键发现必须有证据支撑 |
| 46 | - 复现步骤必须让第三方能独立重现 |
| 47 | - 敏感信息(真实 token、密码、内部 URL)用占位符替代 |
| 48 | - **MUST** 包含 Evidence → Finding → Path 链(见 `../ops/evidence-finding-path.md` 与模板 §0) |
| 49 | - **SHOULD** 引用 case `scope.md` / `timeline.md`(`../scripts/case-init.ps1`) |
| 50 | |
| 51 | ### 图表集成 |
| 52 | |
| 53 | 生成报告时,应在适当位置调用 `diagram-generator` skill 生成可视化图表: |
| 54 | |
| 55 | | 报告类型 | 建议图表 | 图表类型 | |
| 56 | |---------|---------|---------| |
| 57 | | 逆向工程报告 | 函数调用关系图、数据流图 | Mermaid flowchart / sequenceDiagram | |
| 58 | | 渗透测试报告 | 攻击路径图、网络拓扑图 | Mermaid flowchart / Graphviz | |
| 59 | | CTF Writeup | 解题思路流程图 | Mermaid flowchart | |
| 60 | | JS 签名逆向报告 | 请求链路时序图、算法流程图 | Mermaid sequenceDiagram / flowchart | |
| 61 | |
| 62 | 图表以 Mermaid 代码块形式嵌入报告 markdown 中,确保可在 GitHub/GitLab 直接渲染。 |
| 63 | |
| 64 | --- |
| 65 | |
| 66 | ## Core Principles |
| 67 | |
| 68 | ### 1. Progressive Disclosure |
| 69 | |
| 70 | Reveal information in layers: |
| 71 | |
| 72 | | Layer | Content | User Question | |
| 73 | |-------|---------|---------------| |
| 74 | | 1 | One-sentence description | What is it? | |
| 75 | | 2 | Quick start code block | How do I use it? | |
| 76 | | 3 | Full API reference | What are my options? | |
| 77 | | 4 | Architecture deep dive | How does it work? | |
| 78 | |
| 79 | **Warnings, breaking changes, and prerequisites go at the TOP.** |
| 80 | |
| 81 | ### 2. Task-Oriented Writing |
| 82 | |
| 83 | ```markdown |
| 84 | <!-- Bad: Feature-oriented --> |
| 85 | ## AuthService Class |
| 86 | The AuthService class provides authentication methods... |
| 87 | |
| 88 | <!-- Good: Task-oriented --> |
| 89 | ## Authenticating Users |
| 90 | To authenticate a user, call login() with credentials: |
| 91 | ``` |
| 92 | |
| 93 | ### 3. Show, Don't Tell |
| 94 | |
| 95 | Every concept needs a concrete example. |
| 96 | |
| 97 | ## Formatting Standards |
| 98 | |
| 99 | - **Sentence case headings**: "Getting started" not "Getting Started" |
| 100 | - **Max 3 heading levels**: Deeper means split the doc |
| 101 | - **Always specify language** in code blocks |
| 102 | - **Relative paths** for internal links |
| 103 | - **Tables** for structured data with 3+ attributes |
| 104 | |
| 105 | ## Quality Checklist |
| 106 | |
| 107 | - [ ] Code examples tested and runnable |
| 108 | - [ ] No placeholder text or TODOs |
| 109 | - [ ] Matches actual code behavior |
| 110 | - [ ] Scannable without reading everything |
| 111 | - [ ] Reader knows what to do next |
| 112 | |
| 113 | ## Anti-Patterns |
| 114 | |
| 115 | | Problem | Fix | |
| 116 | |---------|-----| |
| 117 | | Wall of text | Break up with headings, bullets, code, tables | |
| 118 | | Buried critical info | Warnings/breaking changes at TOP | |
| 119 | | Missing error docs | Always document what can go wrong | |
| 120 | |
| 121 | ## Templates |
| 122 | |
| 123 | For README, API endpoint, and file organization templates, see [references/templates.md](references/templates.md). |
| 124 | |
| 125 | ## Related Skills |
| 126 | |
| 127 | - `Skill(ce:writer)` - Writing style, tone, and voice (load The Engineer persona) |
| 128 | - `Skill(ce:visualizing-with-mermaid)` - Architecture and flow diagrams |
| 129 | |
| 130 | |
| 131 | --- |
| 132 | |
| 133 | ## 按需自举(On-Demand Bootstrap) |
| 134 | |
| 135 | 本 skill 不依赖外部工具,纯文本生成。无需 bootstrap。 |
| 136 | |
| 137 | 如果需要渲染图表嵌入报告,会调用 `diagram-generator/` skill。 |
| 138 | |
| 139 | --- |
| 140 | |
| 141 | ## 路由上下文 |
| 142 | |
| 143 | **上游入口**: 所有安全/逆向 skill 在任务完成后自动调用本 skill |
| 144 | **触发方式**: |
| 145 | - 自动:任务完成后作为行为链第 9 步执行 |
| 146 | - 手动:用户说"写报告"、"出文档"、"writeup" |
| 147 | |
| 148 | **同级关联模块**: |
| 149 | - `apk-reverse/` — APK 逆向完成后生成逆向报告 |
| 150 | - `ida-reverse/` — 二进制分析完成后生成逆向报告 |
| 151 | - `radare2/` — CLI 分析完成后生成逆向报告 |
| 152 | - `js-reverse/` — JS 签名逆向完成后生成签名报告 |
| 153 | - `reverse-engineering/` — 通用逆向完成后生成逆向报告 |
| 154 | - `field-journal/` — 报告内容同时作为进化日志的数据来源 |
| 155 | |
| 156 | **安全报告模板**: `references/security-report-templates.md` |
| 157 | **通用文档模板**: `references/templates.md` |
| 158 | |
| 159 | |
| 160 | ## 任务完成自检(声称完成前 MUST 通过) |
| 161 | |
| 162 | - [ ] 我是否执行了工作流中的每一步(而不是只阅读)? |
| 163 | - [ ] 我是否基于 `tool-index` 使用了真实工具路径? |
| 164 | - [ ] 我是否产出了可复现证据(命令/脚本/截图/报告)? |
| 165 | - [ ] 报告是否含 Evidence / Finding / Path(ops 契约)? |
| 166 | - [ ] 是否完成并回写了 RULES 要求的 Checklist 项? |