Write, check, and publish a Chinese Quarto Book: nine-step chapter writing, structure/link/figure checks, a consistent theme, and render acceptance. Loads only in type: book repositories; requires Quarto CLI and Python 3.
Install
# from npm (prebuilt)
dsh plugin --profile web add @chengzhao-dev/dsh-quarto-book
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:chengzhao-dev/dsh-quarto-book
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
English | 简体中文
Take a Quarto Book from chapters to publishable output: writing-quarto owns the chapter skeleton, whole-book order and Chinese prose; designing-theme owns the theme; after a render, quarto_render_check decides whether the HTML is publishable and quarto_pass_report prints the closing receipt. Both skills appear only inside type: book git checkouts whose book root has at least one .qmd or .md chapter source file, and the workflow needs Quarto CLI and Python 3.
What it provides
| Name | Use it for | Out of scope |
|---|---|---|
writing-quarto |
Creating or editing chapters/**/*.qmd, index.qmd, _quarto.yml; chapter skeletons, Chinese prose, code and figures, content checks |
CSS, fonts and colours |
designing-theme |
Theme CSS, SCSS, fonts, palettes, navigation and callout styling | Chapter prose |
quarto_render_check |
Check that output-dir is safe, render once when asked, and inspect HTML in _book/ for publishing |
Editing .qmd, fixing config automatically, or re-running a failed render |
quarto_pass_report |
Compress the run into a fixed-line receipt card: skill, mode, files and steps changed, items held, check verdicts | Saving to disk, quoting chapter prose, or changing the text based on the receipt |
Both skills are discovered from the package's skills/ directory and loaded on demand. Relative paths inside a skill resolve against that skill's directory: writing-quarto uses steps/, writing/, writing/examples/, quarto/, scripts/; designing-theme uses theme/, assets/, scripts/.
Quick start
Install the plugin:
dsh plugin --profile web add npm:@chengzhao-dev/dsh-quarto-book@latestOpen a session in the book repository.
_quarto.ymlneeds a standalonetype: bookline, and the book needs at least one.qmdor.mdchapter source; only then do both skill names appear.Call a skill:
writing-quartofor prose,designing-themefor the theme.
Replace --profile with the profile you actually run. The desktop app always runs the desktop profile, and that profile is owned by the app, so dsh --profile desktop is rejected; install or upgrade with dsh plugin --profile desktop add <package>, and use the app's Settings → Plugins → Add plugin only if the app refuses that write. To pin a version, write npm:@chengzhao-dev/dsh-quarto-book@0.6.31; to follow a GitHub tag, write github:chengzhao-dev/dsh-quarto-book#v0.6.31.
Upgrading from the old unscoped package dsh-quarto-book (removed from npm with 0.3.4, so this only affects profiles that installed it earlier): remove it from the same profile first with dsh plugin --profile <profile> remove dsh-quarto-book, then add the scoped package. Keeping both installed registers writing-quarto and designing-theme twice at the same rank 550.
Installation is scoped to a profile, not to a repository: it only affects the profile that ran add. The workspace check still decides whether the two skill names appear: it checks the session cwd for a book, and only then are both names selectable. See docs/plugin-boundaries.md for the six cases.
Requirements
| Dependency | Purpose |
|---|---|
| DSH >=0.2.1-rc.1 <0.3.0-0 | Host; the plugin registers skills and both tools through dsh.bundle.patch |
| Node.js 22 or newer | Plugin runtime and check scripts |
| Python 3 | Content, link and naming checks, plus post-render HTML checks |
| Quarto CLI | Only when quarto_render_check actually renders |
The published package already contains compiled lib/, so installation needs no build step. See docs/plugin-layout.md for the split.
Usage
Writing chapters
Load writing-quarto in a type: book repository and follow the nine steps in SKILL.md. Each step opens one same-numbered file in steps/; read the matching case in writing/examples/ only when a signal is unclear; open quarto/ only under the conditions in SKILL.md.
The repository's root README.md is a description page, not a chapter: it takes only steps 5–8, skips the task skeleton and structure of steps 1–4, has no "common errors" or "self-test questions", and never calls quarto_render_check. README.en.md is treated the same way.
The plugin has no daemon and does not run skills when a session starts. A skill name in the catalog only means the check passed; only calling skill, quarto_render_check or quarto_pass_report counts as use. A second call in the same session re-reads the skill body, and failed tools are not retried automatically.
Theming
Theme assets live in skills/designing-theme/assets/theme/. The package copy is authoritative; a book's theme/ is the render copy. When a copy exists, designing-theme edits only that copy. It copies from the package only when the user explicitly asks to install the theme into the book and the target directory does not exist, and it also places skills/writing-quarto/scripts/answering-disclosure.lua at filters/answering-disclosure.lua. _quarto.yml always references the in-book copy, never an npm package or a checkout path.
Checks and rendering
Run the content and link checks from the writing-quarto skill directory:
python scripts/verifying-content.py --root <book>
python scripts/checking-links.py --root <book>
python scripts/checking-prose.py --root <book>
python scripts/checking-names.py --root <book>
checking-prose.py reports only mixed Chinese-English problems that can be judged directly; checking-names.py is for repository-wide refactors. For everyday chapter work, the first three are enough.
Post-render callouts, HTML output and DOM contracts are checked by quarto_render_check, which calls the bundled scripts; you do not need to run checking-callouts.py, checking-output.py or checking-dom.py by hand. designing-theme's scripts/checking-layout.py checks palette, contrast and page structure on rendered HTML; overflow and narrow-viewport overlays require an explicit --browser. Neither tool does anything at load time; quarto_render_check renders once only when dry_run: false.
Call quarto_pass_report once at the end of a run; the card is the receipt, and the reply should not repeat it.
Project skill
A project keeps its own conventions in one skill: <book>/.agents/skills/quarto-book-project/, with a template in templates/quarto-book-project/. When it exists, both generic skills read its SKILL.md first, then the writing/ files it points to; when it does not exist, they skip it and do not guess.
Do not vendor a same-named skill into the book repository. DSH picks one skill per name at its rank: .agents/skills (rank 200) wins over the plugin (rank 550), so a copy of writing-quarto or designing-theme inside the book silently replaces the plugin's rules.
Documentation
| Document | Contents |
|---|---|
| docs/architecture.md | The two skills and two tools, the four domains, and file responsibilities |
| docs/module-layout.md | The repository tree and the single list of file locations |
| docs/plugin-flow.md | The five layers from install to receipt, file routing and render order |
| docs/plugin-boundaries.md | The six workspace-check cases and their order |
| docs/plugin-layout.md | Repository layout, package contents, and the Python/Quarto split |
| docs/triggering.md | Trigger criteria, the four domains, and positive/negative examples |
| docs/versioning.md | Version numbers and release order |
Development
The source is TypeScript and the compiled lib/ is committed; the published package loads lib/ directly and needs no build on install. Link this checkout into the profile you write books with instead of copying skills into the book:
npm ci
npm test
npm run check
npm run pack
npm test compiles and runs the tool tests; npm run check type-checks and validates skill paths; npm run pack writes the tarball into temp/ (gitignored) but runs prepack first, rebuilding lib/. To inspect artifacts without rebuilding, use npm pack --dry-run --ignore-scripts; whether the package contains everything is decided by checking-package inside npm run check.
Replay the CI sequence locally with one command before pushing:
npm run ci
It runs npm ci, npm run check:lib, npm test, and npm run check (checking-package.mjs inside check already does the package dry run, so npm pack is not repeated); check:lib must run before any build, or it compares artifacts just overwritten by test — the same steps as .github/workflows/ci.yml, plus the publish-time package gate.
Development install:
dsh plugin --profile web add D:\\path\\to\\dsh-quarto-book
SKILL.md, steps/, writing/, writing/examples/ and quarto/ are re-read on the next skill call, so rule changes need no npm publish. Theme changes in the package do not reach a book's HTML by themselves: copy the changed files into the book's theme/ and run quarto render in the book root. Do not point _quarto.yml at the checkout; that path does not exist on another machine.
The plugin ships as a bundle: package.json has dsh.bundle.patch pointing at cordis.patch.yml, and the patch inserts only the id: quarto-book, name: '@chengzhao-dev/dsh-quarto-book' line. The entry does not import host internals, so it also loads under pnpm's strict dependency layout.
The legacy scripts/embedding-agents.ps1 copies both skill trees into a target repository's .agents/skills/, which shadows the plugin at rank 200. Do not use it for new books; run it only to archive a standalone skill tree offline. The command is at the top of the script.
Issues and contributing
Bugs and suggestions go to GitHub Issues. Before sending a change, run npm test and npm run check; for skill prose, also run node scripts/checking-skill-links.mjs.
License
MIT. LXGW Bright and LXGW Bright Code in the theme are used under the SIL Open Font License 1.1; the upstream copyright notice and full license are in skills/designing-theme/assets/theme/assets/fonts/OFL.txt.
Links
More in this category
tt-a1i/archify#integrations/deepseek-harness★ 103026
Generate validated, self-contained interactive architecture, workflow, sequence, data-flow, and lifecycle diagrams from repositories or system descriptions.
dream-num/dsh-univer-office★ 779
Give DeepSeek Harness a real office environment. Univer Office Plugin brings spreadsheets, docs, slides, canvases, relational tables, and more into one runtime — with connected data, validation, versioned changes, and isolated worktrees for multi-agent collaboration.
Roland0511/dsh-marktext★ 488
WYSIWYG Markdown editor in the DSH right sidebar, built on MarkText's muya engine: open a .md file, edit it as a rendered document, and save back through ctx.fs with a version guard.
ECNU/EduWork#dsh-knowledge-studio★ 467
A workspace-based Studio for source-grounded reports, slides, tables, mind maps, quizzes, flashcards, audio and video, using DSH models and shared artifact services. Office generation requires Python 3.12+ with its dependencies and DSH_OFFICE_PYTHON configured; media rendering requires Chromium, and local ASR additionally requires whisper.cpp and a model.
PerryLink/dsh-industry-research★ 228
Deterministic industry research reports for DeepSeek Harness — company and industry research flows produce structured, verifiable reports from staged evidence.
joeseesun/qiaomu-ui-learn-dsh★ 129
Browse UI design references and interaction examples, take design quizzes, and export learning notes as Markdown.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.