dimcode-darwin-x64 0.1.2-beta.1 → 0.1.2

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.
Files changed (148) hide show
  1. package/bin/dimcode +0 -0
  2. package/package.json +1 -1
  3. package/bin/runtime/sandbox/dim-sandbox-runner +0 -0
  4. package/bin/runtime/sandbox/manifest.json +0 -15
  5. package/bin/skills-assets/deep-investigate/SKILL.md +0 -101
  6. package/bin/skills-assets/deep-investigate/references/prompts.md +0 -75
  7. package/bin/skills-assets/deep-investigate/references/templates.md +0 -73
  8. package/bin/skills-assets/deep-investigate/references/thinking-tools.md +0 -36
  9. package/bin/skills-assets/docs-sprint/SKILL.md +0 -73
  10. package/bin/skills-assets/docs-sprint/agents/openai.yaml +0 -4
  11. package/bin/skills-assets/docs-sprint/references/contract-discipline.md +0 -30
  12. package/bin/skills-assets/docs-sprint/references/delivery-plan.md +0 -162
  13. package/bin/skills-assets/docs-sprint/references/documentation-system.md +0 -109
  14. package/bin/skills-assets/docs-sprint/references/ui-layout.md +0 -73
  15. package/bin/skills-assets/docs-sprint/references/worktree-guide.md +0 -45
  16. package/bin/skills-assets/docx/SKILL.md +0 -273
  17. package/bin/skills-assets/docx/assets/styles/academic_styles.xml +0 -250
  18. package/bin/skills-assets/docx/assets/styles/corporate_styles.xml +0 -284
  19. package/bin/skills-assets/docx/assets/styles/default_styles.xml +0 -449
  20. package/bin/skills-assets/docx/assets/xsd/aesthetic-rules.xsd +0 -470
  21. package/bin/skills-assets/docx/assets/xsd/business-rules.xsd +0 -130
  22. package/bin/skills-assets/docx/assets/xsd/common-types.xsd +0 -159
  23. package/bin/skills-assets/docx/assets/xsd/wml-subset.xsd +0 -589
  24. package/bin/skills-assets/docx/references/cjk_typography.md +0 -357
  25. package/bin/skills-assets/docx/references/cjk_university_template_guide.md +0 -184
  26. package/bin/skills-assets/docx/references/comments_guide.md +0 -191
  27. package/bin/skills-assets/docx/references/design_good_bad_examples.md +0 -829
  28. package/bin/skills-assets/docx/references/design_principles.md +0 -819
  29. package/bin/skills-assets/docx/references/openxml_element_order.md +0 -308
  30. package/bin/skills-assets/docx/references/openxml_encyclopedia_part1.md +0 -4061
  31. package/bin/skills-assets/docx/references/openxml_encyclopedia_part2.md +0 -2820
  32. package/bin/skills-assets/docx/references/openxml_encyclopedia_part3.md +0 -3381
  33. package/bin/skills-assets/docx/references/openxml_namespaces.md +0 -82
  34. package/bin/skills-assets/docx/references/openxml_units.md +0 -72
  35. package/bin/skills-assets/docx/references/scenario_a_create.md +0 -284
  36. package/bin/skills-assets/docx/references/scenario_b_edit_content.md +0 -295
  37. package/bin/skills-assets/docx/references/scenario_c_apply_template.md +0 -456
  38. package/bin/skills-assets/docx/references/track_changes_guide.md +0 -200
  39. package/bin/skills-assets/docx/references/troubleshooting.md +0 -506
  40. package/bin/skills-assets/docx/references/typography_guide.md +0 -294
  41. package/bin/skills-assets/docx/references/xsd_validation_guide.md +0 -158
  42. package/bin/skills-assets/docx/scripts/doc_to_docx.sh +0 -40
  43. package/bin/skills-assets/docx/scripts/docx_preview.sh +0 -37
  44. package/bin/skills-assets/docx/scripts/dotnet/Docx.Cli/Docx.Cli.csproj +0 -19
  45. package/bin/skills-assets/docx/scripts/dotnet/Docx.Cli/Program.cs +0 -18
  46. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Commands/AnalyzeCommand.cs +0 -147
  47. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Commands/ApplyTemplateCommand.cs +0 -322
  48. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Commands/CreateCommand.cs +0 -324
  49. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Commands/DiffCommand.cs +0 -155
  50. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Commands/EditContentCommand.cs +0 -487
  51. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Commands/FixOrderCommand.cs +0 -108
  52. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Commands/MergeRunsCommand.cs +0 -122
  53. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Commands/ValidateCommand.cs +0 -107
  54. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Docx.Core.csproj +0 -15
  55. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/OpenXml/CommentSynchronizer.cs +0 -169
  56. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/OpenXml/ElementOrder.cs +0 -80
  57. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/OpenXml/NamespaceConstants.cs +0 -42
  58. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/OpenXml/RunMerger.cs +0 -81
  59. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/OpenXml/StyleAnalyzer.cs +0 -81
  60. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/OpenXml/TrackChangesHelper.cs +0 -99
  61. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/OpenXml/UnitConverter.cs +0 -23
  62. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Samples/AestheticRecipeSamples.cs +0 -1832
  63. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Samples/AestheticRecipeSamples_Batch1.cs +0 -910
  64. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Samples/AestheticRecipeSamples_Batch2.cs +0 -999
  65. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Samples/AestheticRecipeSamples_Batch3.cs +0 -1048
  66. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Samples/AestheticRecipeSamples_Batch4.cs +0 -1038
  67. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Samples/CharacterFormattingSamples.cs +0 -1020
  68. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Samples/DocumentCreationSamples.cs +0 -1121
  69. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Samples/FieldAndTocSamples.cs +0 -624
  70. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Samples/FootnoteAndCommentSamples.cs +0 -675
  71. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Samples/HeaderFooterSamples.cs +0 -838
  72. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Samples/ImageSamples.cs +0 -917
  73. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Samples/ListAndNumberingSamples.cs +0 -826
  74. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Samples/ParagraphFormattingSamples.cs +0 -1199
  75. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Samples/StyleSystemSamples.cs +0 -1487
  76. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Samples/TableSamples.cs +0 -1163
  77. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Samples/TrackChangesSamples.cs +0 -595
  78. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Typography/CjkHelper.cs +0 -39
  79. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Typography/FontDefaults.cs +0 -24
  80. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Typography/PageSizes.cs +0 -20
  81. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Validation/BusinessRuleValidator.cs +0 -224
  82. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Validation/GateCheckValidator.cs +0 -148
  83. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Validation/ValidationResult.cs +0 -23
  84. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Validation/XsdValidator.cs +0 -69
  85. package/bin/skills-assets/docx/scripts/dotnet/Docx.slnx +0 -4
  86. package/bin/skills-assets/docx/scripts/env_check.sh +0 -196
  87. package/bin/skills-assets/docx/scripts/setup.ps1 +0 -274
  88. package/bin/skills-assets/docx/scripts/setup.sh +0 -504
  89. package/bin/skills-assets/pdf/README.md +0 -222
  90. package/bin/skills-assets/pdf/SKILL.md +0 -191
  91. package/bin/skills-assets/pdf/design/design.md +0 -381
  92. package/bin/skills-assets/pdf/scripts/cover.py +0 -1579
  93. package/bin/skills-assets/pdf/scripts/fill_inspect.py +0 -200
  94. package/bin/skills-assets/pdf/scripts/fill_write.py +0 -242
  95. package/bin/skills-assets/pdf/scripts/make.sh +0 -491
  96. package/bin/skills-assets/pdf/scripts/merge.py +0 -112
  97. package/bin/skills-assets/pdf/scripts/palette.py +0 -521
  98. package/bin/skills-assets/pdf/scripts/reformat_parse.py +0 -374
  99. package/bin/skills-assets/pdf/scripts/render_body.py +0 -1052
  100. package/bin/skills-assets/pdf/scripts/render_cover.js +0 -111
  101. package/bin/skills-assets/pptx-generator/SKILL.md +0 -248
  102. package/bin/skills-assets/pptx-generator/references/design-system.md +0 -392
  103. package/bin/skills-assets/pptx-generator/references/editing.md +0 -162
  104. package/bin/skills-assets/pptx-generator/references/pitfalls.md +0 -112
  105. package/bin/skills-assets/pptx-generator/references/pptxgenjs.md +0 -420
  106. package/bin/skills-assets/pptx-generator/references/slide-types.md +0 -413
  107. package/bin/skills-assets/skill-creator/SKILL.md +0 -368
  108. package/bin/skills-assets/skill-creator/agents/openai.yaml +0 -5
  109. package/bin/skills-assets/skill-creator/assets/skill-creator-small.svg +0 -3
  110. package/bin/skills-assets/skill-creator/assets/skill-creator.png +0 -0
  111. package/bin/skills-assets/skill-creator/license.txt +0 -202
  112. package/bin/skills-assets/skill-creator/references/openai_yaml.md +0 -49
  113. package/bin/skills-assets/skill-creator/scripts/generate_openai_yaml.py +0 -226
  114. package/bin/skills-assets/skill-creator/scripts/init_skill.py +0 -397
  115. package/bin/skills-assets/skill-creator/scripts/quick_validate.py +0 -101
  116. package/bin/skills-assets/skill-installer/LICENSE.txt +0 -202
  117. package/bin/skills-assets/skill-installer/SKILL.md +0 -58
  118. package/bin/skills-assets/skill-installer/agents/openai.yaml +0 -5
  119. package/bin/skills-assets/skill-installer/assets/skill-installer-small.svg +0 -3
  120. package/bin/skills-assets/skill-installer/assets/skill-installer.png +0 -0
  121. package/bin/skills-assets/skill-installer/scripts/github_utils.py +0 -21
  122. package/bin/skills-assets/skill-installer/scripts/install-skill-from-github.py +0 -308
  123. package/bin/skills-assets/skill-installer/scripts/list-skills.py +0 -107
  124. package/bin/skills-assets/xlsx/SKILL.md +0 -137
  125. package/bin/skills-assets/xlsx/references/create.md +0 -691
  126. package/bin/skills-assets/xlsx/references/edit.md +0 -684
  127. package/bin/skills-assets/xlsx/references/fix.md +0 -37
  128. package/bin/skills-assets/xlsx/references/format.md +0 -768
  129. package/bin/skills-assets/xlsx/references/ooxml-cheatsheet.md +0 -231
  130. package/bin/skills-assets/xlsx/references/read-analyze.md +0 -97
  131. package/bin/skills-assets/xlsx/references/validate.md +0 -772
  132. package/bin/skills-assets/xlsx/scripts/formula_check.py +0 -422
  133. package/bin/skills-assets/xlsx/scripts/libreoffice_recalc.py +0 -248
  134. package/bin/skills-assets/xlsx/scripts/shared_strings_builder.py +0 -163
  135. package/bin/skills-assets/xlsx/scripts/style_audit.py +0 -575
  136. package/bin/skills-assets/xlsx/scripts/xlsx_add_column.py +0 -395
  137. package/bin/skills-assets/xlsx/scripts/xlsx_insert_row.py +0 -274
  138. package/bin/skills-assets/xlsx/scripts/xlsx_pack.py +0 -87
  139. package/bin/skills-assets/xlsx/scripts/xlsx_reader.py +0 -362
  140. package/bin/skills-assets/xlsx/scripts/xlsx_shift_rows.py +0 -396
  141. package/bin/skills-assets/xlsx/scripts/xlsx_unpack.py +0 -130
  142. package/bin/skills-assets/xlsx/templates/minimal_xlsx/[Content_Types].xml +0 -9
  143. package/bin/skills-assets/xlsx/templates/minimal_xlsx/_rels/.rels +0 -6
  144. package/bin/skills-assets/xlsx/templates/minimal_xlsx/xl/_rels/workbook.xml.rels +0 -19
  145. package/bin/skills-assets/xlsx/templates/minimal_xlsx/xl/sharedStrings.xml +0 -33
  146. package/bin/skills-assets/xlsx/templates/minimal_xlsx/xl/styles.xml +0 -160
  147. package/bin/skills-assets/xlsx/templates/minimal_xlsx/xl/workbook.xml +0 -30
  148. package/bin/skills-assets/xlsx/templates/minimal_xlsx/xl/worksheets/sheet1.xml +0 -70
@@ -1,222 +0,0 @@
1
- # pdf
2
-
3
- A skill for creating and editing visually polished PDFs.
4
- Three routes. One design system. Tokens flow from content analysis through every renderer.
5
-
6
- ## Quick start
7
-
8
- ```bash
9
- bash scripts/make.sh check # verify deps
10
- bash scripts/make.sh fix # auto-install missing deps
11
- bash scripts/make.sh demo # → demo.pdf
12
- ```
13
-
14
- ---
15
-
16
- ## Route A: CREATE — generate a new PDF
17
-
18
- ```bash
19
- bash scripts/make.sh run \
20
- --title "Q3 Strategy Review" \
21
- --type "proposal" \
22
- --author "Strategy Team" \
23
- --date "October 2025" \
24
- --content content.json \
25
- --out report.pdf
26
- ```
27
-
28
- **`--type` options:**
29
-
30
- | Type | Palette | Cover pattern | Google Fonts (cover) |
31
- |---|---|---|---|
32
- | `report` | Deep ink, teal accent | `fullbleed` | Playfair Display / IBM Plex Sans |
33
- | `proposal` | Near-black, amber accent | `split` | Syne / Nunito Sans |
34
- | `resume` | White, navy accent | `typographic` | DM Serif Display / DM Sans |
35
- | `portfolio` | Deep violet, coral accent | `atmospheric` | Fraunces / Inter |
36
- | `academic` | Warm white, navy accent | `typographic` | EB Garamond / Source Sans 3 |
37
- | `general` | Dark slate, blue accent | `fullbleed` | Outfit / Outfit |
38
- | `minimal` | Near-white, red accent | `minimal` | Cormorant Garamond / Jost |
39
- | `stripe` | Dark navy, amber accent | `stripe` | Barlow Condensed / Barlow |
40
- | `diagonal` | Dark blue, teal accent | `diagonal` | Montserrat / Montserrat |
41
- | `frame` | Warm cream, brown accent | `frame` | Cormorant / Crimson Pro |
42
- | `editorial` | White, red accent | `editorial` | Bebas Neue / Libre Franklin |
43
- | `magazine` | Warm linen, deep navy accent | `magazine` | Playfair Display / EB Garamond |
44
- | `darkroom` | Deep navy, steel blue accent | `darkroom` | Playfair Display / EB Garamond |
45
- | `terminal` | Near-black, neon green accent | `terminal` | Space Mono |
46
- | `poster` | White, near-black accent | `poster` | Barlow Condensed / Courier Prime |
47
-
48
- **content.json block types:**
49
-
50
- ```json
51
- [
52
- {"type": "h1", "text": "Section Title"},
53
- {"type": "h2", "text": "Subsection"},
54
- {"type": "h3", "text": "Sub-subsection"},
55
- {"type": "body", "text": "Paragraph. Supports <b>bold</b> and <i>italic</i>."},
56
- {"type": "bullet", "text": "Unordered list item"},
57
- {"type": "numbered","text": "Ordered list item — counter auto-resets between lists"},
58
- {"type": "callout", "text": "Key insight or highlighted finding"},
59
- {"type": "table",
60
- "headers": ["Col A", "Col B"],
61
- "rows": [["a", "b"], ["c", "d"]]
62
- },
63
- {"type": "image", "path": "chart.png", "caption": "Figure 1: optional caption"},
64
- {"type": "code", "text": "def hello():\n print('world')"},
65
- {"type": "math", "text": "\\int_0^\\infty e^{-x^2} dx = \\frac{\\sqrt{\\pi}}{2}", "label": "(1)"},
66
- {"type": "divider"},
67
- {"type": "caption", "text": "Table 1: standalone caption label"},
68
- {"type": "pagebreak"},
69
- {"type": "spacer", "pt": 16}
70
- ]
71
- ```
72
-
73
- ---
74
-
75
- ## Route B: FILL — fill form fields in an existing PDF
76
-
77
- ```bash
78
- # See what fields the PDF has
79
- bash scripts/make.sh fill --input form.pdf --inspect
80
-
81
- # Fill fields
82
- bash scripts/make.sh fill \
83
- --input form.pdf \
84
- --out filled.pdf \
85
- --values '{"FirstName": "Jane", "Agree": "true", "Country": "US"}'
86
-
87
- # Or from a JSON file
88
- bash scripts/make.sh fill --input form.pdf --out filled.pdf --data values.json
89
- ```
90
-
91
- Field value rules:
92
- - `text` → any string
93
- - `checkbox` → `"true"` or `"false"`
94
- - `dropdown` → must match a choice value shown by `--inspect`
95
- - `radio` → must match a radio value shown by `--inspect`
96
-
97
- ---
98
-
99
- ## Route C: REFORMAT — apply design to an existing document
100
-
101
- ```bash
102
- bash scripts/make.sh reformat \
103
- --input source.md \
104
- --title "Annual Report" \
105
- --type "report" \
106
- --author "Research Team" \
107
- --out output.pdf
108
- ```
109
-
110
- Supported input: `.md` `.txt` `.pdf` `.json`
111
-
112
- ---
113
-
114
- ## Architecture
115
-
116
- ```
117
- SKILL.md ← Skill entry point, route table
118
- design/design.md ← Aesthetic system (read before CREATE/REFORMAT)
119
- scripts/
120
- make.sh ← Unified CLI
121
- palette.py ← metadata → tokens.json [CREATE, REFORMAT]
122
- cover.py ← tokens.json → cover.html [CREATE, REFORMAT]
123
- render_cover.js ← cover.html → cover.pdf [CREATE, REFORMAT]
124
- render_body.py ← tokens + content → body.pdf [CREATE, REFORMAT]
125
- merge.py ← cover + body → final.pdf [CREATE, REFORMAT]
126
- fill_inspect.py ← PDF → field list [FILL]
127
- fill_write.py ← PDF + values → filled PDF [FILL]
128
- reformat_parse.py ← doc → content.json [REFORMAT]
129
- ```
130
-
131
- Design tokens (`tokens.json`) flow from `palette.py` to every renderer — cover and body are always visually consistent.
132
-
133
- ## Dependencies
134
-
135
- | Tool | Used by | Install |
136
- |---|---|---|
137
- | Python 3.9+ | all `.py` scripts | system |
138
- | `reportlab` | `render_body.py` | `pip install reportlab` |
139
- | `pypdf` | fill, merge, reformat | `pip install pypdf` |
140
- | Node.js 18+ | `render_cover.js` | system |
141
- | `playwright` + Chromium | `render_cover.js` | `npm install -g playwright && npx playwright install chromium` |
142
-
143
- ## License
144
-
145
- MIT
146
-
147
- ## Document types
148
-
149
- | `--type` | Mood | Cover pattern | Cover fonts |
150
- |---|---|---|---|
151
- | `report` | Authoritative | `fullbleed` | Playfair Display / IBM Plex Sans |
152
- | `proposal` | Confident | `split` | Syne / Nunito Sans |
153
- | `resume` | Clean | `typographic` | DM Serif Display / DM Sans |
154
- | `portfolio` | Expressive | `atmospheric` | Fraunces / Inter |
155
- | `academic` | Scholarly | `typographic` | EB Garamond / Source Sans 3 |
156
- | `general` | Neutral | `fullbleed` | Outfit |
157
- | `minimal` | Restrained | `minimal` | Cormorant Garamond / Jost |
158
- | `stripe` | Bold | `stripe` | Barlow Condensed / Barlow |
159
- | `diagonal` | Dynamic | `diagonal` | Montserrat |
160
- | `frame` | Classical | `frame` | Cormorant / Crimson Pro |
161
- | `editorial` | Editorial | `editorial` | Bebas Neue / Libre Franklin |
162
-
163
- Cover fonts load via Google Fonts `@import` at render time — no local caching.
164
- Body pages always use system fonts (Times / Helvetica) via ReportLab.
165
-
166
- ## content.json schema
167
-
168
- ```json
169
- [
170
- {"type": "h1", "text": "Section Title"},
171
- {"type": "h2", "text": "Subsection"},
172
- {"type": "h3", "text": "Sub-subsection"},
173
- {"type": "body", "text": "Paragraph text. Supports <b>bold</b> and <i>italic</i>."},
174
- {"type": "bullet", "text": "Unordered list item"},
175
- {"type": "numbered","text": "Ordered list item — auto-numbered, counter resets between lists"},
176
- {"type": "callout", "text": "Highlighted insight or key finding"},
177
- {"type": "table",
178
- "headers": ["Column A", "Column B", "Column C"],
179
- "rows": [["row1a", "row1b", "row1c"], ["row2a", "row2b", "row2c"]]
180
- },
181
- {"type": "image", "path": "chart.png", "caption": "Figure 1: Sales by quarter"},
182
- {"type": "code", "text": "SELECT * FROM users\nWHERE active = 1;"},
183
- {"type": "math", "text": "\\sigma = \\sqrt{\\frac{1}{N}\\sum_{i=1}^N (x_i - \\mu)^2}", "label": "(2)"},
184
- {"type": "divider"},
185
- {"type": "caption", "text": "Table 2: standalone label"},
186
- {"type": "pagebreak"},
187
- {"type": "spacer", "pt": 16}
188
- ]
189
- ```
190
-
191
- ## Architecture
192
-
193
- ```
194
- SKILL.md ← Skill entry point, routing only
195
- design/design.md ← Aesthetic system (read before any script)
196
- scripts/
197
- make.sh ← Unified CLI: check / fix / run / demo
198
- palette.py ← content metadata → tokens.json
199
- cover.py ← tokens.json → cover.html
200
- render_cover.js ← cover.html → cover.pdf (Playwright)
201
- render_body.py ← tokens.json + content.json → body.pdf (ReportLab)
202
- merge.py ← cover.pdf + body.pdf → final.pdf + QA report
203
- ```
204
-
205
- Design tokens (color, typography, spacing) are written once by `palette.py` and consumed by every downstream script. This guarantees visual consistency between cover and body without any manual coordination.
206
-
207
- ## Dependencies
208
-
209
- | Tool | Purpose | Install |
210
- |---|---|---|
211
- | Python 3.9+ | palette, cover, render_body, merge | system |
212
- | `reportlab` | Body page rendering | `pip install reportlab` |
213
- | `pypdf` | Merging PDFs | `pip install pypdf` |
214
- | Node.js 18+ | Cover rendering | system |
215
- | `playwright` | Headless Chromium for cover | `npm install -g playwright && npx playwright install chromium` |
216
-
217
- Run `bash scripts/make.sh check` to verify everything at once.
218
- Run `bash scripts/make.sh fix` to auto-install what is missing.
219
-
220
- ## License
221
-
222
- MIT
@@ -1,191 +0,0 @@
1
- ---
2
- name: pdf
3
- description: >
4
- Use this skill when visual quality and design identity matter for a PDF.
5
- CREATE (generate from scratch): "make a PDF", "generate a report", "write a proposal",
6
- "create a resume", "beautiful PDF", "professional document", "cover page",
7
- "polished PDF", "client-ready document".
8
- FILL (complete form fields): "fill in the form", "fill out this PDF",
9
- "complete the form fields", "write values into PDF", "what fields does this PDF have".
10
- REFORMAT (apply design to an existing doc): "reformat this document", "apply our style",
11
- "convert this Markdown/text to PDF", "make this doc look good", "re-style this PDF".
12
- This skill uses a token-based design system: color, typography, and spacing are derived
13
- from the document type and flow through every page. The output is print-ready.
14
- Prefer this skill when appearance matters, not just when any PDF output is needed.
15
- metadata:
16
- version: "1.0"
17
- category: document-generation
18
- ---
19
-
20
- # pdf
21
-
22
- Three tasks. One skill.
23
-
24
- ## Read `design/design.md` before any CREATE or REFORMAT work.
25
-
26
- ---
27
-
28
- ## Route table
29
-
30
- | User intent | Route | Scripts used |
31
- |---|---|---|
32
- | Generate a new PDF from scratch | **CREATE** | `palette.py` → `cover.py` → `render_cover.js` → `render_body.py` → `merge.py` |
33
- | Fill / complete form fields in an existing PDF | **FILL** | `fill_inspect.py` → `fill_write.py` |
34
- | Reformat / re-style an existing document | **REFORMAT** | `reformat_parse.py` → then full CREATE pipeline |
35
-
36
- **Rule:** when in doubt between CREATE and REFORMAT, ask whether the user has an existing document to start from. If yes → REFORMAT. If no → CREATE.
37
-
38
- ---
39
-
40
- ## Route A: CREATE
41
-
42
- Full pipeline — content → design tokens → cover → body → merged PDF.
43
-
44
- ```bash
45
- bash scripts/make.sh run \
46
- --title "Q3 Strategy Review" --type proposal \
47
- --author "Strategy Team" --date "October 2025" \
48
- --accent "#2D5F8A" \
49
- --content content.json --out report.pdf
50
- ```
51
-
52
- **Doc types:** `report` · `proposal` · `resume` · `portfolio` · `academic` · `general` · `minimal` · `stripe` · `diagonal` · `frame` · `editorial` · `magazine` · `darkroom` · `terminal` · `poster`
53
-
54
- | Type | Cover pattern | Visual identity |
55
- |---|---|---|
56
- | `report` | `fullbleed` | Dark bg, dot grid, Playfair Display |
57
- | `proposal` | `split` | Left panel + right geometric, Syne |
58
- | `resume` | `typographic` | Oversized first-word, DM Serif Display |
59
- | `portfolio` | `atmospheric` | Near-black, radial glow, Fraunces |
60
- | `academic` | `typographic` | Light bg, classical serif, EB Garamond |
61
- | `general` | `fullbleed` | Dark slate, Outfit |
62
- | `minimal` | `minimal` | White + single 8px accent bar, Cormorant Garamond |
63
- | `stripe` | `stripe` | 3 bold horizontal color bands, Barlow Condensed |
64
- | `diagonal` | `diagonal` | SVG angled cut, dark/light halves, Montserrat |
65
- | `frame` | `frame` | Inset border, corner ornaments, Cormorant |
66
- | `editorial` | `editorial` | Ghost letter, all-caps title, Bebas Neue |
67
- | `magazine` | `magazine` | Warm cream bg, centered stack, hero image, Playfair Display |
68
- | `darkroom` | `darkroom` | Navy bg, centered stack, grayscale image, Playfair Display |
69
- | `terminal` | `terminal` | Near-black, grid lines, monospace, neon green |
70
- | `poster` | `poster` | White bg, thick sidebar, oversized title, Barlow Condensed |
71
-
72
- Cover extras (inject into tokens via `--abstract`, `--cover-image`):
73
- - `--abstract "text"` — abstract text block on the cover (magazine/darkroom)
74
- - `--cover-image "url"` — hero image URL/path (magazine, darkroom, poster)
75
-
76
- **Color overrides — always choose these based on document content:**
77
- - `--accent "#HEX"` — override the accent color; `accent_lt` is auto-derived by lightening toward white
78
- - `--cover-bg "#HEX"` — override the cover background color
79
-
80
- **Accent color selection guidance:**
81
-
82
- You have creative authority over the accent color. Pick it from the document's semantic context — title, industry, purpose, audience — not from generic "safe" choices. The accent appears on section rules, callout bars, table headers, and the cover: it carries the document's visual identity.
83
-
84
- | Context | Suggested accent range |
85
- |---|---|
86
- | Legal / compliance / finance | Deep navy `#1C3A5E`, charcoal `#2E3440`, slate `#3D4C5E` |
87
- | Healthcare / medical | Teal-green `#2A6B5A`, cool green `#3A7D6A` |
88
- | Technology / engineering | Steel blue `#2D5F8A`, indigo `#3D4F8A` |
89
- | Environmental / sustainability | Forest `#2E5E3A`, olive `#4A5E2A` |
90
- | Creative / arts / culture | Burgundy `#6B2A35`, plum `#5A2A6B`, terracotta `#8A3A2A` |
91
- | Academic / research | Deep teal `#2A5A6B`, library blue `#2A4A6B` |
92
- | Corporate / neutral | Slate `#3D4A5A`, graphite `#444C56` |
93
- | Luxury / premium | Warm black `#1A1208`, deep bronze `#4A3820` |
94
-
95
- **Rule:** choose a color that a thoughtful designer would select for this specific document — not the type's default. Muted, desaturated tones work best; avoid vivid primaries. When in doubt, go darker and more neutral.
96
-
97
- **content.json block types:**
98
-
99
- | Block | Usage | Key fields |
100
- |---|---|---|
101
- | `h1` | Section heading + accent rule | `text` |
102
- | `h2` | Subsection heading | `text` |
103
- | `h3` | Sub-subsection (bold) | `text` |
104
- | `body` | Justified paragraph; supports `<b>` `<i>` markup | `text` |
105
- | `bullet` | Unordered list item (• prefix) | `text` |
106
- | `numbered` | Ordered list item — counter auto-resets on non-numbered blocks | `text` |
107
- | `callout` | Highlighted insight box with accent left bar | `text` |
108
- | `table` | Data table — accent header, alternating row tints | `headers`, `rows`, `col_widths`?, `caption`? |
109
- | `image` | Embedded image scaled to column width | `path`/`src`, `caption`? |
110
- | `figure` | Image with auto-numbered "Figure N:" caption | `path`/`src`, `caption`? |
111
- | `code` | Monospace code block with accent left border | `text`, `language`? |
112
- | `math` | Display math — LaTeX syntax via matplotlib mathtext | `text`, `label`?, `caption`? |
113
- | `chart` | Bar / line / pie chart rendered with matplotlib | `chart_type`, `labels`, `datasets`, `title`?, `x_label`?, `y_label`?, `caption`?, `figure`? |
114
- | `flowchart` | Process diagram with nodes + edges via matplotlib | `nodes`, `edges`, `caption`?, `figure`? |
115
- | `bibliography` | Numbered reference list with hanging indent | `items` [{id, text}], `title`? |
116
- | `divider` | Accent-colored full-width rule | — |
117
- | `caption` | Small muted label | `text` |
118
- | `pagebreak` | Force a new page | — |
119
- | `spacer` | Vertical whitespace | `pt` (default 12) |
120
-
121
- **chart / flowchart schemas:**
122
- ```json
123
- {"type":"chart","chart_type":"bar","labels":["Q1","Q2","Q3","Q4"],
124
- "datasets":[{"label":"Revenue","values":[120,145,132,178]}],"caption":"Q results"}
125
-
126
- {"type":"flowchart",
127
- "nodes":[{"id":"s","label":"Start","shape":"oval"},
128
- {"id":"p","label":"Process","shape":"rect"},
129
- {"id":"d","label":"Valid?","shape":"diamond"},
130
- {"id":"e","label":"End","shape":"oval"}],
131
- "edges":[{"from":"s","to":"p"},{"from":"p","to":"d"},
132
- {"from":"d","to":"e","label":"Yes"},{"from":"d","to":"p","label":"No"}]}
133
-
134
- {"type":"bibliography","items":[
135
- {"id":"1","text":"Author (Year). Title. Publisher."}]}
136
- ```
137
-
138
- ---
139
-
140
- ## Route B: FILL
141
-
142
- Fill form fields in an existing PDF without altering layout or design.
143
-
144
- ```bash
145
- # Step 1: inspect
146
- python3 scripts/fill_inspect.py --input form.pdf
147
-
148
- # Step 2: fill
149
- python3 scripts/fill_write.py --input form.pdf --out filled.pdf \
150
- --values '{"FirstName": "Jane", "Agree": "true", "Country": "US"}'
151
- ```
152
-
153
- | Field type | Value format |
154
- |---|---|
155
- | `text` | Any string |
156
- | `checkbox` | `"true"` or `"false"` |
157
- | `dropdown` | Must match a choice value from inspect output |
158
- | `radio` | Must match a radio value (often starts with `/`) |
159
-
160
- Always run `fill_inspect.py` first to get exact field names.
161
-
162
- ---
163
-
164
- ## Route C: REFORMAT
165
-
166
- Parse an existing document → content.json → CREATE pipeline.
167
-
168
- ```bash
169
- bash scripts/make.sh reformat \
170
- --input source.md --title "My Report" --type report --out output.pdf
171
- ```
172
-
173
- **Supported input formats:** `.md` `.txt` `.pdf` `.json`
174
-
175
- ---
176
-
177
- ## Environment
178
-
179
- ```bash
180
- bash scripts/make.sh check # verify all deps
181
- bash scripts/make.sh fix # auto-install missing deps
182
- bash scripts/make.sh demo # build a sample PDF
183
- ```
184
-
185
- | Tool | Used by | Install |
186
- |---|---|---|
187
- | Python 3.9+ | all `.py` scripts | system |
188
- | `reportlab` | `render_body.py` | `pip install reportlab` |
189
- | `pypdf` | fill, merge, reformat | `pip install pypdf` |
190
- | Node.js 18+ | `render_cover.js` | system |
191
- | `playwright` + Chromium | `render_cover.js` | `npm install -g playwright && npx playwright install chromium` |