dsh-office-skills
v0.2.0
Published
Office document skills for pi, ported from DeepSeek Harness (DSH): author and edit DOCX/XLSX/PPTX with Python; render, recalculate, and export PDF with LibreOffice Kit
Maintainers
Readme
dsh-office-skills
Office document skills for pi, ported from DeepSeek Harness (DSH).
Unofficial community port — not affiliated with, endorsed by, or maintained by DeepSeek.
This is not an independent reimplementation. The skill texts come from DSH's
@deepseek-ai/dsh-skill-office (MIT, (c) 2026 DeepSeek) and are adapted so pi can use them. See NOTICE for the upstream copyright notice, the full MIT text, and the exact list of changes.
Install
pi install npm:dsh-office-skillsThe install pulls the LibreOffice Kit engine through npm optional dependencies: your platform's native engine (~150-190 MB unpacked) plus the universal WASM fallback (~145 MB), about 335 MB on Windows x64. No system LibreOffice and no Microsoft Office installation are required.
Skills provided
| Skill | Source | Use |
| --- | --- | --- |
| office | ported | Router: picks the right skill for the task |
| office-docx | ported | Create, read, edit, and validate Word documents (python-docx) |
| office-xlsx | ported | Read, create, edit, and validate Excel workbooks, data, and formulas (openpyxl, pandas) |
| office-pptx | ported | Create, read, edit, and validate PowerPoint presentations (python-pptx) |
| office-render | local | Render requested pages/sheets/ranges to images and inspect visual layout |
| office-recalculate | local | Refresh spreadsheet formula caches and verify calculated values |
| office-export-pdf | local | Convert an Office document to PDF or another supported format, including legacy .doc/.xls/.ppt |
Ask pi to build or edit an Office file and it loads the matching skill. Force the
router with /skill:office.
local means this package owns the file: upstream removed those three skills in
0.2.2-rc.2 because DSH now serves rendering, conversion, and recalculation as
native office_render / office_convert / office_recalculate tools. pi has no
such tools, so the skills stay here and drive the LibreOffice Kit CLI instead.
Requirements
- pi (which itself requires Node.js >= 22.19).
- Python 3.9+ for the authoring skills. Missing libraries (python-docx,
python-pptx, openpyxl, pandas) are installed with pip only after you agree;
see python/SETUP.md and
python/requirements.txt.
Keeping up with upstream (DSH)
The port is reproducible. upstream.json records the upstream version this package
is based on and sorts every source into one of three classes:
| Class | Meaning | Script behaviour |
| --- | --- | --- |
| ported | Follows upstream verbatim through the adaptation rules | rewritten on every --apply; a rule that stops matching is a hard error |
| local | This package owns the file (the three operation skills, sidecar.md) | never rewritten; upstream removals are expected |
| notApplicable | Upstream capability that needs DSH host services | recorded with the reason, never ported |
npm run check:upstream # baseline vs newest published upstream version, engine drift, structure changes
npm run apply:upstream # re-port the ported skills from the newest published version
node scripts/sync-from-dsh.mjs <assets-dir> [--version X] # offline: port from a local extractionscripts/sync-from-dsh.mjs downloads the upstream tarball, applies the adaptations
below, and fails loudly when an upstream sentence it must rewrite has changed.
Drift is never silently dropped: update RULES in that script and re-run. It also
reports skills upstream added or removed, so a structural change needs a decision
instead of being absorbed silently.
| Upstream (DSH) | This port (pi) |
| --- | --- |
| skill tool invocation | read the sibling skill's SKILL.md |
| load_workspace_dependencies and the injected Python environment section | python/SETUP.md consent-first flow |
| node/CLI paths injected at load time | scripts/resolve-dsoffice.mjs resolves them at runtime |
| office_render / office_convert / office_recalculate tools | the office-render, office-export-pdf, and office-recalculate skills |
| a temporary result file copied with the shell | the CLI writes straight to --output |
| present({"files": [...]}) delivery | report the final file path |
Hand-maintained files that the sync script never rewrites: the three local
skills, skills/office/references/sidecar.md (rewritten for npm-installed
dependencies), python/, and scripts/resolve-dsoffice.mjs.
After a sync, exercise the engine once against a real file, since the local
skills depend on the LibreOffice Kit CLI contract:
CLI=node_modules/@deepseek-ai/libreoffice-kit/lib/cli.js
node "$CLI" convert --input report.docx --output /tmp/out.pdf
node "$CLI" recalculate --input book.xlsx --output /tmp/recalc.xlsx
node "$CLI" render --input deck.pptx --output-dir /tmp/render --pages 1License
- Skill texts: MIT, derived from
@deepseek-ai/dsh-skill-office— Copyright (c) 2026 DeepSeek. The upstream notice is reproduced in NOTICE; the package itself is MIT. - Engine (
@deepseek-ai/libreoffice-kitand platform packages): MPL-2.0, Copyright (c) DeepSeek. It is installed as an npm dependency and is not redistributed here.
