wormclaude 1.0.119 → 1.0.121
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/theme.js +1 -1
- package/dist/tui.js +6 -1
- package/package.json +1 -1
- package/skills/build-mcp-app/SKILL.md +0 -393
- package/skills/build-mcp-app/references/abuse-protection.md +0 -60
- package/skills/build-mcp-app/references/apps-sdk-messages.md +0 -227
- package/skills/build-mcp-app/references/directory-checklist.md +0 -18
- package/skills/build-mcp-app/references/iframe-sandbox.md +0 -164
- package/skills/build-mcp-app/references/payload-budgeting.md +0 -54
- package/skills/build-mcp-app/references/widget-templates.md +0 -249
- package/skills/build-mcp-server/SKILL.md +0 -222
- package/skills/build-mcp-server/references/auth.md +0 -108
- package/skills/build-mcp-server/references/deploy-cloudflare-workers.md +0 -106
- package/skills/build-mcp-server/references/elicitation.md +0 -129
- package/skills/build-mcp-server/references/remote-http-scaffold.md +0 -211
- package/skills/build-mcp-server/references/resources-and-prompts.md +0 -122
- package/skills/build-mcp-server/references/server-capabilities.md +0 -164
- package/skills/build-mcp-server/references/tool-design.md +0 -189
- package/skills/build-mcp-server/references/versions.md +0 -25
- package/skills/build-mcpb/SKILL.md +0 -200
- package/skills/build-mcpb/references/local-security.md +0 -149
- package/skills/build-mcpb/references/manifest-schema.md +0 -156
- package/skills/docx/script/__init__.py +0 -1
- package/skills/docx/script/accept_chages.py +0 -135
- package/skills/docx/script/comment.py +0 -318
- package/skills/docx/script/office/helpers/__init__.py +0 -0
- package/skills/docx/script/office/helpers/merge_runs.py +0 -199
- package/skills/docx/script/office/helpers/simplify_redlines.py +0 -197
- package/skills/docx/script/office/pack.py +0 -159
- package/skills/docx/script/office/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +0 -1499
- package/skills/docx/script/office/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +0 -146
- package/skills/docx/script/office/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +0 -1085
- package/skills/docx/script/office/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +0 -11
- package/skills/docx/script/office/schemas/ISO-IEC29500-4_2016/dml-main.xsd +0 -3081
- package/skills/docx/script/office/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +0 -23
- package/skills/docx/script/office/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +0 -185
- package/skills/docx/script/office/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +0 -287
- package/skills/docx/script/office/schemas/ISO-IEC29500-4_2016/pml.xsd +0 -1676
- package/skills/docx/script/office/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +0 -28
- package/skills/docx/script/office/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +0 -144
- package/skills/docx/script/office/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +0 -174
- package/skills/docx/script/office/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +0 -25
- package/skills/docx/script/office/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +0 -18
- package/skills/docx/script/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +0 -59
- package/skills/docx/script/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +0 -56
- package/skills/docx/script/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +0 -195
- package/skills/docx/script/office/schemas/ISO-IEC29500-4_2016/shared-math.xsd +0 -582
- package/skills/docx/script/office/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +0 -25
- package/skills/docx/script/office/schemas/ISO-IEC29500-4_2016/sml.xsd +0 -4439
- package/skills/docx/script/office/schemas/ISO-IEC29500-4_2016/vml-main.xsd +0 -570
- package/skills/docx/script/office/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +0 -509
- package/skills/docx/script/office/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +0 -12
- package/skills/docx/script/office/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +0 -108
- package/skills/docx/script/office/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +0 -96
- package/skills/docx/script/office/schemas/ISO-IEC29500-4_2016/wml.xsd +0 -3646
- package/skills/docx/script/office/schemas/ISO-IEC29500-4_2016/xml.xsd +0 -116
- package/skills/docx/script/office/schemas/ecma/fouth-edition/opc-contentTypes.xsd +0 -42
- package/skills/docx/script/office/schemas/ecma/fouth-edition/opc-coreProperties.xsd +0 -50
- package/skills/docx/script/office/schemas/ecma/fouth-edition/opc-digSig.xsd +0 -49
- package/skills/docx/script/office/schemas/ecma/fouth-edition/opc-relationships.xsd +0 -33
- package/skills/docx/script/office/schemas/mce/mc.xsd +0 -75
- package/skills/docx/script/office/schemas/microsoft/wml-2010.xsd +0 -560
- package/skills/docx/script/office/schemas/microsoft/wml-2012.xsd +0 -67
- package/skills/docx/script/office/schemas/microsoft/wml-2018.xsd +0 -14
- package/skills/docx/script/office/schemas/microsoft/wml-cex-2018.xsd +0 -20
- package/skills/docx/script/office/schemas/microsoft/wml-cid-2016.xsd +0 -13
- package/skills/docx/script/office/schemas/microsoft/wml-sdtdatahash-2020.xsd +0 -4
- package/skills/docx/script/office/schemas/microsoft/wml-symex-2015.xsd +0 -8
- package/skills/docx/script/office/soffice.py +0 -183
- package/skills/docx/script/office/unpack.py +0 -132
- package/skills/docx/script/office/validate.py +0 -117
- package/skills/docx/script/office/validators/__init__.py +0 -15
- package/skills/docx/script/office/validators/base.py +0 -851
- package/skills/docx/script/office/validators/docx.py +0 -446
- package/skills/docx/script/office/validators/pptx.py +0 -275
- package/skills/docx/script/office/validators/redlining.py +0 -247
- package/skills/docx/script/templates/comments.xml +0 -3
- package/skills/docx/script/templates/commentsExtended.xml +0 -3
- package/skills/docx/script/templates/commentsExtensible.xml +0 -3
- package/skills/docx/script/templates/commentsIds.xml +0 -3
- package/skills/docx/script/templates/people.xml +0 -3
- package/skills/docx/skill.md +0 -593
- package/skills/explain.md +0 -14
- package/skills/frontend-design/SKILL.md +0 -42
- package/skills/pdf/FORMS.md +0 -294
- package/skills/pdf/REFERENCE.md +0 -612
- package/skills/pdf/SKILL.md +0 -314
- package/skills/pdf/scripts/check_bounding_boxes.py +0 -65
- package/skills/pdf/scripts/check_fillable_fields.py +0 -11
- package/skills/pdf/scripts/convert_pdf_to_images.py +0 -33
- package/skills/pdf/scripts/create_validation_image.py +0 -37
- package/skills/pdf/scripts/extract_form_field_info.py +0 -122
- package/skills/pdf/scripts/extract_form_structure.py +0 -115
- package/skills/pdf/scripts/fill_fillable_fields.py +0 -98
- package/skills/pdf/scripts/fill_pdf_form_with_annotations.py +0 -107
- package/skills/playground/SKILL.md +0 -77
- package/skills/playground/templates/code-map.md +0 -158
- package/skills/playground/templates/concept-map.md +0 -73
- package/skills/playground/templates/data-explorer.md +0 -67
- package/skills/playground/templates/design-playground.md +0 -67
- package/skills/playground/templates/diff-review.md +0 -179
- package/skills/playground/templates/document-critique.md +0 -171
- package/skills/pptx/SKILL.md +0 -230
- package/skills/pptx/editing.md +0 -205
- package/skills/pptx/pptxgenjs.md +0 -437
- package/skills/pptx/scripts/__init__.py +0 -0
- package/skills/pptx/scripts/add_slide.py +0 -195
- package/skills/pptx/scripts/clean.py +0 -286
- package/skills/pptx/scripts/office/helpers/__init__.py +0 -0
- package/skills/pptx/scripts/office/helpers/merge_runs.py +0 -199
- package/skills/pptx/scripts/office/helpers/simplify_redlines.py +0 -197
- package/skills/pptx/scripts/office/pack.py +0 -159
- package/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +0 -1499
- package/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +0 -146
- package/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +0 -1085
- package/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +0 -11
- package/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-main.xsd +0 -3081
- package/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +0 -23
- package/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +0 -185
- package/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +0 -287
- package/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/pml.xsd +0 -1676
- package/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +0 -28
- package/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +0 -144
- package/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +0 -174
- package/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +0 -25
- package/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +0 -18
- package/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +0 -59
- package/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +0 -56
- package/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +0 -195
- package/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-math.xsd +0 -582
- package/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +0 -25
- package/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/sml.xsd +0 -4439
- package/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-main.xsd +0 -570
- package/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +0 -509
- package/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +0 -12
- package/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +0 -108
- package/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +0 -96
- package/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/wml.xsd +0 -3646
- package/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/xml.xsd +0 -116
- package/skills/pptx/scripts/office/schemas/ecma/fouth-edition/opc-contentTypes.xsd +0 -42
- package/skills/pptx/scripts/office/schemas/ecma/fouth-edition/opc-coreProperties.xsd +0 -50
- package/skills/pptx/scripts/office/schemas/ecma/fouth-edition/opc-digSig.xsd +0 -49
- package/skills/pptx/scripts/office/schemas/ecma/fouth-edition/opc-relationships.xsd +0 -33
- package/skills/pptx/scripts/office/schemas/mce/mc.xsd +0 -75
- package/skills/pptx/scripts/office/schemas/microsoft/wml-2010.xsd +0 -560
- package/skills/pptx/scripts/office/schemas/microsoft/wml-2012.xsd +0 -67
- package/skills/pptx/scripts/office/schemas/microsoft/wml-2018.xsd +0 -14
- package/skills/pptx/scripts/office/schemas/microsoft/wml-cex-2018.xsd +0 -20
- package/skills/pptx/scripts/office/schemas/microsoft/wml-cid-2016.xsd +0 -13
- package/skills/pptx/scripts/office/schemas/microsoft/wml-sdtdatahash-2020.xsd +0 -4
- package/skills/pptx/scripts/office/schemas/microsoft/wml-symex-2015.xsd +0 -8
- package/skills/pptx/scripts/office/soffice.py +0 -183
- package/skills/pptx/scripts/office/unpack.py +0 -132
- package/skills/pptx/scripts/office/validate.py +0 -117
- package/skills/pptx/scripts/office/validators/__init__.py +0 -15
- package/skills/pptx/scripts/office/validators/base.py +0 -851
- package/skills/pptx/scripts/office/validators/docx.py +0 -446
- package/skills/pptx/scripts/office/validators/pptx.py +0 -275
- package/skills/pptx/scripts/office/validators/redlining.py +0 -247
- package/skills/pptx/scripts/thumbnail.py +0 -289
- package/skills/recon.md +0 -16
- package/skills/security-audit/SKILL.md +0 -26
- package/skills/talent-creator/SKILL.md +0 -486
- package/skills/talent-creator/agents/analyzer.md +0 -274
- package/skills/talent-creator/agents/comparator.md +0 -202
- package/skills/talent-creator/agents/grader.md +0 -223
- package/skills/talent-creator/assets/eval_review.html +0 -146
- package/skills/talent-creator/eval-viewer/generate_review.py +0 -471
- package/skills/talent-creator/eval-viewer/viewer.html +0 -1325
- package/skills/talent-creator/references/schemas.md +0 -430
- package/skills/talent-creator/scripts/__init__.py +0 -0
- package/skills/talent-creator/scripts/aggregate_benchmark.py +0 -401
- package/skills/talent-creator/scripts/generate_report.py +0 -326
- package/skills/talent-creator/scripts/improve_description.py +0 -247
- package/skills/talent-creator/scripts/package_skill.py +0 -136
- package/skills/talent-creator/scripts/quick_validate.py +0 -146
- package/skills/talent-creator/scripts/run_eval.py +0 -310
- package/skills/talent-creator/scripts/run_loop.py +0 -328
- package/skills/talent-creator/scripts/utils.py +0 -47
- package/skills/xlsx/SKILL.md +0 -300
- package/skills/xlsx/scripts/office/helpers/__init__.py +0 -0
- package/skills/xlsx/scripts/office/helpers/merge_runs.py +0 -199
- package/skills/xlsx/scripts/office/helpers/simplify_redlines.py +0 -197
- package/skills/xlsx/scripts/office/pack.py +0 -159
- package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +0 -1499
- package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +0 -146
- package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +0 -1085
- package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +0 -11
- package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-main.xsd +0 -3081
- package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +0 -23
- package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +0 -185
- package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +0 -287
- package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/pml.xsd +0 -1676
- package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +0 -28
- package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +0 -144
- package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +0 -174
- package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +0 -25
- package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +0 -18
- package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +0 -59
- package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +0 -56
- package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +0 -195
- package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-math.xsd +0 -582
- package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +0 -25
- package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/sml.xsd +0 -4439
- package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-main.xsd +0 -570
- package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +0 -509
- package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +0 -12
- package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +0 -108
- package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +0 -96
- package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/wml.xsd +0 -3646
- package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/xml.xsd +0 -116
- package/skills/xlsx/scripts/office/schemas/ecma/fouth-edition/opc-contentTypes.xsd +0 -42
- package/skills/xlsx/scripts/office/schemas/ecma/fouth-edition/opc-coreProperties.xsd +0 -50
- package/skills/xlsx/scripts/office/schemas/ecma/fouth-edition/opc-digSig.xsd +0 -49
- package/skills/xlsx/scripts/office/schemas/ecma/fouth-edition/opc-relationships.xsd +0 -33
- package/skills/xlsx/scripts/office/schemas/mce/mc.xsd +0 -75
- package/skills/xlsx/scripts/office/schemas/microsoft/wml-2010.xsd +0 -560
- package/skills/xlsx/scripts/office/schemas/microsoft/wml-2012.xsd +0 -67
- package/skills/xlsx/scripts/office/schemas/microsoft/wml-2018.xsd +0 -14
- package/skills/xlsx/scripts/office/schemas/microsoft/wml-cex-2018.xsd +0 -20
- package/skills/xlsx/scripts/office/schemas/microsoft/wml-cid-2016.xsd +0 -13
- package/skills/xlsx/scripts/office/schemas/microsoft/wml-sdtdatahash-2020.xsd +0 -4
- package/skills/xlsx/scripts/office/schemas/microsoft/wml-symex-2015.xsd +0 -8
- package/skills/xlsx/scripts/office/soffice.py +0 -183
- package/skills/xlsx/scripts/office/unpack.py +0 -132
- package/skills/xlsx/scripts/office/validate.py +0 -117
- package/skills/xlsx/scripts/office/validators/__init__.py +0 -15
- package/skills/xlsx/scripts/office/validators/base.py +0 -851
- package/skills/xlsx/scripts/office/validators/docx.py +0 -446
- package/skills/xlsx/scripts/office/validators/pptx.py +0 -275
- package/skills/xlsx/scripts/office/validators/redlining.py +0 -247
- package/skills/xlsx/scripts/recalc.py +0 -184
package/skills/docx/skill.md
DELETED
|
@@ -1,593 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: docx
|
|
3
|
-
description: "Reach for this skill any time a user needs to build, open, modify, or otherwise work with Word documents (.docx files). It applies whenever someone mentions a 'Word doc', 'word document', or '.docx', or asks for polished documents featuring elements such as tables of contents, headings, page numbers, or letterheads. It also covers pulling out or rearranging material from .docx files, adding or swapping images, running find-and-replace inside Word files, handling tracked changes or comments, and turning raw content into a finished Word document. Whenever the request is for a 'report', 'memo', 'letter', 'template', or any comparable Word/.docx deliverable, this skill fits. Avoid it for PDFs, spreadsheets, Google Docs, or unrelated programming work."
|
|
4
|
-
license: WormClaude
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# DOCX creation, editing, and analysis
|
|
8
|
-
|
|
9
|
-
## Overview
|
|
10
|
-
|
|
11
|
-
Under the hood, a .docx is simply a ZIP package that bundles together a set of XML files.
|
|
12
|
-
|
|
13
|
-
## Quick Reference
|
|
14
|
-
|
|
15
|
-
| Task | Approach |
|
|
16
|
-
|------|----------|
|
|
17
|
-
| Read/analyze content | `extract-text`, or unpack for raw XML |
|
|
18
|
-
| Create new document | Use `docx-js` - see Creating New Documents below |
|
|
19
|
-
| Edit existing document | Unpack → edit XML → repack - see Editing Existing Documents below |
|
|
20
|
-
|
|
21
|
-
### Converting .doc to .docx
|
|
22
|
-
|
|
23
|
-
Older `.doc` files need to be converted to the newer format first before any editing can happen:
|
|
24
|
-
|
|
25
|
-
```bash
|
|
26
|
-
python scripts/office/soffice.py --headless --convert-to docx document.doc
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
### Reading Content
|
|
30
|
-
|
|
31
|
-
```bash
|
|
32
|
-
# Text extraction as markdown
|
|
33
|
-
extract-text document.docx
|
|
34
|
-
|
|
35
|
-
# Show tracked changes instead of accepting them
|
|
36
|
-
pandoc --track-changes=all document.docx -o output.md
|
|
37
|
-
|
|
38
|
-
# Raw XML access
|
|
39
|
-
python scripts/office/unpack.py document.docx unpacked/
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
### Converting to Images
|
|
43
|
-
|
|
44
|
-
```bash
|
|
45
|
-
python scripts/office/soffice.py --headless --convert-to pdf document.docx
|
|
46
|
-
pdftoppm -jpeg -r 150 document.pdf page
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
### Accepting Tracked Changes
|
|
50
|
-
|
|
51
|
-
To generate a clean copy in which every tracked change has been accepted (LibreOffice is needed):
|
|
52
|
-
|
|
53
|
-
```bash
|
|
54
|
-
python scripts/accept_changes.py input.docx output.docx
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
---
|
|
58
|
-
|
|
59
|
-
## Creating New Documents
|
|
60
|
-
|
|
61
|
-
Build .docx files in JavaScript and run validation afterward. Install with: `npm install -g docx`
|
|
62
|
-
|
|
63
|
-
### Setup
|
|
64
|
-
```javascript
|
|
65
|
-
const { Document, Packer, Paragraph, TextRun, Table, TableRow, TableCell, ImageRun,
|
|
66
|
-
Header, Footer, AlignmentType, PageOrientation, LevelFormat, ExternalHyperlink,
|
|
67
|
-
InternalHyperlink, Bookmark, FootnoteReferenceRun, PositionalTab,
|
|
68
|
-
PositionalTabAlignment, PositionalTabRelativeTo, PositionalTabLeader,
|
|
69
|
-
TabStopType, TabStopPosition, Column, SectionType,
|
|
70
|
-
TableOfContents, HeadingLevel, BorderStyle, WidthType, ShadingType,
|
|
71
|
-
VerticalAlign, PageNumber, PageBreak } = require('docx');
|
|
72
|
-
|
|
73
|
-
const doc = new Document({ sections: [{ children: [/* content */] }] });
|
|
74
|
-
Packer.toBuffer(doc).then(buffer => fs.writeFileSync("doc.docx", buffer));
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
### Validation
|
|
78
|
-
Once the file exists, check that it is valid. Should validation report problems, unpack the archive, correct the XML, and pack it back up.
|
|
79
|
-
```bash
|
|
80
|
-
python scripts/office/validate.py doc.docx
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
### Page Size
|
|
84
|
-
|
|
85
|
-
```javascript
|
|
86
|
-
// CRITICAL: docx-js defaults to A4, not US Letter
|
|
87
|
-
// Always set page size explicitly for consistent results
|
|
88
|
-
sections: [{
|
|
89
|
-
properties: {
|
|
90
|
-
page: {
|
|
91
|
-
size: {
|
|
92
|
-
width: 12240, // 8.5 inches in DXA
|
|
93
|
-
height: 15840 // 11 inches in DXA
|
|
94
|
-
},
|
|
95
|
-
margin: { top: 1440, right: 1440, bottom: 1440, left: 1440 } // 1 inch margins
|
|
96
|
-
}
|
|
97
|
-
},
|
|
98
|
-
children: [/* content */]
|
|
99
|
-
}]
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
**Common page sizes (DXA units, 1440 DXA = 1 inch):**
|
|
103
|
-
|
|
104
|
-
| Paper | Width | Height | Content Width (1" margins) |
|
|
105
|
-
|-------|-------|--------|---------------------------|
|
|
106
|
-
| US Letter | 12,240 | 15,840 | 9,360 |
|
|
107
|
-
| A4 (default) | 11,906 | 16,838 | 9,026 |
|
|
108
|
-
|
|
109
|
-
**Landscape orientation:** because docx-js flips width and height on its own behind the scenes, supply the portrait measurements and let the library perform the swap for you:
|
|
110
|
-
```javascript
|
|
111
|
-
size: {
|
|
112
|
-
width: 12240, // Pass SHORT edge as width
|
|
113
|
-
height: 15840, // Pass LONG edge as height
|
|
114
|
-
orientation: PageOrientation.LANDSCAPE // docx-js swaps them in the XML
|
|
115
|
-
},
|
|
116
|
-
// Content width = 15840 - left margin - right margin (uses the long edge)
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
### Styles (Override Built-in Headings)
|
|
120
|
-
|
|
121
|
-
Default to Arial since it is available everywhere. Leave heading text black so it stays easy to read.
|
|
122
|
-
|
|
123
|
-
```javascript
|
|
124
|
-
const doc = new Document({
|
|
125
|
-
styles: {
|
|
126
|
-
default: { document: { run: { font: "Arial", size: 24 } } }, // 12pt default
|
|
127
|
-
paragraphStyles: [
|
|
128
|
-
// IMPORTANT: Use exact IDs to override built-in styles
|
|
129
|
-
{ id: "Heading1", name: "Heading 1", basedOn: "Normal", next: "Normal", quickFormat: true,
|
|
130
|
-
run: { size: 32, bold: true, font: "Arial" },
|
|
131
|
-
paragraph: { spacing: { before: 240, after: 240 }, outlineLevel: 0 } }, // outlineLevel required for TOC
|
|
132
|
-
{ id: "Heading2", name: "Heading 2", basedOn: "Normal", next: "Normal", quickFormat: true,
|
|
133
|
-
run: { size: 28, bold: true, font: "Arial" },
|
|
134
|
-
paragraph: { spacing: { before: 180, after: 180 }, outlineLevel: 1 } },
|
|
135
|
-
]
|
|
136
|
-
},
|
|
137
|
-
sections: [{
|
|
138
|
-
children: [
|
|
139
|
-
new Paragraph({ heading: HeadingLevel.HEADING_1, children: [new TextRun("Title")] }),
|
|
140
|
-
]
|
|
141
|
-
}]
|
|
142
|
-
});
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
### Lists (NEVER use unicode bullets)
|
|
146
|
-
|
|
147
|
-
```javascript
|
|
148
|
-
// ❌ WRONG - never manually insert bullet characters
|
|
149
|
-
new Paragraph({ children: [new TextRun("• Item")] }) // BAD
|
|
150
|
-
new Paragraph({ children: [new TextRun("\u2022 Item")] }) // BAD
|
|
151
|
-
|
|
152
|
-
// ✅ CORRECT - use numbering config with LevelFormat.BULLET
|
|
153
|
-
const doc = new Document({
|
|
154
|
-
numbering: {
|
|
155
|
-
config: [
|
|
156
|
-
{ reference: "bullets",
|
|
157
|
-
levels: [{ level: 0, format: LevelFormat.BULLET, text: "•", alignment: AlignmentType.LEFT,
|
|
158
|
-
style: { paragraph: { indent: { left: 720, hanging: 360 } } } }] },
|
|
159
|
-
{ reference: "numbers",
|
|
160
|
-
levels: [{ level: 0, format: LevelFormat.DECIMAL, text: "%1.", alignment: AlignmentType.LEFT,
|
|
161
|
-
style: { paragraph: { indent: { left: 720, hanging: 360 } } } }] },
|
|
162
|
-
]
|
|
163
|
-
},
|
|
164
|
-
sections: [{
|
|
165
|
-
children: [
|
|
166
|
-
new Paragraph({ numbering: { reference: "bullets", level: 0 },
|
|
167
|
-
children: [new TextRun("Bullet item")] }),
|
|
168
|
-
new Paragraph({ numbering: { reference: "numbers", level: 0 },
|
|
169
|
-
children: [new TextRun("Numbered item")] }),
|
|
170
|
-
]
|
|
171
|
-
}]
|
|
172
|
-
});
|
|
173
|
-
|
|
174
|
-
// ⚠️ Each reference creates INDEPENDENT numbering
|
|
175
|
-
// Same reference = continues (1,2,3 then 4,5,6)
|
|
176
|
-
// Different reference = restarts (1,2,3 then 1,2,3)
|
|
177
|
-
```
|
|
178
|
-
|
|
179
|
-
### Tables
|
|
180
|
-
|
|
181
|
-
**CRITICAL: Tables need dual widths** - specify `columnWidths` at the table level AND a `width` on every cell. If either one is missing, certain platforms will display the table wrong.
|
|
182
|
-
|
|
183
|
-
```javascript
|
|
184
|
-
// CRITICAL: Always set table width for consistent rendering
|
|
185
|
-
// CRITICAL: Use ShadingType.CLEAR (not SOLID) to prevent black backgrounds
|
|
186
|
-
const border = { style: BorderStyle.SINGLE, size: 1, color: "CCCCCC" };
|
|
187
|
-
const borders = { top: border, bottom: border, left: border, right: border };
|
|
188
|
-
|
|
189
|
-
new Table({
|
|
190
|
-
width: { size: 9360, type: WidthType.DXA }, // Always use DXA (percentages break in Google Docs)
|
|
191
|
-
columnWidths: [4680, 4680], // Must sum to table width (DXA: 1440 = 1 inch)
|
|
192
|
-
rows: [
|
|
193
|
-
new TableRow({
|
|
194
|
-
children: [
|
|
195
|
-
new TableCell({
|
|
196
|
-
borders,
|
|
197
|
-
width: { size: 4680, type: WidthType.DXA }, // Also set on each cell
|
|
198
|
-
shading: { fill: "D5E8F0", type: ShadingType.CLEAR }, // CLEAR not SOLID
|
|
199
|
-
margins: { top: 80, bottom: 80, left: 120, right: 120 }, // Cell padding (internal, not added to width)
|
|
200
|
-
children: [new Paragraph({ children: [new TextRun("Cell")] })]
|
|
201
|
-
})
|
|
202
|
-
]
|
|
203
|
-
})
|
|
204
|
-
]
|
|
205
|
-
})
|
|
206
|
-
```
|
|
207
|
-
|
|
208
|
-
**Table width calculation:**
|
|
209
|
-
|
|
210
|
-
Stick to `WidthType.DXA` at all times — `WidthType.PERCENTAGE` fails to render properly in Google Docs.
|
|
211
|
-
|
|
212
|
-
```javascript
|
|
213
|
-
// Table width = sum of columnWidths = content width
|
|
214
|
-
// US Letter with 1" margins: 12240 - 2880 = 9360 DXA
|
|
215
|
-
width: { size: 9360, type: WidthType.DXA },
|
|
216
|
-
columnWidths: [7000, 2360] // Must sum to table width
|
|
217
|
-
```
|
|
218
|
-
|
|
219
|
-
**Width rules:**
|
|
220
|
-
- **Always use `WidthType.DXA`** — steer clear of `WidthType.PERCENTAGE`, which Google Docs cannot handle
|
|
221
|
-
- The table's width has to match the total of its `columnWidths`
|
|
222
|
-
- Each cell `width` needs to line up with its matching `columnWidth`
|
|
223
|
-
- Cell `margins` act as inner padding — they shrink the usable content area rather than enlarging the cell
|
|
224
|
-
- To make a table span the full page, set its width to the content width (page width less the left and right margins)
|
|
225
|
-
|
|
226
|
-
### Images
|
|
227
|
-
|
|
228
|
-
```javascript
|
|
229
|
-
// CRITICAL: type parameter is REQUIRED
|
|
230
|
-
new Paragraph({
|
|
231
|
-
children: [new ImageRun({
|
|
232
|
-
type: "png", // Required: png, jpg, jpeg, gif, bmp, svg
|
|
233
|
-
data: fs.readFileSync("image.png"),
|
|
234
|
-
transformation: { width: 200, height: 150 },
|
|
235
|
-
altText: { title: "Title", description: "Desc", name: "Name" } // All three required
|
|
236
|
-
})]
|
|
237
|
-
})
|
|
238
|
-
```
|
|
239
|
-
|
|
240
|
-
### Page Breaks
|
|
241
|
-
|
|
242
|
-
```javascript
|
|
243
|
-
// CRITICAL: PageBreak must be inside a Paragraph
|
|
244
|
-
new Paragraph({ children: [new PageBreak()] })
|
|
245
|
-
|
|
246
|
-
// Or use pageBreakBefore
|
|
247
|
-
new Paragraph({ pageBreakBefore: true, children: [new TextRun("New page")] })
|
|
248
|
-
```
|
|
249
|
-
|
|
250
|
-
### Hyperlinks
|
|
251
|
-
|
|
252
|
-
```javascript
|
|
253
|
-
// External link
|
|
254
|
-
new Paragraph({
|
|
255
|
-
children: [new ExternalHyperlink({
|
|
256
|
-
children: [new TextRun({ text: "Click here", style: "Hyperlink" })],
|
|
257
|
-
link: "https://example.com",
|
|
258
|
-
})]
|
|
259
|
-
})
|
|
260
|
-
|
|
261
|
-
// Internal link (bookmark + reference)
|
|
262
|
-
// 1. Create bookmark at destination
|
|
263
|
-
new Paragraph({ heading: HeadingLevel.HEADING_1, children: [
|
|
264
|
-
new Bookmark({ id: "chapter1", children: [new TextRun("Chapter 1")] }),
|
|
265
|
-
]})
|
|
266
|
-
// 2. Link to it
|
|
267
|
-
new Paragraph({ children: [new InternalHyperlink({
|
|
268
|
-
children: [new TextRun({ text: "See Chapter 1", style: "Hyperlink" })],
|
|
269
|
-
anchor: "chapter1",
|
|
270
|
-
})]})
|
|
271
|
-
```
|
|
272
|
-
|
|
273
|
-
### Footnotes
|
|
274
|
-
|
|
275
|
-
```javascript
|
|
276
|
-
const doc = new Document({
|
|
277
|
-
footnotes: {
|
|
278
|
-
1: { children: [new Paragraph("Source: Annual Report 2024")] },
|
|
279
|
-
2: { children: [new Paragraph("See appendix for methodology")] },
|
|
280
|
-
},
|
|
281
|
-
sections: [{
|
|
282
|
-
children: [new Paragraph({
|
|
283
|
-
children: [
|
|
284
|
-
new TextRun("Revenue grew 15%"),
|
|
285
|
-
new FootnoteReferenceRun(1),
|
|
286
|
-
new TextRun(" using adjusted metrics"),
|
|
287
|
-
new FootnoteReferenceRun(2),
|
|
288
|
-
],
|
|
289
|
-
})]
|
|
290
|
-
}]
|
|
291
|
-
});
|
|
292
|
-
```
|
|
293
|
-
|
|
294
|
-
### Tab Stops
|
|
295
|
-
|
|
296
|
-
```javascript
|
|
297
|
-
// Right-align text on same line (e.g., date opposite a title)
|
|
298
|
-
new Paragraph({
|
|
299
|
-
children: [
|
|
300
|
-
new TextRun("Company Name"),
|
|
301
|
-
new TextRun("\tJanuary 2025"),
|
|
302
|
-
],
|
|
303
|
-
tabStops: [{ type: TabStopType.RIGHT, position: TabStopPosition.MAX }],
|
|
304
|
-
})
|
|
305
|
-
|
|
306
|
-
// Dot leader (e.g., TOC-style)
|
|
307
|
-
new Paragraph({
|
|
308
|
-
children: [
|
|
309
|
-
new TextRun("Introduction"),
|
|
310
|
-
new TextRun({ children: [
|
|
311
|
-
new PositionalTab({
|
|
312
|
-
alignment: PositionalTabAlignment.RIGHT,
|
|
313
|
-
relativeTo: PositionalTabRelativeTo.MARGIN,
|
|
314
|
-
leader: PositionalTabLeader.DOT,
|
|
315
|
-
}),
|
|
316
|
-
"3",
|
|
317
|
-
]}),
|
|
318
|
-
],
|
|
319
|
-
})
|
|
320
|
-
```
|
|
321
|
-
|
|
322
|
-
### Multi-Column Layouts
|
|
323
|
-
|
|
324
|
-
```javascript
|
|
325
|
-
// Equal-width columns
|
|
326
|
-
sections: [{
|
|
327
|
-
properties: {
|
|
328
|
-
column: {
|
|
329
|
-
count: 2, // number of columns
|
|
330
|
-
space: 720, // gap between columns in DXA (720 = 0.5 inch)
|
|
331
|
-
equalWidth: true,
|
|
332
|
-
separate: true, // vertical line between columns
|
|
333
|
-
},
|
|
334
|
-
},
|
|
335
|
-
children: [/* content flows naturally across columns */]
|
|
336
|
-
}]
|
|
337
|
-
|
|
338
|
-
// Custom-width columns (equalWidth must be false)
|
|
339
|
-
sections: [{
|
|
340
|
-
properties: {
|
|
341
|
-
column: {
|
|
342
|
-
equalWidth: false,
|
|
343
|
-
children: [
|
|
344
|
-
new Column({ width: 5400, space: 720 }),
|
|
345
|
-
new Column({ width: 3240 }),
|
|
346
|
-
],
|
|
347
|
-
},
|
|
348
|
-
},
|
|
349
|
-
children: [/* content */]
|
|
350
|
-
}]
|
|
351
|
-
```
|
|
352
|
-
|
|
353
|
-
To push content into the next column, start a fresh section with `type: SectionType.NEXT_COLUMN`.
|
|
354
|
-
|
|
355
|
-
### Table of Contents
|
|
356
|
-
|
|
357
|
-
```javascript
|
|
358
|
-
// CRITICAL: Headings must use HeadingLevel ONLY - no custom styles
|
|
359
|
-
new TableOfContents("Table of Contents", { hyperlink: true, headingStyleRange: "1-3" })
|
|
360
|
-
```
|
|
361
|
-
|
|
362
|
-
### Headers/Footers
|
|
363
|
-
|
|
364
|
-
```javascript
|
|
365
|
-
sections: [{
|
|
366
|
-
properties: {
|
|
367
|
-
page: { margin: { top: 1440, right: 1440, bottom: 1440, left: 1440 } } // 1440 = 1 inch
|
|
368
|
-
},
|
|
369
|
-
headers: {
|
|
370
|
-
default: new Header({ children: [new Paragraph({ children: [new TextRun("Header")] })] })
|
|
371
|
-
},
|
|
372
|
-
footers: {
|
|
373
|
-
default: new Footer({ children: [new Paragraph({
|
|
374
|
-
children: [new TextRun("Page "), new TextRun({ children: [PageNumber.CURRENT] })]
|
|
375
|
-
})] })
|
|
376
|
-
},
|
|
377
|
-
children: [/* content */]
|
|
378
|
-
}]
|
|
379
|
-
```
|
|
380
|
-
|
|
381
|
-
### Critical Rules for docx-js
|
|
382
|
-
|
|
383
|
-
- **Set page size explicitly** - the docx-js default is A4, so switch to US Letter (12240 x 15840 DXA) when producing US documents
|
|
384
|
-
- **Landscape: pass portrait dimensions** - since docx-js handles the width/height swap itself, give the short edge as `width`, the long edge as `height`, and add `orientation: PageOrientation.LANDSCAPE`
|
|
385
|
-
- **Never use `\n`** - break text apart into individual Paragraph elements instead
|
|
386
|
-
- **Never use unicode bullets** - rely on `LevelFormat.BULLET` together with a numbering config
|
|
387
|
-
- **PageBreak must be in Paragraph** - on its own it generates invalid XML
|
|
388
|
-
- **ImageRun requires `type`** - always name the format: png, jpg, and so on
|
|
389
|
-
- **Always set table `width` with DXA** - stay away from `WidthType.PERCENTAGE`, which Google Docs cannot render
|
|
390
|
-
- **Tables need dual widths** - both the `columnWidths` array and each cell `width`, and the two must agree
|
|
391
|
-
- **Table width = sum of columnWidths** - with DXA the figures have to total up precisely
|
|
392
|
-
- **Always add cell margins** - `margins: { top: 80, bottom: 80, left: 120, right: 120 }` gives comfortable padding
|
|
393
|
-
- **Use `ShadingType.CLEAR`** - reserve SOLID; it should never be used for table shading
|
|
394
|
-
- **Never use tables as dividers/rules** - cells carry a minimum height and show up as empty boxes (headers and footers included); instead apply `border: { bottom: { style: BorderStyle.SINGLE, size: 6, color: "2E75B6", space: 1 } }` to a Paragraph. For a two-column footer, reach for tab stops (see the Tab Stops section) rather than a table
|
|
395
|
-
- **TOC requires HeadingLevel only** - heading paragraphs must not carry custom styles
|
|
396
|
-
- **Override built-in styles** - reference the exact IDs: "Heading1", "Heading2", and so on
|
|
397
|
-
- **Include `outlineLevel`** - the TOC depends on it (0 for H1, 1 for H2, etc.)
|
|
398
|
-
|
|
399
|
-
---
|
|
400
|
-
|
|
401
|
-
## Editing Existing Documents
|
|
402
|
-
|
|
403
|
-
**Work through these 3 steps in sequence.**
|
|
404
|
-
|
|
405
|
-
### Step 1: Unpack
|
|
406
|
-
```bash
|
|
407
|
-
python scripts/office/unpack.py document.docx unpacked/
|
|
408
|
-
```
|
|
409
|
-
This pulls out the XML, formats it for readability, combines neighboring runs, and rewrites smart quotes as XML entities (`“` and friends) so editing does not corrupt them. Pass `--merge-runs false` if you would rather not merge runs.
|
|
410
|
-
|
|
411
|
-
### Step 2: Edit XML
|
|
412
|
-
|
|
413
|
-
Modify the files under `unpacked/word/`. Consult the XML Reference further down for the relevant patterns.
|
|
414
|
-
|
|
415
|
-
**Set the author to "WormClaude"** on tracked changes and comments, unless the user specifically asks for another name.
|
|
416
|
-
|
|
417
|
-
**Do your string replacements with the Edit tool directly — skip Python scripts.** Such scripts only add needless complexity, whereas the Edit tool makes the exact replacement visible.
|
|
418
|
-
|
|
419
|
-
**CRITICAL: Use smart quotes for new content.** Whenever you insert text containing apostrophes or quotation marks, write them as XML entities so they come out as smart quotes:
|
|
420
|
-
```xml
|
|
421
|
-
<!-- Use these entities for professional typography -->
|
|
422
|
-
<w:t>Here’s a quote: “Hello”</w:t>
|
|
423
|
-
```
|
|
424
|
-
| Entity | Character |
|
|
425
|
-
|--------|-----------|
|
|
426
|
-
| `‘` | ‘ (left single) |
|
|
427
|
-
| `’` | ’ (right single / apostrophe) |
|
|
428
|
-
| `“` | “ (left double) |
|
|
429
|
-
| `”` | ” (right double) |
|
|
430
|
-
|
|
431
|
-
**Adding comments:** Let `comment.py` take care of the boilerplate that spans several XML files (the text you supply must already be XML-escaped):
|
|
432
|
-
```bash
|
|
433
|
-
python scripts/comment.py unpacked/ 0 "Comment text with & and ’"
|
|
434
|
-
python scripts/comment.py unpacked/ 1 "Reply text" --parent 0 # reply to comment 0
|
|
435
|
-
python scripts/comment.py unpacked/ 0 "Text" --author "Custom Author" # custom author name
|
|
436
|
-
```
|
|
437
|
-
Afterward, place the markers in document.xml (refer to Comments in the XML Reference).
|
|
438
|
-
|
|
439
|
-
### Step 3: Pack
|
|
440
|
-
```bash
|
|
441
|
-
python scripts/office/pack.py unpacked/ output.docx --original document.docx
|
|
442
|
-
```
|
|
443
|
-
This runs validation with auto-repair, compresses the XML, and assembles the DOCX. Add `--validate false` to bypass it.
|
|
444
|
-
|
|
445
|
-
**Auto-repair handles:**
|
|
446
|
-
- `durableId` values >= 0x7FFFFFFF (a fresh valid ID is generated)
|
|
447
|
-
- `<w:t>` elements that contain whitespace but lack `xml:space="preserve"`
|
|
448
|
-
|
|
449
|
-
**Auto-repair does NOT handle:**
|
|
450
|
-
- Broken XML, illegal element nesting, absent relationships, or schema violations
|
|
451
|
-
|
|
452
|
-
### Common Pitfalls
|
|
453
|
-
|
|
454
|
-
- **Replace entire `<w:r>` elements**: To record a tracked change, swap out the complete `<w:r>...</w:r>` block for sibling `<w:del>...<w:ins>...` elements. Never embed tracked-change tags within a run.
|
|
455
|
-
- **Preserve `<w:rPr>` formatting**: Carry the source run's `<w:rPr>` block over into your tracked-change runs so bold, font size, and similar attributes stay intact.
|
|
456
|
-
|
|
457
|
-
---
|
|
458
|
-
|
|
459
|
-
## XML Reference
|
|
460
|
-
|
|
461
|
-
### Schema Compliance
|
|
462
|
-
|
|
463
|
-
- **Element order in `<w:pPr>`**: arrange as `<w:pStyle>`, `<w:numPr>`, `<w:spacing>`, `<w:ind>`, `<w:jc>`, with `<w:rPr>` coming last
|
|
464
|
-
- **Whitespace**: any `<w:t>` that has leading or trailing spaces needs `xml:space="preserve"`
|
|
465
|
-
- **RSIDs**: have to be 8 hex digits (for instance, `00AB1234`)
|
|
466
|
-
|
|
467
|
-
### Tracked Changes
|
|
468
|
-
|
|
469
|
-
**Insertion:**
|
|
470
|
-
```xml
|
|
471
|
-
<w:ins w:id="1" w:author="WormClaude" w:date="2025-01-01T00:00:00Z">
|
|
472
|
-
<w:r><w:t>inserted text</w:t></w:r>
|
|
473
|
-
</w:ins>
|
|
474
|
-
```
|
|
475
|
-
|
|
476
|
-
**Deletion:**
|
|
477
|
-
```xml
|
|
478
|
-
<w:del w:id="2" w:author="WormClaude" w:date="2025-01-01T00:00:00Z">
|
|
479
|
-
<w:r><w:delText>deleted text</w:delText></w:r>
|
|
480
|
-
</w:del>
|
|
481
|
-
```
|
|
482
|
-
|
|
483
|
-
**Inside `<w:del>`**: swap `<w:t>` for `<w:delText>`, and `<w:instrText>` for `<w:delInstrText>`.
|
|
484
|
-
|
|
485
|
-
**Minimal edits** - flag only the portion that actually changes:
|
|
486
|
-
```xml
|
|
487
|
-
<!-- Change "30 days" to "60 days" -->
|
|
488
|
-
<w:r><w:t>The term is </w:t></w:r>
|
|
489
|
-
<w:del w:id="1" w:author="WormClaude" w:date="...">
|
|
490
|
-
<w:r><w:delText>30</w:delText></w:r>
|
|
491
|
-
</w:del>
|
|
492
|
-
<w:ins w:id="2" w:author="WormClaude" w:date="...">
|
|
493
|
-
<w:r><w:t>60</w:t></w:r>
|
|
494
|
-
</w:ins>
|
|
495
|
-
<w:r><w:t> days.</w:t></w:r>
|
|
496
|
-
```
|
|
497
|
-
|
|
498
|
-
**Deleting entire paragraphs/list items** - whenever you strip out every bit of content from a paragraph, mark the paragraph mark itself as deleted as well, which causes it to merge into the paragraph that follows. Insert `<w:del/>` within `<w:pPr><w:rPr>`:
|
|
499
|
-
```xml
|
|
500
|
-
<w:p>
|
|
501
|
-
<w:pPr>
|
|
502
|
-
<w:numPr>...</w:numPr> <!-- list numbering if present -->
|
|
503
|
-
<w:rPr>
|
|
504
|
-
<w:del w:id="1" w:author="WormClaude" w:date="2025-01-01T00:00:00Z"/>
|
|
505
|
-
</w:rPr>
|
|
506
|
-
</w:pPr>
|
|
507
|
-
<w:del w:id="2" w:author="WormClaude" w:date="2025-01-01T00:00:00Z">
|
|
508
|
-
<w:r><w:delText>Entire paragraph content being deleted...</w:delText></w:r>
|
|
509
|
-
</w:del>
|
|
510
|
-
</w:p>
|
|
511
|
-
```
|
|
512
|
-
Omit that `<w:del/>` from `<w:pPr><w:rPr>` and accepting the changes will leave behind a blank paragraph or list item.
|
|
513
|
-
|
|
514
|
-
**Rejecting another author's insertion** - tuck your deletion inside their insertion:
|
|
515
|
-
```xml
|
|
516
|
-
<w:ins w:author="Jane" w:id="5">
|
|
517
|
-
<w:del w:author="WormClaude" w:id="10">
|
|
518
|
-
<w:r><w:delText>their inserted text</w:delText></w:r>
|
|
519
|
-
</w:del>
|
|
520
|
-
</w:ins>
|
|
521
|
-
```
|
|
522
|
-
|
|
523
|
-
**Restoring another author's deletion** - append an insertion afterward and leave their deletion untouched:
|
|
524
|
-
```xml
|
|
525
|
-
<w:del w:author="Jane" w:id="5">
|
|
526
|
-
<w:r><w:delText>deleted text</w:delText></w:r>
|
|
527
|
-
</w:del>
|
|
528
|
-
<w:ins w:author="WormClaude" w:id="10">
|
|
529
|
-
<w:r><w:t>deleted text</w:t></w:r>
|
|
530
|
-
</w:ins>
|
|
531
|
-
```
|
|
532
|
-
|
|
533
|
-
### Comments
|
|
534
|
-
|
|
535
|
-
Once `comment.py` has run (see Step 2), insert the markers into document.xml. To create a reply, supply the `--parent` flag and nest its markers within the parent's.
|
|
536
|
-
|
|
537
|
-
**CRITICAL: `<w:commentRangeStart>` and `<w:commentRangeEnd>` sit as siblings of `<w:r>` — never place them inside a `<w:r>`.**
|
|
538
|
-
|
|
539
|
-
```xml
|
|
540
|
-
<!-- Comment markers are direct children of w:p, never inside w:r -->
|
|
541
|
-
<w:commentRangeStart w:id="0"/>
|
|
542
|
-
<w:del w:id="1" w:author="WormClaude" w:date="2025-01-01T00:00:00Z">
|
|
543
|
-
<w:r><w:delText>deleted</w:delText></w:r>
|
|
544
|
-
</w:del>
|
|
545
|
-
<w:r><w:t> more text</w:t></w:r>
|
|
546
|
-
<w:commentRangeEnd w:id="0"/>
|
|
547
|
-
<w:r><w:rPr><w:rStyle w:val="CommentReference"/></w:rPr><w:commentReference w:id="0"/></w:r>
|
|
548
|
-
|
|
549
|
-
<!-- Comment 0 with reply 1 nested inside -->
|
|
550
|
-
<w:commentRangeStart w:id="0"/>
|
|
551
|
-
<w:commentRangeStart w:id="1"/>
|
|
552
|
-
<w:r><w:t>text</w:t></w:r>
|
|
553
|
-
<w:commentRangeEnd w:id="1"/>
|
|
554
|
-
<w:commentRangeEnd w:id="0"/>
|
|
555
|
-
<w:r><w:rPr><w:rStyle w:val="CommentReference"/></w:rPr><w:commentReference w:id="0"/></w:r>
|
|
556
|
-
<w:r><w:rPr><w:rStyle w:val="CommentReference"/></w:rPr><w:commentReference w:id="1"/></w:r>
|
|
557
|
-
```
|
|
558
|
-
|
|
559
|
-
### Images
|
|
560
|
-
|
|
561
|
-
1. Drop the image file into `word/media/`
|
|
562
|
-
2. Register a relationship in `word/_rels/document.xml.rels`:
|
|
563
|
-
```xml
|
|
564
|
-
<Relationship Id="rId5" Type=".../image" Target="media/image1.png"/>
|
|
565
|
-
```
|
|
566
|
-
3. Declare the content type in `[Content_Types].xml`:
|
|
567
|
-
```xml
|
|
568
|
-
<Default Extension="png" ContentType="image/png"/>
|
|
569
|
-
```
|
|
570
|
-
4. Point to it from document.xml:
|
|
571
|
-
```xml
|
|
572
|
-
<w:drawing>
|
|
573
|
-
<wp:inline>
|
|
574
|
-
<wp:extent cx="914400" cy="914400"/> <!-- EMUs: 914400 = 1 inch -->
|
|
575
|
-
<a:graphic>
|
|
576
|
-
<a:graphicData uri=".../picture">
|
|
577
|
-
<pic:pic>
|
|
578
|
-
<pic:blipFill><a:blip r:embed="rId5"/></pic:blipFill>
|
|
579
|
-
</pic:pic>
|
|
580
|
-
</a:graphicData>
|
|
581
|
-
</a:graphic>
|
|
582
|
-
</wp:inline>
|
|
583
|
-
</w:drawing>
|
|
584
|
-
```
|
|
585
|
-
|
|
586
|
-
---
|
|
587
|
-
|
|
588
|
-
## Dependencies
|
|
589
|
-
|
|
590
|
-
- **pandoc**: pulling text out of documents
|
|
591
|
-
- **docx**: `npm install -g docx` (for authoring new documents)
|
|
592
|
-
- **LibreOffice**: converting to PDF (set up automatically for sandboxed environments through `scripts/office/soffice.py`)
|
|
593
|
-
- **Poppler**: provides `pdftoppm` for rendering images
|
package/skills/explain.md
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: explain
|
|
3
|
-
description: kodu satir satir acikla
|
|
4
|
-
context: inline
|
|
5
|
-
---
|
|
6
|
-
Verilen kodu net ve adim adim acikla.
|
|
7
|
-
|
|
8
|
-
- Once bir cumleyle kodun GENEL amacini soyle (ne ise yariyor).
|
|
9
|
-
- Sonra mantiksal bloklari sirayla ele al; her bloğun ne yaptigini ve NEDEN orada oldugunu acikla.
|
|
10
|
-
- Onemli satirlarda: degisken/fonksiyonun rolu, akis (donguler, kosullar), girdi/cikti.
|
|
11
|
-
- Dilin/cerceve'nin onemli kavramlarini (kapanis, async, pointer, decorator vb.) kisa kenar notuyla acikla.
|
|
12
|
-
- Varsa gizli tuzaklari, kenar durumlari, performans veya guvenlik etkilerini belirt.
|
|
13
|
-
- Gereksiz teori anlatma; kodun gercekten yaptigina bagli kal. Seviyeyi kullanicinin sorusuna gore ayarla (yeni baslayan ise daha sade).
|
|
14
|
-
- Sonunda 1-2 satirla ozetle: "kisaca bu kod ...".
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: frontend-design
|
|
3
|
-
description: Build standout, ship-ready frontend interfaces with a strong design sensibility. Reach for this skill whenever someone needs web components, full pages, or applications built. Produces inventive, well-crafted code that steers clear of cookie-cutter AI looks.
|
|
4
|
-
license: WormClaude
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
This skill is your playbook for crafting memorable, ship-ready frontend interfaces that escape the generic "AI slop" look. Write genuine, functioning code while obsessing over visual detail and bold creative decisions.
|
|
8
|
-
|
|
9
|
-
Expect the request to describe something to build: a single component, a page, a whole application, or an interface. It might also carry hints about the goal, the intended audience, or technical limits to respect.
|
|
10
|
-
|
|
11
|
-
## Design Thinking
|
|
12
|
-
|
|
13
|
-
Don't touch code until you've absorbed the context and locked in a DARING aesthetic stance:
|
|
14
|
-
- **Purpose**: What is this interface actually for, and who will be reaching for it?
|
|
15
|
-
- **Tone**: Go to a far end of the spectrum: brutally minimal, maximalist chaos, retro-futuristic, organic/natural, luxury/refined, playful/toy-like, editorial/magazine, brutalist/raw, art deco/geometric, soft/pastel, industrial/utilitarian, and so on. The menu of flavors is huge. Treat these as springboards, then commit to one that genuinely fits the direction you've chosen.
|
|
16
|
-
- **Constraints**: The technical givens (framework, performance, accessibility).
|
|
17
|
-
- **Differentiation**: What makes this IMPOSSIBLE TO FORGET? What's the single detail that sticks with someone?
|
|
18
|
-
|
|
19
|
-
**CRITICAL**: Settle on one coherent concept and carry it out cleanly. Loud maximalism and quiet minimalism are both valid - what counts is deliberate intent, not sheer volume.
|
|
20
|
-
|
|
21
|
-
From there, ship real code (HTML/CSS/JS, React, Vue, etc.) that is:
|
|
22
|
-
- Functional and ready for production
|
|
23
|
-
- Visually arresting and memorable
|
|
24
|
-
- Unified around a clear aesthetic stance
|
|
25
|
-
- Painstakingly polished down to the last detail
|
|
26
|
-
|
|
27
|
-
## Frontend Aesthetics Guidelines
|
|
28
|
-
|
|
29
|
-
Pay attention to:
|
|
30
|
-
- **Typography**: Reach for typefaces that are striking, singular, and full of personality. Skip the defaults like Arial and Inter and instead pick fonts that lift the whole design with their character. Set a bold display face against a clean, readable body face.
|
|
31
|
-
- **Color & Theme**: Lock in one unified look. Lean on CSS variables to keep it consistent. A palette led by a strong dominant color with crisp accents beats a hesitant, evenly-spread one.
|
|
32
|
-
- **Motion**: Bring in animation for both effects and micro-interactions. Reach for CSS-only approaches in plain HTML, and the Motion library in React where it's available. Spend your effort on the big moments: a single carefully choreographed page load with staggered reveals (animation-delay) lands harder than a scatter of tiny interactions. Lean on scroll triggers and hover states that catch people off guard.
|
|
33
|
-
- **Spatial Composition**: Surprising layouts. Asymmetry. Overlap. Diagonal flow. Elements that break the grid. Either lavish whitespace OR deliberate density.
|
|
34
|
-
- **Backgrounds & Visual Details**: Build atmosphere and depth instead of falling back on flat fills. Layer in effects and textures that suit the chosen look. Pull from techniques like gradient meshes, noise textures, geometric patterns, stacked transparencies, bold shadows, ornamental borders, custom cursors, and grain overlays.
|
|
35
|
-
|
|
36
|
-
STAY AWAY FROM the telltale AI-generated look: tired font families (Inter, Roboto, Arial, system fonts), worn-out color schemes (especially purple gradients over white), foreseeable layouts and component shapes, and template-grade design with no real connection to its context.
|
|
37
|
-
|
|
38
|
-
Read the brief with imagination and make surprising calls that feel purpose-built for the situation. Let no two designs repeat. Alternate light and dark themes, swap fonts, shift aesthetics. NEVER keep landing on the same safe pick (Space Grotesk, say) across generations.
|
|
39
|
-
|
|
40
|
-
**IMPORTANT**: Scale the code's intricacy to the design intent. A maximalist concept calls for rich code packed with animation and effects. A minimal or refined concept calls for restraint, precision, and meticulous care over spacing, typography, and the small touches. The polish comes from realizing the vision fully.
|
|
41
|
-
|
|
42
|
-
Keep in mind: WormClaude is capable of remarkable creative output. Don't play it safe, reveal what's genuinely possible when you think past the obvious and back a distinctive vision all the way.
|