ljg-business-model
Based on the Business Model Canvas from "Business Model Generation", this skill organizes user-provided project introductions, interviews, product materials, or business plans into a 9-block Business Model Canvas card, delivering both a PNG and an editable HTML file. USE WHEN the user invokes ljg-business-model, requests drawing a Business Model Canvas, a 9-block business model, or turning business information into a canvas card. NOT FOR general business analysis, investment valuation, Lean Canvas, or merely explaining business model concepts.
1How It Works & Mechanism
Organize user materials into a 9-block Business Model Canvas, with the primary deliverable being a Chinese landscape PNG, while retaining editable HTML and structured JSON.
把用户的信息变成一张能看清「为谁创造什么价值、如何交付、如何收支」的商业模式画布。主产物为中文横版 PNG;同时保留 HTML 和结构化 JSON,便于修改、追溯与重绘。
Confirm the target and scope before starting; draft an initial version if information is sufficient, mark missing items as 'To be supplemented', and only inquire further if just a company name is provided.
只给公司名且没有任何业务资料时,询问业务描述或经用户授权补充研究;信息够画初稿就直接画,缺项写「待补充」。
Tag each key point as given/inferred/unknown; explicit user plans must still be marked as 'Proposed/Planned' rather than currently occurring.
每个要点标记 `given`(材料提供)、`inferred`(推测)或 `unknown`(待补充)。
Read CanvasGuide.md to calibrate the definitions, relationships, and classic layout of the nine blocks, ensuring Cost Structure and Revenue Streams stay at the bottom.
读取 [CanvasGuide.md](CanvasGuide.md) 校准九模块的定义、关系与经典布局。
Run the built-in renderer from any working directory to generate offline HTML from the input JSON.
bun "$SKILL_DIR/Tools/Render.ts" --input "$WORK_DIR/model.json" --output "$WORK_DIR/model.html"
The renderer enforces strict input validation: all nine keys must be present, ≤5 items per block, and given items must include source_refs.
if (item.status === "given" && (!Array.isArray(item.source_refs) || !item.source_refs.length)) fail(`${path} 材料提供条目须有 source_refs`);
All input text is strictly escaped as plain text, preventing execution of any HTML inside the input.
文本全部按文本处理,自动转义;不执行输入中的 HTML。
Throws an error if the output path already exists to avoid overwriting older versions; writes files using the wx flag.
输出路径已存在会报错,以免覆盖旧版本。
Provides browser-side businessModelAudit() to inspect block counts, missing items, inferences, and geometric overflow.
`window.businessModelAudit()` 提供块数、缺项、推测和几何溢出检查。
Retains Strategyzer and CC BY-SA 3.0 attributions in the footer, stating that this is a Chinese adaptation rather than the official original.
页脚保留 Business Model Canvas、Strategyzer.com 与 CC BY-SA 3.0 归属;此处是中文改编排版,不是官方原版或对原书全文的复述。
2Core Capabilities
3External Dependencies
| Kind | Dependency / Endpoint |
|---|---|
| cli | bun(运行渲染器) |
4Recommended Governance & Evidence
- scripts/: Local script or command execution: bun skills/ljg-business-model/Tools/Render.ts (validates JSON and generates offline HTML)
- 本地工作目录: File I/O and artifact output: {--output}.html (refuses overwrite if file exists, flag wx)
5Second-Pass Verification
- [ok] 外部调用核验:无网络 — 风险扫描『网络请求』无命中;URL 命中全在 CanvasGuide 的来源清单与 HTML 页脚超链接,属标注而非调用,运行期不请求。
- [ok] 脚本行为核验 — Render.ts 仅 import node:fs/promises 与 node:path/node:util;无 fetch/curl、无 child_process、无 env 读取。
- [ok] 写盘核验 — writeFile(output, html, { flag: "wx" }) 只写 --output 指定的 HTML,已存在即报错;未发现写其它路径。
- [ok] 注入面反例检查 — Render.test.ts 断言 '<img src=x onerror="alert(1)">' 被转义为实体且不产生 <img src=x,确认文本转义真实生效。
- [ok] 凭证核验:无 — 风险扫描『凭证/环境变量』命中为命令里的 $SKILL_DIR 路径变量,非凭据;代码无 env/keychain 读取。
- [ok] 功能声明与实现一致 — frontmatter 声明交付 PNG 与可改 HTML,正文给出 JSON→HTML 渲染、浏览器截图与验收函数,未夸大。
- [ok] 校验契约核对 — 九键齐全、每格≤5 条、text≤90、given 需 source_refs、inferred 需 reason、segment 有效均可在 validateModel 中逐条定位。
- [ok] 判级口径复核 — 仅本地脚本与本地读写、无外发或凭据,落 blue;页脚外链不改档位。
6Verdict & Scenarios
d7d969bf4b2d2093…