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:AnJiaqi0926/dsh-style-mirror
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
A DeepSeek Harness (DSH) bundle. It adds a「文风」switch beside the model selector: the plugin reads a corpus library (PDF / Word / WPS / plain text), groups folders into scenes (academic paper, official document, fiction, chat, news, tech doc), picks the scene that matches your latest message, and injects a writing brief so replies follow that corpus's style with fewer AI mannerisms. Nothing is uploaded; the corpus is read locally.
输入框模型选择器旁一个开关。打开后,插件把参考库里的文档读成“文风基线”,注册为系统提示段落 style-mirror,让此后所有回答按该文风书写;关掉后该段落长度为零。
.pdf、.docx、.doc、.wps、.txt、.md、.csv、.json、.html(扩展名不可靠时按文件头识别,.docx 实为老 Word 也能读)。子文件夹一并读取。pdftotext(TeX Live / poppler 自带,质量最好);找不到时用内置解析器(纯 Node,无依赖,支持 ToUnicode、FlateDecode、对象流、Form XObject)。扫描件(无文字层)会报“没有可用的文字层”。论文写作/课题组风格、小说写作/绳文、普通对话/…)。每次组装提示词前读最近一条用户消息,先判断场景(学术论文 / 机关文书 / 小说叙事 / 口语对话 / 新闻资讯 / 技术文档 / 通用),再在同场景的素材集里取素材最多的那个;判定把握不大时提示词里附「场景对照表」,让模型在明显不符时自行改用。面板可手动锁定某个场景。$DSH_HOME/plugin-data/dsh-style-mirror/state.json;抽出的文本缓存在同目录 cache/,重启不重解析 PDF。engines.dsh 声明为 >=0.2.2-rc.3 <0.3.0,与当前 DSH 0.2.2 系列对齐。从 npm 安装(发布后可用):
dsh plugin --profile desktop add dsh-style-mirror
本地目录安装:
dsh plugin --profile desktop add "link:<本目录绝对路径>"
- insert:
- id: style-mirror
name: 'dsh-style-mirror'
config:
materialsDir: 'H:\语料参考库' # 参考库根目录(按子文件夹分场景)
intensity: standard # lite | standard | strict
maxPromptChars: 7000
pdfMaxPages: 40 # 每个 PDF 最多读多少页
pdfTool: auto # auto(优先 pdftotext)| builtin | off
enabledOnFirstUse: false
界面里选过的参考库优先于 materialsDir;intensity、maxPromptChars、pdfMaxPages、pdfTool 以 patch 或界面设置中较新的一个为准。
index.js Host 半:系统提示段 + HTTP 接口
client.js Client 半:开关胶囊与面板
lib/extract.js 文本抽取入口(PDF/Word/WPS/纯文本,带缓存)
lib/pdf.js 内置 PDF 解析器
lib/style.js 文风统计、场景化写作规则、提示词组装
lib/scene.js 场景(体裁)判断与素材集打分
lib/session.js 从当前会话读最近一条用户消息
lib/store.js 状态、参考库扫描、场景风格集、提示词缓存
MIT
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: writing。