Add plugin document-skills - #12
Closed
Hylouis233 wants to merge 34 commits into
Closed
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes
New Plugin
Hylouis233/document-skills- a Skill-only portable Agent Plugin bundling four originalworkbench Skills:
docx,pdf,pptx,xlsx.All guidance in this Plugin was written originally for this contribution. It contains no content
from Anthropic's document skills or any other proprietary skill pack - the docx/pdf/pptx/xlsx
names describe the formats, and the patterns are built around standard open-source Python
libraries (python-docx, python-pptx, openpyxl, pypdf, ReportLab, PyMuPDF) and public format
knowledge.
User value
Users ask agents for document deliverables and get silent corruption: hand-edited ZIP XML that
no viewer opens, pasted values where spreadsheet formulas belong, screenshot-style PDFs with no
extractable text, decks whose text overflows every slide. The four Skills route each task to the
right tool, enforce the container contracts, and - critically - require re-opening and verifying
the artifact before handing it back.
Example prompt:
Expected result: the agent loads the workbook with openpyxl, inspects sheets and headers, writes
real
SUMIF/COUNTIFformulas, adds a nativeBarChart, applies number formats, and reportsthe changed ranges plus the verification it ran.
Expected result: generated with ReportLab flowables, measured, and verified with pypdf to be
exactly 1 page with extractable text.
Skill inventory (4 Skills, 13 reference files, 1333 lines):
docx- create (python-docx outline + styles + TOC field), edit (two-tier: structural editsvs. safe OOXML surgery), read (pandoc / python-docx), review (symptom-driven repair table),
mandatory postcheck with optional
sofficePDF smoke test.pdf- one-tool-per-job routing: ReportLab for creation, PyMuPDF for extraction/inspection,pypdf for split/merge/rotate/watermark/encrypt/forms; text-first rule; page-geometry and
overflow checks in postcheck.
pptx- seven workhorse slide patterns, narrow in-place editing with asserted shape matching,real chart parts over chart pictures, text-fit rules, slide-count and render verification.
xlsx- formulas-are-formulas contract,data_onlycaveats, typed values with explicitnumber formats, native charts bound to ranges, structural-edit formula audit, CSV/TSV route
with a messy-data cleanup contract.
Plugin submission checklist
plugins/<github-owner>/<plugin-name>.plugin.jsonname matches the Plugin directory.README.mdincludes a real example prompt and expected result.LICENSEandplugin.jsondeclare an open-source license (Apache-2.0).(Python 3.9+ and the six libraries; optional LibreOffice/pandoc; Windows/macOS/Linux).
binaries are included.
TODOhas been replaced.Network and data behavior
No network access, no credentials, no bundled executables. The Skills instruct the agent to use
the user's own installed Python libraries and operate only on files the user points at; temporary
artifacts go to the system temp directory.
soffice/pandocrender checks are optional anddegrade gracefully when absent.
Evidence
The one failing test (
contributor can scaffold a hosted Skill plugin with one command,test/hosted-plugins.test.mjs) is a pre-existing failure on unmodifiedmain: the test assertsa POSIX path separator while
path.relativereturnsplugins\alice\hello-worldon Windows.Verified on a pristine shallow clone of this repository's
main- same single failure, allother 11 tests pass. No repository file outside
plugins/Hylouis233/document-skillsis touchedby this PR.
Manual evidence - the documented patterns were executed end to end on Windows (Python 3.13,
python-docx 1.2.0, python-pptx 1.0.2, openpyxl 3.1.5, pypdf 6.9.2, reportlab 4.4.10,
pymupdf 1.27.2, LibreOffice present):
Every Python snippet embedded in the Skills was also parsed with
ast.parse- zero syntaxerrors. Staged files verified UTF-8 without BOM, LF line endings.