Draft To Opus — Security skill for Claude Code
草稿到作品 · Draft-to-Opus — mid-project AI draft audit & model-tiered refactoring skill for Claude Code.
How to install Draft To Opus
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open HIMKUG/draft-to-opus and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Draft To Opus does
草稿到作品 · Draft-to-Opus — mid-project AI draft audit & model-tiered refactoring skill for Claude Code.
Alternatives in Security
- Google Workspace Model Armor — Filter user-generated content for safety 21.6k ★
- Security Threat Model — Generate repo-specific threat models identifying trust boundaries 14.6k ★
- Pal — Multi-model AI integration — chat, debugging, code review, planning, security audit 11.3k ★
README
草稿到作品 · Draft-to-Opus
把 AI 写了一半的项目,审成能交付的工程。
[](https://docs.claude.com/en/docs/claude-code/skills) [](#-三阶自底向上涌现扫描) [](#-阶段-2-editorial-html-报告) [](#-阶段-3-安全优先的模型分层执行) [](LICENSE)
**Draft-to-Opus** 是一个面向「中期 AI 草稿项目」的审查与重构 Skill。它不重写你的业务, 而是在动任何一行代码之前,先用**自底向上的三阶扫描**把项目从散乱的补丁状态里读清楚, 产出一份低认知负荷的体检报告,再按**风险 × 收益**和**模型算力分层**安全地执行修复。
适用于:一个已经能跑、但结构开始失控的仓库 —— 重复的前端控件、越写越厚的 `utils`、 随手加的 `catch {}`、藏在循环里的 `O(n²)`、没人敢动的核心模块。
目录
- 为什么需要它
- 核心设计原则
- 整体工作流
- 三阶自底向上涌现扫描
- 风险 × 收益矩阵与模型分层路由
- 健康分评分标准
- 阶段 2 · Editorial HTML 报告
- 阶段 3 · 安全优先的模型分层执行
- 仓库结构
- 安装
- 使用
- REPORT_DATA 数据结构参考
- 术语表
- 非目标
- 常见问题
- 贡献
- 许可
为什么需要它
AI 生成代码的典型形态不是「全错」,而是**「局部都对、全局失控」**:
| 现象 | 表面 | 真实代价 |
|---|---|---|
| 每个页面各自手写一套按钮 | 能点、能跑 | 改一处样式要改八个文件,令牌体系形同虚设 |
| 核心模块被反复热补丁 | 需求都满足了 | 没人说得清它当前的不变量,改一行怕崩三处 |
includes() 写在循环里 |
数据量小时无感 | 上真实数据后从秒级退化到分钟级 |
空 catch {} 吞掉失败 |
日志很干净 | 故障以「偶发数据不对」的形式出现在线上 |
| 重试没有退避与预算 | 平时正常 | 下游抖动时被打穿,形成雪崩 |
这些问题的共同点是:**它们不会在单文件 review 里暴露**,必须跨文件、跨层地看。 Draft-to-Opus 就是为这个视角设计的 —— 从叶子证据出发,让宏观问题**自己浮现**, 而不是先套一个架构模板再去找证据。
核心设计原则
| 原则 | 含义 | 落地方式 |
|---|---|---|
| 证据优先 | 任何结论必须可定位 | 每条发现强制标注 file:line,禁止「大概在哪」 |
| 自底向上涌现 | 宏观问题从叶子证据聚合而来 | Stage 1 收集 → Stage 2 聚类 → Stage 3 综合,不做冗余全仓扫 |
Related Skills
The Openclaw Optimizer
AI skill for optimizing and troubleshooting OpenClaw workspaces. 29 providers, tiered model routing, 36-check
Token Optimizer Skill
Token cost optimization skill for Claude Code — model routing (Opus/Sonnet/Haiku), extended thinking tuning, p
Seedance Video Recreation Skill
Claude Code skill to recreate short viral videos with Seedance (any platform) starring your own model: evidenc
Seedance Magi 2 Video Recreation Skill
Claude Code skill to recreate short viral videos with Seedance 2.5 or MAGI-2 (any platform) starring your own
Claude Skill Suite
Claude Code skills for running models cost-effectively: security gates (secret scanner, commit-gate), model-qu
Threat Model Skills
Agent Skills that draft STRIDE threat models for OWASP Threat Dragon, turn them into security requirements, an
Related Agents
Opus Senior Dev
Use this agent when you need the most powerful model for complex development, design, or UX tasks. Ideal for a
Opus Security Auditor
Pre-deployment security gate and any adversarial security audit. Pinned to a specific high-capability model —
Feature Consistency Reviewer
Read-only consistency reviewer dispatched mid-flow by feature-decompose before a draft feature under project/f