huashu-design
alchaincyf
Huashu Design 3.0 · 在 agent 里打一句话,拿回能交付的设计:网页 / App 原型 / 可编辑 PPTX / 动画 / 信息图 · 六个候选挑三个方向 · 84 种带样张的风格库 · 越用越懂你的外观账本与设计体检 · HTML-native design skill for Claude Code, Codex, Cursor & any agent
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:Leica-Shen/deepseek-harness-metre
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
GitHub: Leica-Shen/deepseek-harness-metre
A personal design agent for DeepSeek Harness.
Write what each page should say; Metre lays it out in my style — measured type, my palette,
my margins, my rules. The five design languages are variations, not a catalogue.
The default style lives in style/me.json: change that file, change the output.
中文名「格律」:格是网格,律是节奏。先量字,再排版。

Most generators are template engines: a fixed coordinate grid plus an autofit box that lets PowerPoint guess. The result is either overflow or a half-empty page, and it cannot be audited.
Metre inverts the order:
| template engines | Metre | |
|---|---|---|
| text height | estimated from character count | measured with real font metrics |
| line breaks | left to the renderer | solved with DP, written as a:br |
| layout | hard-coded coordinates | composition + vertical distribution law |
| whitespace | whatever is left | an audited quantity (largest empty rectangle) |
| colour | one theme colour | paper / panel / accent follow the image palette |
| quality | eyeballed | 10 geometric checks, reproducible before render |
spcPts), manual breaks so PowerPoint / WPS / Keynote agree.metre fetch searches Wikimedia Commons, filters by licence
(CC0 / CC BY / CC BY-SA / PD), downloads and records provenance. Images can be used as
full-bleed background, shape fill (blipFill on an autoshape) or text fill
(blipFill inside a:rPr).metre selftest asserts layout, determinism, information integrity,
absence of leaked paths, size limits and prompt-injection safety of SKILL.md.| 形态 | 目录 | 谁用 |
|---|---|---|
| Harness 插件 | 仓库根 | DeepSeek Harness 里作为 skill 加载 |
| 可移植 Skill | skill/metre/ |
Claude Code / Cursor / Copilot / Agensi:带引擎,缺字体自动降级 |
cd skill/metre
python3 tools/learn_style.py reference.pptx -o style.json # 学一份参考文件
python3 tools/build.py examples/mini.json out.pptx --style style.json
git clone git@github.com:<you>/metre.git
cd metre
python3 -m pip install -r requirements.txt
Requires Python 3.10+, python-pptx, Pillow, lxml, numpy.
Platform: the metrics layer reads real font files. The default language set assumes macOS
fonts (Optima, Futura, Bangla MN, Big Caslon) plus Chinese families
(霞鹜文楷 LXGW WenKai, 得意黑 Smiley Sans, 思源黑体/宋体, 阿里巴巴普惠体).
python3 -m studio.cli selftest prints a readable error listing any missing file.
python3 -m studio.cli spec # list the five languages
python3 -m studio.cli build examples/coffee/deck.json out.pptx
python3 -m studio.cli build examples/coffee/deck.json out.pptx --png preview/
python3 -m studio.cli fetch assets/coffee "coffee roasting|latte art" --n 6
python3 -m studio.cli selftest
--png uses Keynote on macOS; any pptx → png exporter works.
| knob | values | default |
|---|---|---|
language |
sweet iron paper grid manifesto |
grid |
variation |
int / string / auto |
seeded from the content itself — same deck reproduces, different decks get different faces |
fonts |
auto or {ea_display, ea_body, ea_micro} |
picked from a tone-matched pool (LXGW WenKai / Source Han Serif / Sans / Alibaba PuHuiTi / Smiley Sans) |
color_mode |
language / image (+ accent_from_image) |
paper from the language; each page is still tinted by its own image |
Colours are no longer locked: color_mode: "image" derives paper tint, panel and accent from the
cover photograph, and any page can override with accent / panel.
Layouts rotate per deck from the language's pool (side-r, side-l, stack, full, inset) —
the planner never uses the same media placement twice in a row.
python3 -m studio.cli spec --json # languages, page kinds, required keys, style fields
schema/deck.schema.json validates a deck before you build it.
{
"language": "sweet",
"assets": "assets/",
"pages": [
{"kind": "cover", "kicker": "2026", "title": "第二家店,开在早晨最忙的那条街",
"sub": "单店模型与选址判断", "image": "assets/cover.jpg"},
{"kind": "points", "title": "为什么是现在",
"items": ["周边写字楼入住率回到 92%", "独立咖啡馆连锁化率不到 8%", "复购率 41%"]},
{"kind": "band", "title": "一家店的三个数",
"metrics": [{"v": "280", "l": "杯 / 日"}, {"v": "32", "l": "客单价"}, {"v": "16", "l": "回本(月)"}]},
{"kind": "table", "title": "三种店型,三本账",
"columns": ["店型", "面积", "投入"], "rows": [["街角店", "45 m²", "180 万"]]}
]
}
Page kinds: cover section statement points metrics band cards split
imagepanel compare table chart gallery quote closing.
| id | name | Latin + Chinese | character |
|---|---|---|---|
sweet |
甜本 | Optima + 霞鹜文楷 | pale paper, rounded cards, gold numerals |
iron |
铁报 | Bangla MN + 得意黑 | black / white / red, full-bleed, type as image |
paper |
纸案 | Optima + 思源宋体 / 霞鹜文楷 | wide margins, sticky notes, hairlines |
grid |
格物 | Futura + 阿里巴巴普惠体 | white paper, rules, multi-column report |
manifesto |
宣言 | Big Caslon + 思源宋体 | large serif, striped paper, bleeding photos |
Pick by density and temperament, not by brand. One language per deck.
studio/textmetrics.py metrics, DP line breaking, CJK kinsoku
studio/languages.py the five languages (the only place with numbers)
studio/palette.py image → paper / panel / accent
studio/compose.py page → composition → ops
studio/audit.py ten geometric checks + whitespace + coverage
studio/render.py ops → pptx (all autofit disabled)
studio/images.py Wikimedia Commons search / download / provenance
studio/selftest.py six-class self test
design/ the rules behind every number
examples/coffee/ a complete deck (content + images + preview)
Example photographs come from Wikimedia Commons (CC BY / CC BY-SA); see
examples/coffee/assets provenance and the footer of the example deck.
Fonts are referenced by family name and are not bundled.
MIT — see LICENSE.
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: design。