🧰 自己动手做工具Build Your Own Tool
你不需要会编程,也能让 Claude 帮你做出一个真正能用的小工具——一个单独的 HTML 文件,双击就能在浏览器里打开,不用安装、不用联网、数据不出本机。同事 Kawser 就是这样做出了 加州规范速查器 和 型材切割拆分器。这份指南把这套方法讲清楚,让你也能照着做。 You don't need to know how to code to have Claude build you a genuinely useful tool — a single HTML file that opens in a browser with a double-click, with no install, no internet, and no data leaving your machine. It's how our colleague Kawser built CA Code Pro and the Profile Splitter. This guide lays out the method so you can do the same.
1. 能做出什么样的工具What You Can Build
最适合这套方法的,是那些"重复、有明确规则、一个小工具就能解决"的事。比如: This method fits tasks that are repetitive, rule-based, and small enough that a little tool would solve them. For example:
速查 / 对照器Lookup / reference
把分散的规范、参数、SKU、话术整理成一键可搜的对照表。Fold scattered rules, specs, SKUs, or scripts into one searchable table.
计算 / 转换器Calculator / converter
按固定公式算价格、用量、尺寸、单位换算。Compute prices, quantities, sizes, or unit conversions by a fixed formula.
文件处理器File processor
上传 CSV/XML/文本,按规则转换或校验,导出新文件。Upload a CSV/XML/text file, transform or validate by rules, export a new file.
清单 / 检查器Checklist / validator
按流程走一遍检查项,或校验一份数据是否符合规则。Walk a process checklist, or check whether data meets a set of rules.
小型看板Mini dashboard
把一份粘贴进来的数据变成图表和汇总。Turn pasted-in data into charts and summaries.
表单 / 生成器Form / generator
填几个字段,生成标准化的邮件、报告或文档。Fill a few fields, generate a standardized email, report, or document.
2. 四步做出来The Four-Step Recipe
讲清楚问题 + 给真实样例Describe the problem + give a real sample
用大白话说清楚:工具要做什么、输入是什么、想要什么输出。最关键的一步是给真实数据样例(一份真实的表格 / 文件 / 规则清单),而不是只给一句描述——样例越真,第一版越准。In plain words: what the tool does, what goes in, what should come out. The most important part is giving a real data sample (an actual table / file / rule list), not just a sentence — the more real the sample, the more accurate the first version.
让 Claude 生成单文件工具Have Claude generate a single-file tool
用下面第 3 节的模板,明确要"单文件 HTML、纯本地、不联网"。Claude 会把界面和逻辑全部写进一个文件。先要一个能跑的最简版本,别一次性要求太多功能。Use the template in Section 3 and be explicit: "single-file HTML, local-only, no internet." Claude writes the interface and logic into one file. Ask for a minimal working version first — don't request every feature at once.
用真实数据测试,逐轮修正Test with real data, refine each round
这是你最重要的工作:拿真实文件跑一遍,检查结果对不对。哪里不对,就具体告诉 Claude("这一行应该是 X,但输出了 Y"),它来改。Kawser 的工具就是这样迭代到 v4、v7 的。This is your most important job: run it on real files and check the output. Where it's wrong, tell Claude specifically ("this row should be X but it output Y") and it fixes it. Kawser's tools reached v4 and v7 exactly this way.
保存 & 分享Save & share
把 Claude 给的代码存成一个 .html 文件(比如用记事本粘贴保存,或直接下载 Artifact)。分享就是发这个文件——同事双击即用。留好版本号,方便日后回溯。Save Claude's code as one .html file (paste it into Notepad and save, or download the Artifact directly). Sharing = sending that file; a colleague double-clicks and it works. Keep a version number so you can trace changes later.
3. 万能起手提示词The Master Prompt
复制下面这段,替换方括号里的内容。(也收录在 提示词模板库 的"通用"分类里。) Copy the block below and replace the bracketed parts. (Also in the Prompt Library under "General.")
4. 安全底线Safety Ground Rules
自建工具很自由,但工具文件本身也要守 安全红线——尤其是分享和发布的时候。 Self-built tools are freeing, but the tool file itself must respect the safety redlines — especially when you share or publish it.
5. 什么时候别自己做,直接找 ITWhen NOT to DIY — Just Ask IT
适合自建单文件工具Good fit for a single-file tool
- 自己或小团队用For yourself or a small team
- 数据当场粘贴 / 上传处理Data pasted / uploaded on the spot
- 规则清晰、结果可人工核对Clear rules, results you can verify by hand
- 不需要保存、不需要联网No need to persist data or go online
该交给 IT / 正式系统Hand to IT / a real system
- 要连数据库、NetSuite、CANTOR 等实时数据Needs live data — a database, NetSuite, CANTOR
- 多人同时用、要共享同一份数据Many concurrent users sharing one dataset
- 涉及登录、权限、真正的安全要求Involves logins, permissions, real security
- 要长期维护、成为关键业务流程Long-term upkeep or a critical business process
6. 接着看Where to Go Next
🏛️案例:加州门窗规范速查器 →Case study: CA Window & Door Code Pro →
看一个真实的速查/对照类工具是怎么做出来的。See how a real lookup/reference tool came together.
案例:型材切割拆分器 →Case study: Profile Splitter →
看一个真实的文件处理类工具是怎么做出来的。See how a real file-processing tool came together.
提示词模板库 →Prompt Library →
"造工具"模板 + 各部门即用模板。The tool-builder template + ready-to-use templates by department.
VWD AI Guide v3.9 | VWD | 2026 | Created by IT depart. | 有问题发邮件到Questions? Email it@valuewds.com