@dtt_siye/atool 1.1.0

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 (463) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +235 -0
  3. package/VERSION +1 -0
  4. package/agents/code-reviewer.md +29 -0
  5. package/bin/atool.js +235 -0
  6. package/bin/postinstall.js +23 -0
  7. package/hooks/doc-sync-reminder +155 -0
  8. package/hooks/hooks-cursor.json +37 -0
  9. package/hooks/hooks.json +37 -0
  10. package/hooks/prompt-guard +135 -0
  11. package/hooks/session-start +286 -0
  12. package/install.sh +603 -0
  13. package/lib/analyze-source.sh +1265 -0
  14. package/lib/common.sh +1041 -0
  15. package/lib/compute-importance.sh +598 -0
  16. package/lib/detect-stack.sh +354 -0
  17. package/lib/generate-visualization.sh +266 -0
  18. package/lib/install-claude.sh +43 -0
  19. package/lib/install-cursor.sh +281 -0
  20. package/lib/install-hooks.sh +285 -0
  21. package/lib/install-kiro.sh +543 -0
  22. package/lib/install-mcp.sh +99 -0
  23. package/lib/install-skills.sh +129 -0
  24. package/lib/knowledge-graph.sh +1014 -0
  25. package/lib/multi-dimensional-analysis.sh +413 -0
  26. package/lib/pre-scan.sh +1045 -0
  27. package/lib/project-init.sh +552 -0
  28. package/lib/visualization-template.html +545 -0
  29. package/mcp/recommended.json +24 -0
  30. package/package.json +39 -0
  31. package/skills/_superpowers/.claude-plugin/marketplace.json +20 -0
  32. package/skills/_superpowers/.claude-plugin/plugin.json +20 -0
  33. package/skills/_superpowers/.codex/INSTALL.md +67 -0
  34. package/skills/_superpowers/.cursor-plugin/plugin.json +25 -0
  35. package/skills/_superpowers/.gitattributes +18 -0
  36. package/skills/_superpowers/.github/FUNDING.yml +3 -0
  37. package/skills/_superpowers/.github/ISSUE_TEMPLATE/bug_report.md +52 -0
  38. package/skills/_superpowers/.github/ISSUE_TEMPLATE/config.yml +5 -0
  39. package/skills/_superpowers/.github/ISSUE_TEMPLATE/feature_request.md +34 -0
  40. package/skills/_superpowers/.github/ISSUE_TEMPLATE/platform_support.md +23 -0
  41. package/skills/_superpowers/.github/PULL_REQUEST_TEMPLATE.md +87 -0
  42. package/skills/_superpowers/.opencode/INSTALL.md +83 -0
  43. package/skills/_superpowers/.opencode/plugins/superpowers.js +107 -0
  44. package/skills/_superpowers/CHANGELOG.md +13 -0
  45. package/skills/_superpowers/CODE_OF_CONDUCT.md +128 -0
  46. package/skills/_superpowers/GEMINI.md +2 -0
  47. package/skills/_superpowers/LICENSE +21 -0
  48. package/skills/_superpowers/README.md +187 -0
  49. package/skills/_superpowers/RELEASE-NOTES.md +1083 -0
  50. package/skills/_superpowers/agents/code-reviewer.md +48 -0
  51. package/skills/_superpowers/commands/brainstorm.md +5 -0
  52. package/skills/_superpowers/commands/execute-plan.md +5 -0
  53. package/skills/_superpowers/commands/write-plan.md +5 -0
  54. package/skills/_superpowers/docs/README.codex.md +126 -0
  55. package/skills/_superpowers/docs/README.opencode.md +130 -0
  56. package/skills/_superpowers/docs/plans/2025-11-22-opencode-support-design.md +294 -0
  57. package/skills/_superpowers/docs/plans/2025-11-22-opencode-support-implementation.md +1095 -0
  58. package/skills/_superpowers/docs/plans/2025-11-28-skills-improvements-from-user-feedback.md +711 -0
  59. package/skills/_superpowers/docs/plans/2026-01-17-visual-brainstorming.md +571 -0
  60. package/skills/_superpowers/docs/superpowers/plans/2026-01-22-document-review-system.md +301 -0
  61. package/skills/_superpowers/docs/superpowers/plans/2026-02-19-visual-brainstorming-refactor.md +523 -0
  62. package/skills/_superpowers/docs/superpowers/plans/2026-03-11-zero-dep-brainstorm-server.md +479 -0
  63. package/skills/_superpowers/docs/superpowers/plans/2026-03-23-codex-app-compatibility.md +564 -0
  64. package/skills/_superpowers/docs/superpowers/specs/2026-01-22-document-review-system-design.md +136 -0
  65. package/skills/_superpowers/docs/superpowers/specs/2026-02-19-visual-brainstorming-refactor-design.md +162 -0
  66. package/skills/_superpowers/docs/superpowers/specs/2026-03-11-zero-dep-brainstorm-server-design.md +118 -0
  67. package/skills/_superpowers/docs/superpowers/specs/2026-03-23-codex-app-compatibility-design.md +244 -0
  68. package/skills/_superpowers/docs/testing.md +303 -0
  69. package/skills/_superpowers/docs/windows/polyglot-hooks.md +212 -0
  70. package/skills/_superpowers/gemini-extension.json +6 -0
  71. package/skills/_superpowers/hooks/hooks-cursor.json +10 -0
  72. package/skills/_superpowers/hooks/hooks.json +16 -0
  73. package/skills/_superpowers/hooks/run-hook.cmd +46 -0
  74. package/skills/_superpowers/hooks/session-start +57 -0
  75. package/skills/_superpowers/package.json +6 -0
  76. package/skills/_superpowers/skills/brainstorming/SKILL.md +164 -0
  77. package/skills/_superpowers/skills/brainstorming/scripts/frame-template.html +214 -0
  78. package/skills/_superpowers/skills/brainstorming/scripts/helper.js +88 -0
  79. package/skills/_superpowers/skills/brainstorming/scripts/server.cjs +354 -0
  80. package/skills/_superpowers/skills/brainstorming/scripts/start-server.sh +148 -0
  81. package/skills/_superpowers/skills/brainstorming/scripts/stop-server.sh +56 -0
  82. package/skills/_superpowers/skills/brainstorming/spec-document-reviewer-prompt.md +49 -0
  83. package/skills/_superpowers/skills/brainstorming/visual-companion.md +287 -0
  84. package/skills/_superpowers/skills/dispatching-parallel-agents/SKILL.md +182 -0
  85. package/skills/_superpowers/skills/executing-plans/SKILL.md +70 -0
  86. package/skills/_superpowers/skills/finishing-a-development-branch/SKILL.md +200 -0
  87. package/skills/_superpowers/skills/receiving-code-review/SKILL.md +213 -0
  88. package/skills/_superpowers/skills/requesting-code-review/SKILL.md +105 -0
  89. package/skills/_superpowers/skills/requesting-code-review/code-reviewer.md +146 -0
  90. package/skills/_superpowers/skills/subagent-driven-development/SKILL.md +277 -0
  91. package/skills/_superpowers/skills/subagent-driven-development/code-quality-reviewer-prompt.md +26 -0
  92. package/skills/_superpowers/skills/subagent-driven-development/implementer-prompt.md +113 -0
  93. package/skills/_superpowers/skills/subagent-driven-development/spec-reviewer-prompt.md +61 -0
  94. package/skills/_superpowers/skills/systematic-debugging/CREATION-LOG.md +119 -0
  95. package/skills/_superpowers/skills/systematic-debugging/SKILL.md +296 -0
  96. package/skills/_superpowers/skills/systematic-debugging/condition-based-waiting-example.ts +158 -0
  97. package/skills/_superpowers/skills/systematic-debugging/condition-based-waiting.md +115 -0
  98. package/skills/_superpowers/skills/systematic-debugging/defense-in-depth.md +122 -0
  99. package/skills/_superpowers/skills/systematic-debugging/find-polluter.sh +63 -0
  100. package/skills/_superpowers/skills/systematic-debugging/root-cause-tracing.md +169 -0
  101. package/skills/_superpowers/skills/systematic-debugging/test-academic.md +14 -0
  102. package/skills/_superpowers/skills/systematic-debugging/test-pressure-1.md +58 -0
  103. package/skills/_superpowers/skills/systematic-debugging/test-pressure-2.md +68 -0
  104. package/skills/_superpowers/skills/systematic-debugging/test-pressure-3.md +69 -0
  105. package/skills/_superpowers/skills/test-driven-development/SKILL.md +371 -0
  106. package/skills/_superpowers/skills/test-driven-development/testing-anti-patterns.md +299 -0
  107. package/skills/_superpowers/skills/using-git-worktrees/SKILL.md +218 -0
  108. package/skills/_superpowers/skills/using-superpowers/SKILL.md +115 -0
  109. package/skills/_superpowers/skills/using-superpowers/references/codex-tools.md +100 -0
  110. package/skills/_superpowers/skills/using-superpowers/references/gemini-tools.md +33 -0
  111. package/skills/_superpowers/skills/verification-before-completion/SKILL.md +139 -0
  112. package/skills/_superpowers/skills/writing-plans/SKILL.md +152 -0
  113. package/skills/_superpowers/skills/writing-plans/plan-document-reviewer-prompt.md +49 -0
  114. package/skills/_superpowers/skills/writing-skills/SKILL.md +655 -0
  115. package/skills/_superpowers/skills/writing-skills/anthropic-best-practices.md +1150 -0
  116. package/skills/_superpowers/skills/writing-skills/examples/CLAUDE_MD_TESTING.md +189 -0
  117. package/skills/_superpowers/skills/writing-skills/graphviz-conventions.dot +172 -0
  118. package/skills/_superpowers/skills/writing-skills/persuasion-principles.md +187 -0
  119. package/skills/_superpowers/skills/writing-skills/render-graphs.js +168 -0
  120. package/skills/_superpowers/skills/writing-skills/testing-skills-with-subagents.md +384 -0
  121. package/skills/_superpowers/tests/brainstorm-server/package-lock.json +36 -0
  122. package/skills/_superpowers/tests/brainstorm-server/package.json +10 -0
  123. package/skills/_superpowers/tests/brainstorm-server/server.test.js +427 -0
  124. package/skills/_superpowers/tests/brainstorm-server/windows-lifecycle.test.sh +351 -0
  125. package/skills/_superpowers/tests/brainstorm-server/ws-protocol.test.js +392 -0
  126. package/skills/_superpowers/tests/claude-code/README.md +158 -0
  127. package/skills/_superpowers/tests/claude-code/analyze-token-usage.py +168 -0
  128. package/skills/_superpowers/tests/claude-code/run-skill-tests.sh +187 -0
  129. package/skills/_superpowers/tests/claude-code/test-document-review-system.sh +177 -0
  130. package/skills/_superpowers/tests/claude-code/test-helpers.sh +202 -0
  131. package/skills/_superpowers/tests/claude-code/test-subagent-driven-development-integration.sh +314 -0
  132. package/skills/_superpowers/tests/claude-code/test-subagent-driven-development.sh +165 -0
  133. package/skills/_superpowers/tests/explicit-skill-requests/prompts/action-oriented.txt +3 -0
  134. package/skills/_superpowers/tests/explicit-skill-requests/prompts/after-planning-flow.txt +17 -0
  135. package/skills/_superpowers/tests/explicit-skill-requests/prompts/claude-suggested-it.txt +11 -0
  136. package/skills/_superpowers/tests/explicit-skill-requests/prompts/i-know-what-sdd-means.txt +8 -0
  137. package/skills/_superpowers/tests/explicit-skill-requests/prompts/mid-conversation-execute-plan.txt +3 -0
  138. package/skills/_superpowers/tests/explicit-skill-requests/prompts/please-use-brainstorming.txt +1 -0
  139. package/skills/_superpowers/tests/explicit-skill-requests/prompts/skip-formalities.txt +3 -0
  140. package/skills/_superpowers/tests/explicit-skill-requests/prompts/subagent-driven-development-please.txt +1 -0
  141. package/skills/_superpowers/tests/explicit-skill-requests/prompts/use-systematic-debugging.txt +1 -0
  142. package/skills/_superpowers/tests/explicit-skill-requests/run-all.sh +70 -0
  143. package/skills/_superpowers/tests/explicit-skill-requests/run-claude-describes-sdd.sh +100 -0
  144. package/skills/_superpowers/tests/explicit-skill-requests/run-extended-multiturn-test.sh +113 -0
  145. package/skills/_superpowers/tests/explicit-skill-requests/run-haiku-test.sh +144 -0
  146. package/skills/_superpowers/tests/explicit-skill-requests/run-multiturn-test.sh +143 -0
  147. package/skills/_superpowers/tests/explicit-skill-requests/run-test.sh +136 -0
  148. package/skills/_superpowers/tests/opencode/run-tests.sh +163 -0
  149. package/skills/_superpowers/tests/opencode/setup.sh +73 -0
  150. package/skills/_superpowers/tests/opencode/test-plugin-loading.sh +72 -0
  151. package/skills/_superpowers/tests/opencode/test-priority.sh +198 -0
  152. package/skills/_superpowers/tests/opencode/test-tools.sh +104 -0
  153. package/skills/_superpowers/tests/skill-triggering/prompts/dispatching-parallel-agents.txt +8 -0
  154. package/skills/_superpowers/tests/skill-triggering/prompts/executing-plans.txt +1 -0
  155. package/skills/_superpowers/tests/skill-triggering/prompts/requesting-code-review.txt +3 -0
  156. package/skills/_superpowers/tests/skill-triggering/prompts/systematic-debugging.txt +11 -0
  157. package/skills/_superpowers/tests/skill-triggering/prompts/test-driven-development.txt +7 -0
  158. package/skills/_superpowers/tests/skill-triggering/prompts/writing-plans.txt +10 -0
  159. package/skills/_superpowers/tests/skill-triggering/run-all.sh +60 -0
  160. package/skills/_superpowers/tests/skill-triggering/run-test.sh +88 -0
  161. package/skills/_superpowers/tests/subagent-driven-dev/go-fractals/design.md +81 -0
  162. package/skills/_superpowers/tests/subagent-driven-dev/go-fractals/plan.md +172 -0
  163. package/skills/_superpowers/tests/subagent-driven-dev/go-fractals/scaffold.sh +45 -0
  164. package/skills/_superpowers/tests/subagent-driven-dev/run-test.sh +106 -0
  165. package/skills/_superpowers/tests/subagent-driven-dev/svelte-todo/design.md +70 -0
  166. package/skills/_superpowers/tests/subagent-driven-dev/svelte-todo/plan.md +222 -0
  167. package/skills/_superpowers/tests/subagent-driven-dev/svelte-todo/scaffold.sh +46 -0
  168. package/skills/ai-project-architecture/SKILL.md +632 -0
  169. package/skills/ai-project-architecture/reference/structure-rules.md +406 -0
  170. package/skills/ai-project-architecture/templates/compliance-report.md +300 -0
  171. package/skills/ai-project-architecture/templates/migration-plan.md +433 -0
  172. package/skills/ai-project-architecture/templates/verification-checklist.md +408 -0
  173. package/skills/android-conventions/SKILL.md +125 -0
  174. package/skills/atool-init/SKILL.md +141 -0
  175. package/skills/clarify-before-build/SKILL.md +107 -0
  176. package/skills/code-review/SKILL.md +406 -0
  177. package/skills/code-review/rules/architecture.md +285 -0
  178. package/skills/code-review/rules/coupling-cohesion.md +309 -0
  179. package/skills/code-review/rules/dead-code.md +115 -0
  180. package/skills/code-review/rules/deprecation-debt.md +279 -0
  181. package/skills/code-review/rules/duplication.md +104 -0
  182. package/skills/code-review/rules/error-security.md +143 -0
  183. package/skills/code-review/rules/maintainability.md +203 -0
  184. package/skills/code-review/rules/quality.md +158 -0
  185. package/skills/devops-conventions/SKILL.md +205 -0
  186. package/skills/doc-coauthoring/SKILL.md +392 -0
  187. package/skills/doc-standards-enforcer/SKILL.md +290 -0
  188. package/skills/doc-standards-enforcer/examples/valid-document-example.md +67 -0
  189. package/skills/doc-standards-enforcer/references/101-standards-summary.md +318 -0
  190. package/skills/doc-standards-enforcer/scripts/check_references.py +175 -0
  191. package/skills/doc-standards-enforcer/scripts/fix_common_issues.py +303 -0
  192. package/skills/doc-standards-enforcer/scripts/validate_doc_standards.py +332 -0
  193. package/skills/docx/LICENSE.txt +30 -0
  194. package/skills/docx/SKILL.md +200 -0
  195. package/skills/docx/docx-js.md +350 -0
  196. package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
  197. package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
  198. package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
  199. package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
  200. package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
  201. package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
  202. package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
  203. package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
  204. package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
  205. package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
  206. package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
  207. package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
  208. package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
  209. package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
  210. package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
  211. package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
  212. package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
  213. package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
  214. package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
  215. package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
  216. package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
  217. package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
  218. package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
  219. package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
  220. package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
  221. package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
  222. package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
  223. package/skills/docx/ooxml/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
  224. package/skills/docx/ooxml/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
  225. package/skills/docx/ooxml/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
  226. package/skills/docx/ooxml/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
  227. package/skills/docx/ooxml/schemas/mce/mc.xsd +75 -0
  228. package/skills/docx/ooxml/schemas/microsoft/wml-2010.xsd +560 -0
  229. package/skills/docx/ooxml/schemas/microsoft/wml-2012.xsd +67 -0
  230. package/skills/docx/ooxml/schemas/microsoft/wml-2018.xsd +14 -0
  231. package/skills/docx/ooxml/schemas/microsoft/wml-cex-2018.xsd +20 -0
  232. package/skills/docx/ooxml/schemas/microsoft/wml-cid-2016.xsd +13 -0
  233. package/skills/docx/ooxml/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
  234. package/skills/docx/ooxml/schemas/microsoft/wml-symex-2015.xsd +8 -0
  235. package/skills/docx/ooxml/scripts/pack.py +159 -0
  236. package/skills/docx/ooxml/scripts/unpack.py +29 -0
  237. package/skills/docx/ooxml/scripts/validate.py +69 -0
  238. package/skills/docx/ooxml/scripts/validation/__init__.py +15 -0
  239. package/skills/docx/ooxml/scripts/validation/base.py +951 -0
  240. package/skills/docx/ooxml/scripts/validation/docx.py +274 -0
  241. package/skills/docx/ooxml/scripts/validation/pptx.py +315 -0
  242. package/skills/docx/ooxml/scripts/validation/redlining.py +279 -0
  243. package/skills/docx/ooxml.md +610 -0
  244. package/skills/docx/scripts/__init__.py +1 -0
  245. package/skills/docx/scripts/document.py +1276 -0
  246. package/skills/docx/scripts/templates/comments.xml +3 -0
  247. package/skills/docx/scripts/templates/commentsExtended.xml +3 -0
  248. package/skills/docx/scripts/templates/commentsExtensible.xml +3 -0
  249. package/skills/docx/scripts/templates/commentsIds.xml +3 -0
  250. package/skills/docx/scripts/templates/people.xml +3 -0
  251. package/skills/docx/scripts/utilities.py +374 -0
  252. package/skills/flutter-conventions/SKILL.md +70 -0
  253. package/skills/go-conventions/SKILL.md +230 -0
  254. package/skills/harmony-conventions/SKILL.md +156 -0
  255. package/skills/java-conventions/SKILL.md +277 -0
  256. package/skills/pdf/LICENSE.txt +30 -0
  257. package/skills/pdf/SKILL.md +297 -0
  258. package/skills/pdf/forms.md +205 -0
  259. package/skills/pdf/reference.md +612 -0
  260. package/skills/pdf/scripts/check_bounding_boxes.py +70 -0
  261. package/skills/pdf/scripts/check_bounding_boxes_test.py +226 -0
  262. package/skills/pdf/scripts/check_fillable_fields.py +12 -0
  263. package/skills/pdf/scripts/convert_pdf_to_images.py +35 -0
  264. package/skills/pdf/scripts/create_validation_image.py +41 -0
  265. package/skills/pdf/scripts/extract_form_field_info.py +152 -0
  266. package/skills/pdf/scripts/fill_fillable_fields.py +114 -0
  267. package/skills/pdf/scripts/fill_pdf_form_with_annotations.py +108 -0
  268. package/skills/pptx/LICENSE.txt +30 -0
  269. package/skills/pptx/SKILL.md +487 -0
  270. package/skills/pptx/html2pptx.md +625 -0
  271. package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
  272. package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
  273. package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
  274. package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
  275. package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
  276. package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
  277. package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
  278. package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
  279. package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
  280. package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
  281. package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
  282. package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
  283. package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
  284. package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
  285. package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
  286. package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
  287. package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
  288. package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
  289. package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
  290. package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
  291. package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
  292. package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
  293. package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
  294. package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
  295. package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
  296. package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
  297. package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
  298. package/skills/pptx/ooxml/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
  299. package/skills/pptx/ooxml/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
  300. package/skills/pptx/ooxml/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
  301. package/skills/pptx/ooxml/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
  302. package/skills/pptx/ooxml/schemas/mce/mc.xsd +75 -0
  303. package/skills/pptx/ooxml/schemas/microsoft/wml-2010.xsd +560 -0
  304. package/skills/pptx/ooxml/schemas/microsoft/wml-2012.xsd +67 -0
  305. package/skills/pptx/ooxml/schemas/microsoft/wml-2018.xsd +14 -0
  306. package/skills/pptx/ooxml/schemas/microsoft/wml-cex-2018.xsd +20 -0
  307. package/skills/pptx/ooxml/schemas/microsoft/wml-cid-2016.xsd +13 -0
  308. package/skills/pptx/ooxml/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
  309. package/skills/pptx/ooxml/schemas/microsoft/wml-symex-2015.xsd +8 -0
  310. package/skills/pptx/ooxml/scripts/pack.py +159 -0
  311. package/skills/pptx/ooxml/scripts/unpack.py +29 -0
  312. package/skills/pptx/ooxml/scripts/validate.py +69 -0
  313. package/skills/pptx/ooxml/scripts/validation/__init__.py +15 -0
  314. package/skills/pptx/ooxml/scripts/validation/base.py +951 -0
  315. package/skills/pptx/ooxml/scripts/validation/docx.py +274 -0
  316. package/skills/pptx/ooxml/scripts/validation/pptx.py +315 -0
  317. package/skills/pptx/ooxml/scripts/validation/redlining.py +279 -0
  318. package/skills/pptx/ooxml.md +427 -0
  319. package/skills/pptx/scripts/html2pptx.js +979 -0
  320. package/skills/pptx/scripts/inventory.py +1020 -0
  321. package/skills/pptx/scripts/rearrange.py +231 -0
  322. package/skills/pptx/scripts/replace.py +385 -0
  323. package/skills/pptx/scripts/thumbnail.py +450 -0
  324. package/skills/project-analyze/SKILL.md +270 -0
  325. package/skills/project-analyze/phases/phase0-discovery.md +278 -0
  326. package/skills/project-analyze/phases/phase0.5-prescan.md +139 -0
  327. package/skills/project-analyze/phases/phase1-inventory.md +94 -0
  328. package/skills/project-analyze/phases/phase2-deep-analysis.md +249 -0
  329. package/skills/project-analyze/phases/phase2a-l4-analysis.md +94 -0
  330. package/skills/project-analyze/phases/phase2b-l5-analysis.md +97 -0
  331. package/skills/project-analyze/phases/phase3-knowledge-graph.md +120 -0
  332. package/skills/project-analyze/phases/phase3a-multi-dimensional.md +61 -0
  333. package/skills/project-analyze/phases/phase4-code-quality.md +81 -0
  334. package/skills/project-analyze/phases/phase5-synthesis.md +284 -0
  335. package/skills/project-analyze/phases/phase6-validation.md +179 -0
  336. package/skills/project-analyze/prompts/code-review-agent.md +122 -0
  337. package/skills/project-analyze/prompts/deep-analysis-agent.md +107 -0
  338. package/skills/project-analyze/prompts/inventory-agent.md +67 -0
  339. package/skills/project-analyze/prompts/l4-analysis-agent.md +98 -0
  340. package/skills/project-analyze/rules/android.md +282 -0
  341. package/skills/project-analyze/rules/devops.md +443 -0
  342. package/skills/project-analyze/rules/generic.md +243 -0
  343. package/skills/project-analyze/rules/go.md +289 -0
  344. package/skills/project-analyze/rules/harmony.md +257 -0
  345. package/skills/project-analyze/rules/java.md +507 -0
  346. package/skills/project-analyze/rules/mobile-flutter.md +315 -0
  347. package/skills/project-analyze/rules/mobile-react-native.md +283 -0
  348. package/skills/project-analyze/rules/mobile-swift.md +323 -0
  349. package/skills/project-analyze/rules/python.md +317 -0
  350. package/skills/project-analyze/rules/rust-tauri.md +243 -0
  351. package/skills/project-analyze/rules/rust.md +296 -0
  352. package/skills/project-analyze/rules/web-nextjs.md +364 -0
  353. package/skills/project-analyze/rules/web-react.md +298 -0
  354. package/skills/project-analyze/rules/web-vue.md +378 -0
  355. package/skills/project-analyze/rules/web.md +390 -0
  356. package/skills/project-query/SKILL.md +224 -0
  357. package/skills/project-query/rules/query-templates.md +212 -0
  358. package/skills/python-conventions/SKILL.md +169 -0
  359. package/skills/react-native-conventions/SKILL.md +73 -0
  360. package/skills/requirements-writer/README.md +153 -0
  361. package/skills/requirements-writer/SKILL.md +341 -0
  362. package/skills/requirements-writer/examples/prd-outline-example.md +217 -0
  363. package/skills/requirements-writer/templates/module-prd-template.md +362 -0
  364. package/skills/requirements-writer/templates/prd-outline-template.md +185 -0
  365. package/skills/requirements-writer/templates/user-story-template.md +1125 -0
  366. package/skills/rust-conventions/SKILL.md +361 -0
  367. package/skills/smart-dispatch/SKILL.md +296 -0
  368. package/skills/smart-dispatch/implementer-prompt.md +146 -0
  369. package/skills/smart-dispatch/reviewer-prompt.md +199 -0
  370. package/skills/software-architecture/SKILL.md +278 -0
  371. package/skills/swift-conventions/SKILL.md +72 -0
  372. package/skills/ui-ux-pro/SKILL.md +140 -0
  373. package/skills/verification-before-completion/SKILL.md +119 -0
  374. package/skills/web-conventions/SKILL.md +259 -0
  375. package/skills/webapp-testing/LICENSE.txt +202 -0
  376. package/skills/webapp-testing/SKILL.md +97 -0
  377. package/skills/webapp-testing/examples/console_logging.py +35 -0
  378. package/skills/webapp-testing/examples/element_discovery.py +40 -0
  379. package/skills/webapp-testing/examples/static_html_automation.py +33 -0
  380. package/skills/webapp-testing/scripts/with_server.py +106 -0
  381. package/skills/writing-plans/SKILL.md +144 -0
  382. package/skills/xlsx/LICENSE.txt +30 -0
  383. package/skills/xlsx/SKILL.md +292 -0
  384. package/skills/xlsx/recalc.py +178 -0
  385. package/templates/CLAUDE.md.android +57 -0
  386. package/templates/CLAUDE.md.devops +50 -0
  387. package/templates/CLAUDE.md.generic +34 -0
  388. package/templates/CLAUDE.md.go +67 -0
  389. package/templates/CLAUDE.md.harmony +54 -0
  390. package/templates/CLAUDE.md.java +56 -0
  391. package/templates/CLAUDE.md.mobile-flutter +38 -0
  392. package/templates/CLAUDE.md.mobile-react-native +37 -0
  393. package/templates/CLAUDE.md.mobile-swift +40 -0
  394. package/templates/CLAUDE.md.python +65 -0
  395. package/templates/CLAUDE.md.rust +68 -0
  396. package/templates/CLAUDE.md.rust-tauri +120 -0
  397. package/templates/CLAUDE.md.web +63 -0
  398. package/templates/COMPONENT.md.android +58 -0
  399. package/templates/COMPONENT.md.devops +54 -0
  400. package/templates/COMPONENT.md.generic +35 -0
  401. package/templates/COMPONENT.md.go +59 -0
  402. package/templates/COMPONENT.md.harmony +63 -0
  403. package/templates/COMPONENT.md.java +69 -0
  404. package/templates/COMPONENT.md.mobile-flutter +56 -0
  405. package/templates/COMPONENT.md.mobile-react-native +55 -0
  406. package/templates/COMPONENT.md.mobile-swift +56 -0
  407. package/templates/COMPONENT.md.python +67 -0
  408. package/templates/COMPONENT.md.rust +57 -0
  409. package/templates/COMPONENT.md.rust-tauri +66 -0
  410. package/templates/COMPONENT.md.web +39 -0
  411. package/templates/README.md.android +71 -0
  412. package/templates/README.md.devops +68 -0
  413. package/templates/README.md.generic +39 -0
  414. package/templates/README.md.go +70 -0
  415. package/templates/README.md.harmony +72 -0
  416. package/templates/README.md.java +73 -0
  417. package/templates/README.md.mobile-flutter +69 -0
  418. package/templates/README.md.mobile-react-native +65 -0
  419. package/templates/README.md.mobile-swift +69 -0
  420. package/templates/README.md.monorepo +59 -0
  421. package/templates/README.md.python +66 -0
  422. package/templates/README.md.rust +69 -0
  423. package/templates/README.md.rust-tauri +149 -0
  424. package/templates/README.md.web +94 -0
  425. package/templates/UI_STYLE.md.android +74 -0
  426. package/templates/UI_STYLE.md.devops +50 -0
  427. package/templates/UI_STYLE.md.generic +31 -0
  428. package/templates/UI_STYLE.md.go +49 -0
  429. package/templates/UI_STYLE.md.harmony +71 -0
  430. package/templates/UI_STYLE.md.java +61 -0
  431. package/templates/UI_STYLE.md.mobile-flutter +70 -0
  432. package/templates/UI_STYLE.md.mobile-react-native +71 -0
  433. package/templates/UI_STYLE.md.mobile-swift +71 -0
  434. package/templates/UI_STYLE.md.python +58 -0
  435. package/templates/UI_STYLE.md.rust +52 -0
  436. package/templates/UI_STYLE.md.rust-tauri +102 -0
  437. package/templates/UI_STYLE.md.web +92 -0
  438. package/templates/cursor-rules.android.mdc +33 -0
  439. package/templates/cursor-rules.devops.mdc +32 -0
  440. package/templates/cursor-rules.generic.mdc +25 -0
  441. package/templates/cursor-rules.go.mdc +34 -0
  442. package/templates/cursor-rules.harmony.mdc +30 -0
  443. package/templates/cursor-rules.java.mdc +30 -0
  444. package/templates/cursor-rules.mobile-flutter.mdc +42 -0
  445. package/templates/cursor-rules.mobile-react-native.mdc +43 -0
  446. package/templates/cursor-rules.mobile-swift.mdc +42 -0
  447. package/templates/cursor-rules.python.mdc +33 -0
  448. package/templates/cursor-rules.rust-tauri.mdc +67 -0
  449. package/templates/cursor-rules.rust.mdc +30 -0
  450. package/templates/cursor-rules.web.mdc +30 -0
  451. package/templates/kiro-steering.android.md +39 -0
  452. package/templates/kiro-steering.devops.md +32 -0
  453. package/templates/kiro-steering.generic.md +28 -0
  454. package/templates/kiro-steering.go.md +41 -0
  455. package/templates/kiro-steering.harmony.md +36 -0
  456. package/templates/kiro-steering.java.md +37 -0
  457. package/templates/kiro-steering.mobile-flutter.md +73 -0
  458. package/templates/kiro-steering.mobile-react-native.md +71 -0
  459. package/templates/kiro-steering.mobile-swift.md +62 -0
  460. package/templates/kiro-steering.python.md +34 -0
  461. package/templates/kiro-steering.rust-tauri.md +50 -0
  462. package/templates/kiro-steering.rust.md +36 -0
  463. package/templates/kiro-steering.web.md +41 -0
@@ -0,0 +1,108 @@
1
+ import json
2
+ import sys
3
+
4
+ from pypdf import PdfReader, PdfWriter
5
+ from pypdf.annotations import FreeText
6
+
7
+
8
+ # Fills a PDF by adding text annotations defined in `fields.json`. See forms.md.
9
+
10
+
11
+ def transform_coordinates(bbox, image_width, image_height, pdf_width, pdf_height):
12
+ """Transform bounding box from image coordinates to PDF coordinates"""
13
+ # Image coordinates: origin at top-left, y increases downward
14
+ # PDF coordinates: origin at bottom-left, y increases upward
15
+ x_scale = pdf_width / image_width
16
+ y_scale = pdf_height / image_height
17
+
18
+ left = bbox[0] * x_scale
19
+ right = bbox[2] * x_scale
20
+
21
+ # Flip Y coordinates for PDF
22
+ top = pdf_height - (bbox[1] * y_scale)
23
+ bottom = pdf_height - (bbox[3] * y_scale)
24
+
25
+ return left, bottom, right, top
26
+
27
+
28
+ def fill_pdf_form(input_pdf_path, fields_json_path, output_pdf_path):
29
+ """Fill the PDF form with data from fields.json"""
30
+
31
+ # `fields.json` format described in forms.md.
32
+ with open(fields_json_path, "r") as f:
33
+ fields_data = json.load(f)
34
+
35
+ # Open the PDF
36
+ reader = PdfReader(input_pdf_path)
37
+ writer = PdfWriter()
38
+
39
+ # Copy all pages to writer
40
+ writer.append(reader)
41
+
42
+ # Get PDF dimensions for each page
43
+ pdf_dimensions = {}
44
+ for i, page in enumerate(reader.pages):
45
+ mediabox = page.mediabox
46
+ pdf_dimensions[i + 1] = [mediabox.width, mediabox.height]
47
+
48
+ # Process each form field
49
+ annotations = []
50
+ for field in fields_data["form_fields"]:
51
+ page_num = field["page_number"]
52
+
53
+ # Get page dimensions and transform coordinates.
54
+ page_info = next(p for p in fields_data["pages"] if p["page_number"] == page_num)
55
+ image_width = page_info["image_width"]
56
+ image_height = page_info["image_height"]
57
+ pdf_width, pdf_height = pdf_dimensions[page_num]
58
+
59
+ transformed_entry_box = transform_coordinates(
60
+ field["entry_bounding_box"],
61
+ image_width, image_height,
62
+ pdf_width, pdf_height
63
+ )
64
+
65
+ # Skip empty fields
66
+ if "entry_text" not in field or "text" not in field["entry_text"]:
67
+ continue
68
+ entry_text = field["entry_text"]
69
+ text = entry_text["text"]
70
+ if not text:
71
+ continue
72
+
73
+ font_name = entry_text.get("font", "Arial")
74
+ font_size = str(entry_text.get("font_size", 14)) + "pt"
75
+ font_color = entry_text.get("font_color", "000000")
76
+
77
+ # Font size/color seems to not work reliably across viewers:
78
+ # https://github.com/py-pdf/pypdf/issues/2084
79
+ annotation = FreeText(
80
+ text=text,
81
+ rect=transformed_entry_box,
82
+ font=font_name,
83
+ font_size=font_size,
84
+ font_color=font_color,
85
+ border_color=None,
86
+ background_color=None,
87
+ )
88
+ annotations.append(annotation)
89
+ # page_number is 0-based for pypdf
90
+ writer.add_annotation(page_number=page_num - 1, annotation=annotation)
91
+
92
+ # Save the filled PDF
93
+ with open(output_pdf_path, "wb") as output:
94
+ writer.write(output)
95
+
96
+ print(f"Successfully filled PDF form and saved to {output_pdf_path}")
97
+ print(f"Added {len(annotations)} text annotations")
98
+
99
+
100
+ if __name__ == "__main__":
101
+ if len(sys.argv) != 4:
102
+ print("Usage: fill_pdf_form_with_annotations.py [input pdf] [fields.json] [output pdf]")
103
+ sys.exit(1)
104
+ input_pdf = sys.argv[1]
105
+ fields_json = sys.argv[2]
106
+ output_pdf = sys.argv[3]
107
+
108
+ fill_pdf_form(input_pdf, fields_json, output_pdf)
@@ -0,0 +1,30 @@
1
+ © 2025 Anthropic, PBC. All rights reserved.
2
+
3
+ LICENSE: Use of these materials (including all code, prompts, assets, files,
4
+ and other components of this Skill) is governed by your agreement with
5
+ Anthropic regarding use of Anthropic's services. If no separate agreement
6
+ exists, use is governed by Anthropic's Consumer Terms of Service or
7
+ Commercial Terms of Service, as applicable:
8
+ https://www.anthropic.com/legal/consumer-terms
9
+ https://www.anthropic.com/legal/commercial-terms
10
+ Your applicable agreement is referred to as the "Agreement." "Services" are
11
+ as defined in the Agreement.
12
+
13
+ ADDITIONAL RESTRICTIONS: Notwithstanding anything in the Agreement to the
14
+ contrary, users may not:
15
+
16
+ - Extract these materials from the Services or retain copies of these
17
+ materials outside the Services
18
+ - Reproduce or copy these materials, except for temporary copies created
19
+ automatically during authorized use of the Services
20
+ - Create derivative works based on these materials
21
+ - Distribute, sublicense, or transfer these materials to any third party
22
+ - Make, offer to sell, sell, or import any inventions embodied in these
23
+ materials
24
+ - Reverse engineer, decompile, or disassemble these materials
25
+
26
+ The receipt, viewing, or possession of these materials does not convey or
27
+ imply any license or right beyond those expressly granted above.
28
+
29
+ Anthropic retains all right, title, and interest in these materials,
30
+ including all copyrights, patents, and other intellectual property rights.
@@ -0,0 +1,487 @@
1
+ ---
2
+ name: pptx
3
+ description: "Presentation creation, editing, and analysis. When Claude needs to work with presentations (.pptx files) for: (1) Creating new presentations, (2) Modifying or editing content, (3) Working with layouts, (4) Adding comments or speaker notes, or any other presentation tasks"
4
+ version: 1.0.0
5
+ license: Proprietary. LICENSE.txt has complete terms
6
+ optional: true
7
+ optional_deps: "Python 3.8+, python-pptx, LibreOffice (optional, for conversion)"
8
+ ---
9
+
10
+ # PPTX creation, editing, and analysis
11
+
12
+ ## Overview
13
+
14
+ A user may ask you to create, edit, or analyze the contents of a .pptx file. A .pptx file is essentially a ZIP archive containing XML files and other resources that you can read or edit. You have different tools and workflows available for different tasks.
15
+
16
+ ## Reading and analyzing content
17
+
18
+ ### Text extraction
19
+ If you just need to read the text contents of a presentation, you should convert the document to markdown:
20
+
21
+ ```bash
22
+ # Convert document to markdown
23
+ python -m markitdown path-to-file.pptx
24
+ ```
25
+
26
+ ### Raw XML access
27
+ You need raw XML access for: comments, speaker notes, slide layouts, animations, design elements, and complex formatting. For any of these features, you'll need to unpack a presentation and read its raw XML contents.
28
+
29
+ #### Unpacking a file
30
+ `python ooxml/scripts/unpack.py <office_file> <output_dir>`
31
+
32
+ **Note**: The unpack.py script is located at `skills/pptx/ooxml/scripts/unpack.py` relative to the project root. If the script doesn't exist at this path, use `find . -name "unpack.py"` to locate it.
33
+
34
+ #### Key file structures
35
+ * `ppt/presentation.xml` - Main presentation metadata and slide references
36
+ * `ppt/slides/slide{N}.xml` - Individual slide contents (slide1.xml, slide2.xml, etc.)
37
+ * `ppt/notesSlides/notesSlide{N}.xml` - Speaker notes for each slide
38
+ * `ppt/comments/modernComment_*.xml` - Comments for specific slides
39
+ * `ppt/slideLayouts/` - Layout templates for slides
40
+ * `ppt/slideMasters/` - Master slide templates
41
+ * `ppt/theme/` - Theme and styling information
42
+ * `ppt/media/` - Images and other media files
43
+
44
+ #### Typography and color extraction
45
+ **When given an example design to emulate**: Always analyze the presentation's typography and colors first using the methods below:
46
+ 1. **Read theme file**: Check `ppt/theme/theme1.xml` for colors (`<a:clrScheme>`) and fonts (`<a:fontScheme>`)
47
+ 2. **Sample slide content**: Examine `ppt/slides/slide1.xml` for actual font usage (`<a:rPr>`) and colors
48
+ 3. **Search for patterns**: Use grep to find color (`<a:solidFill>`, `<a:srgbClr>`) and font references across all XML files
49
+
50
+ ## Creating a new PowerPoint presentation **without a template**
51
+
52
+ When creating a new PowerPoint presentation from scratch, use the **html2pptx** workflow to convert HTML slides to PowerPoint with accurate positioning.
53
+
54
+ ### Design Principles
55
+
56
+ **CRITICAL**: Before creating any presentation, analyze the content and choose appropriate design elements:
57
+ 1. **Consider the subject matter**: What is this presentation about? What tone, industry, or mood does it suggest?
58
+ 2. **Check for branding**: If the user mentions a company/organization, consider their brand colors and identity
59
+ 3. **Match palette to content**: Select colors that reflect the subject
60
+ 4. **State your approach**: Explain your design choices before writing code
61
+
62
+ **Requirements**:
63
+ - ✅ State your content-informed design approach BEFORE writing code
64
+ - ✅ Use web-safe fonts only: Arial, Helvetica, Times New Roman, Georgia, Courier New, Verdana, Tahoma, Trebuchet MS, Impact
65
+ - ✅ Create clear visual hierarchy through size, weight, and color
66
+ - ✅ Ensure readability: strong contrast, appropriately sized text, clean alignment
67
+ - ✅ Be consistent: repeat patterns, spacing, and visual language across slides
68
+
69
+ #### Color Palette Selection
70
+
71
+ **Choosing colors creatively**:
72
+ - **Think beyond defaults**: What colors genuinely match this specific topic? Avoid autopilot choices.
73
+ - **Consider multiple angles**: Topic, industry, mood, energy level, target audience, brand identity (if mentioned)
74
+ - **Be adventurous**: Try unexpected combinations - a healthcare presentation doesn't have to be green, finance doesn't have to be navy
75
+ - **Build your palette**: Pick 3-5 colors that work together (dominant colors + supporting tones + accent)
76
+ - **Ensure contrast**: Text must be clearly readable on backgrounds
77
+
78
+ **Example color palettes** (use these to spark creativity - choose one, adapt it, or create your own):
79
+
80
+ 1. **Classic Blue**: Deep navy (#1C2833), slate gray (#2E4053), silver (#AAB7B8), off-white (#F4F6F6)
81
+ 2. **Teal & Coral**: Teal (#5EA8A7), deep teal (#277884), coral (#FE4447), white (#FFFFFF)
82
+ 3. **Bold Red**: Red (#C0392B), bright red (#E74C3C), orange (#F39C12), yellow (#F1C40F), green (#2ECC71)
83
+ 4. **Warm Blush**: Mauve (#A49393), blush (#EED6D3), rose (#E8B4B8), cream (#FAF7F2)
84
+ 5. **Burgundy Luxury**: Burgundy (#5D1D2E), crimson (#951233), rust (#C15937), gold (#997929)
85
+ 6. **Deep Purple & Emerald**: Purple (#B165FB), dark blue (#181B24), emerald (#40695B), white (#FFFFFF)
86
+ 7. **Cream & Forest Green**: Cream (#FFE1C7), forest green (#40695B), white (#FCFCFC)
87
+ 8. **Pink & Purple**: Pink (#F8275B), coral (#FF574A), rose (#FF737D), purple (#3D2F68)
88
+ 9. **Lime & Plum**: Lime (#C5DE82), plum (#7C3A5F), coral (#FD8C6E), blue-gray (#98ACB5)
89
+ 10. **Black & Gold**: Gold (#BF9A4A), black (#000000), cream (#F4F6F6)
90
+ 11. **Sage & Terracotta**: Sage (#87A96B), terracotta (#E07A5F), cream (#F4F1DE), charcoal (#2C2C2C)
91
+ 12. **Charcoal & Red**: Charcoal (#292929), red (#E33737), light gray (#CCCBCB)
92
+ 13. **Vibrant Orange**: Orange (#F96D00), light gray (#F2F2F2), charcoal (#222831)
93
+ 14. **Forest Green**: Black (#191A19), green (#4E9F3D), dark green (#1E5128), white (#FFFFFF)
94
+ 15. **Retro Rainbow**: Purple (#722880), pink (#D72D51), orange (#EB5C18), amber (#F08800), gold (#DEB600)
95
+ 16. **Vintage Earthy**: Mustard (#E3B448), sage (#CBD18F), forest green (#3A6B35), cream (#F4F1DE)
96
+ 17. **Coastal Rose**: Old rose (#AD7670), beaver (#B49886), eggshell (#F3ECDC), ash gray (#BFD5BE)
97
+ 18. **Orange & Turquoise**: Light orange (#FC993E), grayish turquoise (#667C6F), white (#FCFCFC)
98
+
99
+ #### Visual Details Options
100
+
101
+ **Geometric Patterns**:
102
+ - Diagonal section dividers instead of horizontal
103
+ - Asymmetric column widths (30/70, 40/60, 25/75)
104
+ - Rotated text headers at 90° or 270°
105
+ - Circular/hexagonal frames for images
106
+ - Triangular accent shapes in corners
107
+ - Overlapping shapes for depth
108
+
109
+ **Border & Frame Treatments**:
110
+ - Thick single-color borders (10-20pt) on one side only
111
+ - Double-line borders with contrasting colors
112
+ - Corner brackets instead of full frames
113
+ - L-shaped borders (top+left or bottom+right)
114
+ - Underline accents beneath headers (3-5pt thick)
115
+
116
+ **Typography Treatments**:
117
+ - Extreme size contrast (72pt headlines vs 11pt body)
118
+ - All-caps headers with wide letter spacing
119
+ - Numbered sections in oversized display type
120
+ - Monospace (Courier New) for data/stats/technical content
121
+ - Condensed fonts (Arial Narrow) for dense information
122
+ - Outlined text for emphasis
123
+
124
+ **Chart & Data Styling**:
125
+ - Monochrome charts with single accent color for key data
126
+ - Horizontal bar charts instead of vertical
127
+ - Dot plots instead of bar charts
128
+ - Minimal gridlines or none at all
129
+ - Data labels directly on elements (no legends)
130
+ - Oversized numbers for key metrics
131
+
132
+ **Layout Innovations**:
133
+ - Full-bleed images with text overlays
134
+ - Sidebar column (20-30% width) for navigation/context
135
+ - Modular grid systems (3×3, 4×4 blocks)
136
+ - Z-pattern or F-pattern content flow
137
+ - Floating text boxes over colored shapes
138
+ - Magazine-style multi-column layouts
139
+
140
+ **Background Treatments**:
141
+ - Solid color blocks occupying 40-60% of slide
142
+ - Gradient fills (vertical or diagonal only)
143
+ - Split backgrounds (two colors, diagonal or vertical)
144
+ - Edge-to-edge color bands
145
+ - Negative space as a design element
146
+
147
+ ### Layout Tips
148
+ **When creating slides with charts or tables:**
149
+ - **Two-column layout (PREFERRED)**: Use a header spanning the full width, then two columns below - text/bullets in one column and the featured content in the other. This provides better balance and makes charts/tables more readable. Use flexbox with unequal column widths (e.g., 40%/60% split) to optimize space for each content type.
150
+ - **Full-slide layout**: Let the featured content (chart/table) take up the entire slide for maximum impact and readability
151
+ - **NEVER vertically stack**: Do not place charts/tables below text in a single column - this causes poor readability and layout issues
152
+
153
+ ### Workflow
154
+ 1. **MANDATORY - READ ENTIRE FILE**: Read [`html2pptx.md`](html2pptx.md) completely from start to finish. **NEVER set any range limits when reading this file.** Read the full file content for detailed syntax, critical formatting rules, and best practices before proceeding with presentation creation.
155
+ 2. Create an HTML file for each slide with proper dimensions (e.g., 720pt × 405pt for 16:9)
156
+ - Use `<p>`, `<h1>`-`<h6>`, `<ul>`, `<ol>` for all text content
157
+ - Use `class="placeholder"` for areas where charts/tables will be added (render with gray background for visibility)
158
+ - **CRITICAL**: Rasterize gradients and icons as PNG images FIRST using Sharp, then reference in HTML
159
+ - **LAYOUT**: For slides with charts/tables/images, use either full-slide layout or two-column layout for better readability
160
+ 3. Create and run a JavaScript file using the [`html2pptx.js`](scripts/html2pptx.js) library to convert HTML slides to PowerPoint and save the presentation
161
+ - Use the `html2pptx()` function to process each HTML file
162
+ - Add charts and tables to placeholder areas using PptxGenJS API
163
+ - Save the presentation using `pptx.writeFile()`
164
+ 4. **Visual validation**: Generate thumbnails and inspect for layout issues
165
+ - Create thumbnail grid: `python scripts/thumbnail.py output.pptx workspace/thumbnails --cols 4`
166
+ - Read and carefully examine the thumbnail image for:
167
+ - **Text cutoff**: Text being cut off by header bars, shapes, or slide edges
168
+ - **Text overlap**: Text overlapping with other text or shapes
169
+ - **Positioning issues**: Content too close to slide boundaries or other elements
170
+ - **Contrast issues**: Insufficient contrast between text and backgrounds
171
+ - If issues found, adjust HTML margins/spacing/colors and regenerate the presentation
172
+ - Repeat until all slides are visually correct
173
+
174
+ ## Editing an existing PowerPoint presentation
175
+
176
+ When edit slides in an existing PowerPoint presentation, you need to work with the raw Office Open XML (OOXML) format. This involves unpacking the .pptx file, editing the XML content, and repacking it.
177
+
178
+ ### Workflow
179
+ 1. **MANDATORY - READ ENTIRE FILE**: Read [`ooxml.md`](ooxml.md) (~500 lines) completely from start to finish. **NEVER set any range limits when reading this file.** Read the full file content for detailed guidance on OOXML structure and editing workflows before any presentation editing.
180
+ 2. Unpack the presentation: `python ooxml/scripts/unpack.py <office_file> <output_dir>`
181
+ 3. Edit the XML files (primarily `ppt/slides/slide{N}.xml` and related files)
182
+ 4. **CRITICAL**: Validate immediately after each edit and fix any validation errors before proceeding: `python ooxml/scripts/validate.py <dir> --original <file>`
183
+ 5. Pack the final presentation: `python ooxml/scripts/pack.py <input_directory> <office_file>`
184
+
185
+ ## Creating a new PowerPoint presentation **using a template**
186
+
187
+ When you need to create a presentation that follows an existing template's design, you'll need to duplicate and re-arrange template slides before then replacing placeholder context.
188
+
189
+ ### Workflow
190
+ 1. **Extract template text AND create visual thumbnail grid**:
191
+ * Extract text: `python -m markitdown template.pptx > template-content.md`
192
+ * Read `template-content.md`: Read the entire file to understand the contents of the template presentation. **NEVER set any range limits when reading this file.**
193
+ * Create thumbnail grids: `python scripts/thumbnail.py template.pptx`
194
+ * See [Creating Thumbnail Grids](#creating-thumbnail-grids) section for more details
195
+
196
+ 2. **Analyze template and save inventory to a file**:
197
+ * **Visual Analysis**: Review thumbnail grid(s) to understand slide layouts, design patterns, and visual structure
198
+ * Create and save a template inventory file at `template-inventory.md` containing:
199
+ ```markdown
200
+ # Template Inventory Analysis
201
+ **Total Slides: [count]**
202
+ **IMPORTANT: Slides are 0-indexed (first slide = 0, last slide = count-1)**
203
+
204
+ ## [Category Name]
205
+ - Slide 0: [Layout code if available] - Description/purpose
206
+ - Slide 1: [Layout code] - Description/purpose
207
+ - Slide 2: [Layout code] - Description/purpose
208
+ [... EVERY slide must be listed individually with its index ...]
209
+ ```
210
+ * **Using the thumbnail grid**: Reference the visual thumbnails to identify:
211
+ - Layout patterns (title slides, content layouts, section dividers)
212
+ - Image placeholder locations and counts
213
+ - Design consistency across slide groups
214
+ - Visual hierarchy and structure
215
+ * This inventory file is REQUIRED for selecting appropriate templates in the next step
216
+
217
+ 3. **Create presentation outline based on template inventory**:
218
+ * Review available templates from step 2.
219
+ * Choose an intro or title template for the first slide. This should be one of the first templates.
220
+ * Choose safe, text-based layouts for the other slides.
221
+ * **CRITICAL: Match layout structure to actual content**:
222
+ - Single-column layouts: Use for unified narrative or single topic
223
+ - Two-column layouts: Use ONLY when you have exactly 2 distinct items/concepts
224
+ - Three-column layouts: Use ONLY when you have exactly 3 distinct items/concepts
225
+ - Image + text layouts: Use ONLY when you have actual images to insert
226
+ - Quote layouts: Use ONLY for actual quotes from people (with attribution), never for emphasis
227
+ - Never use layouts with more placeholders than you have content
228
+ - If you have 2 items, don't force them into a 3-column layout
229
+ - If you have 4+ items, consider breaking into multiple slides or using a list format
230
+ * Count your actual content pieces BEFORE selecting the layout
231
+ * Verify each placeholder in the chosen layout will be filled with meaningful content
232
+ * Select one option representing the **best** layout for each content section.
233
+ * Save `outline.md` with content AND template mapping that leverages available designs
234
+ * Example template mapping:
235
+ ```
236
+ # Template slides to use (0-based indexing)
237
+ # WARNING: Verify indices are within range! Template with 73 slides has indices 0-72
238
+ # Mapping: slide numbers from outline -> template slide indices
239
+ template_mapping = [
240
+ 0, # Use slide 0 (Title/Cover)
241
+ 34, # Use slide 34 (B1: Title and body)
242
+ 34, # Use slide 34 again (duplicate for second B1)
243
+ 50, # Use slide 50 (E1: Quote)
244
+ 54, # Use slide 54 (F2: Closing + Text)
245
+ ]
246
+ ```
247
+
248
+ 4. **Duplicate, reorder, and delete slides using `rearrange.py`**:
249
+ * Use the `scripts/rearrange.py` script to create a new presentation with slides in the desired order:
250
+ ```bash
251
+ python scripts/rearrange.py template.pptx working.pptx 0,34,34,50,52
252
+ ```
253
+ * The script handles duplicating repeated slides, deleting unused slides, and reordering automatically
254
+ * Slide indices are 0-based (first slide is 0, second is 1, etc.)
255
+ * The same slide index can appear multiple times to duplicate that slide
256
+
257
+ 5. **Extract ALL text using the `inventory.py` script**:
258
+ * **Run inventory extraction**:
259
+ ```bash
260
+ python scripts/inventory.py working.pptx text-inventory.json
261
+ ```
262
+ * **Read text-inventory.json**: Read the entire text-inventory.json file to understand all shapes and their properties. **NEVER set any range limits when reading this file.**
263
+
264
+ * The inventory JSON structure:
265
+ ```json
266
+ {
267
+ "slide-0": {
268
+ "shape-0": {
269
+ "placeholder_type": "TITLE", // or null for non-placeholders
270
+ "left": 1.5, // position in inches
271
+ "top": 2.0,
272
+ "width": 7.5,
273
+ "height": 1.2,
274
+ "paragraphs": [
275
+ {
276
+ "text": "Paragraph text",
277
+ // Optional properties (only included when non-default):
278
+ "bullet": true, // explicit bullet detected
279
+ "level": 0, // only included when bullet is true
280
+ "alignment": "CENTER", // CENTER, RIGHT (not LEFT)
281
+ "space_before": 10.0, // space before paragraph in points
282
+ "space_after": 6.0, // space after paragraph in points
283
+ "line_spacing": 22.4, // line spacing in points
284
+ "font_name": "Arial", // from first run
285
+ "font_size": 14.0, // in points
286
+ "bold": true,
287
+ "italic": false,
288
+ "underline": false,
289
+ "color": "FF0000" // RGB color
290
+ }
291
+ ]
292
+ }
293
+ }
294
+ }
295
+ ```
296
+
297
+ * Key features:
298
+ - **Slides**: Named as "slide-0", "slide-1", etc.
299
+ - **Shapes**: Ordered by visual position (top-to-bottom, left-to-right) as "shape-0", "shape-1", etc.
300
+ - **Placeholder types**: TITLE, CENTER_TITLE, SUBTITLE, BODY, OBJECT, or null
301
+ - **Default font size**: `default_font_size` in points extracted from layout placeholders (when available)
302
+ - **Slide numbers are filtered**: Shapes with SLIDE_NUMBER placeholder type are automatically excluded from inventory
303
+ - **Bullets**: When `bullet: true`, `level` is always included (even if 0)
304
+ - **Spacing**: `space_before`, `space_after`, and `line_spacing` in points (only included when set)
305
+ - **Colors**: `color` for RGB (e.g., "FF0000"), `theme_color` for theme colors (e.g., "DARK_1")
306
+ - **Properties**: Only non-default values are included in the output
307
+
308
+ 6. **Generate replacement text and save the data to a JSON file**
309
+ Based on the text inventory from the previous step:
310
+ - **CRITICAL**: First verify which shapes exist in the inventory - only reference shapes that are actually present
311
+ - **VALIDATION**: The replace.py script will validate that all shapes in your replacement JSON exist in the inventory
312
+ - If you reference a non-existent shape, you'll get an error showing available shapes
313
+ - If you reference a non-existent slide, you'll get an error indicating the slide doesn't exist
314
+ - All validation errors are shown at once before the script exits
315
+ - **IMPORTANT**: The replace.py script uses inventory.py internally to identify ALL text shapes
316
+ - **AUTOMATIC CLEARING**: ALL text shapes from the inventory will be cleared unless you provide "paragraphs" for them
317
+ - Add a "paragraphs" field to shapes that need content (not "replacement_paragraphs")
318
+ - Shapes without "paragraphs" in the replacement JSON will have their text cleared automatically
319
+ - Paragraphs with bullets will be automatically left aligned. Don't set the `alignment` property on when `"bullet": true`
320
+ - Generate appropriate replacement content for placeholder text
321
+ - Use shape size to determine appropriate content length
322
+ - **CRITICAL**: Include paragraph properties from the original inventory - don't just provide text
323
+ - **IMPORTANT**: When bullet: true, do NOT include bullet symbols (•, -, *) in text - they're added automatically
324
+ - **ESSENTIAL FORMATTING RULES**:
325
+ - Headers/titles should typically have `"bold": true`
326
+ - List items should have `"bullet": true, "level": 0` (level is required when bullet is true)
327
+ - Preserve any alignment properties (e.g., `"alignment": "CENTER"` for centered text)
328
+ - Include font properties when different from default (e.g., `"font_size": 14.0`, `"font_name": "Lora"`)
329
+ - Colors: Use `"color": "FF0000"` for RGB or `"theme_color": "DARK_1"` for theme colors
330
+ - The replacement script expects **properly formatted paragraphs**, not just text strings
331
+ - **Overlapping shapes**: Prefer shapes with larger default_font_size or more appropriate placeholder_type
332
+ - Save the updated inventory with replacements to `replacement-text.json`
333
+ - **WARNING**: Different template layouts have different shape counts - always check the actual inventory before creating replacements
334
+
335
+ Example paragraphs field showing proper formatting:
336
+ ```json
337
+ "paragraphs": [
338
+ {
339
+ "text": "New presentation title text",
340
+ "alignment": "CENTER",
341
+ "bold": true
342
+ },
343
+ {
344
+ "text": "Section Header",
345
+ "bold": true
346
+ },
347
+ {
348
+ "text": "First bullet point without bullet symbol",
349
+ "bullet": true,
350
+ "level": 0
351
+ },
352
+ {
353
+ "text": "Red colored text",
354
+ "color": "FF0000"
355
+ },
356
+ {
357
+ "text": "Theme colored text",
358
+ "theme_color": "DARK_1"
359
+ },
360
+ {
361
+ "text": "Regular paragraph text without special formatting"
362
+ }
363
+ ]
364
+ ```
365
+
366
+ **Shapes not listed in the replacement JSON are automatically cleared**:
367
+ ```json
368
+ {
369
+ "slide-0": {
370
+ "shape-0": {
371
+ "paragraphs": [...] // This shape gets new text
372
+ }
373
+ // shape-1 and shape-2 from inventory will be cleared automatically
374
+ }
375
+ }
376
+ ```
377
+
378
+ **Common formatting patterns for presentations**:
379
+ - Title slides: Bold text, sometimes centered
380
+ - Section headers within slides: Bold text
381
+ - Bullet lists: Each item needs `"bullet": true, "level": 0`
382
+ - Body text: Usually no special properties needed
383
+ - Quotes: May have special alignment or font properties
384
+
385
+ 7. **Apply replacements using the `replace.py` script**
386
+ ```bash
387
+ python scripts/replace.py working.pptx replacement-text.json output.pptx
388
+ ```
389
+
390
+ The script will:
391
+ - First extract the inventory of ALL text shapes using functions from inventory.py
392
+ - Validate that all shapes in the replacement JSON exist in the inventory
393
+ - Clear text from ALL shapes identified in the inventory
394
+ - Apply new text only to shapes with "paragraphs" defined in the replacement JSON
395
+ - Preserve formatting by applying paragraph properties from the JSON
396
+ - Handle bullets, alignment, font properties, and colors automatically
397
+ - Save the updated presentation
398
+
399
+ Example validation errors:
400
+ ```
401
+ ERROR: Invalid shapes in replacement JSON:
402
+ - Shape 'shape-99' not found on 'slide-0'. Available shapes: shape-0, shape-1, shape-4
403
+ - Slide 'slide-999' not found in inventory
404
+ ```
405
+
406
+ ```
407
+ ERROR: Replacement text made overflow worse in these shapes:
408
+ - slide-0/shape-2: overflow worsened by 1.25" (was 0.00", now 1.25")
409
+ ```
410
+
411
+ ## Creating Thumbnail Grids
412
+
413
+ To create visual thumbnail grids of PowerPoint slides for quick analysis and reference:
414
+
415
+ ```bash
416
+ python scripts/thumbnail.py template.pptx [output_prefix]
417
+ ```
418
+
419
+ **Features**:
420
+ - Creates: `thumbnails.jpg` (or `thumbnails-1.jpg`, `thumbnails-2.jpg`, etc. for large decks)
421
+ - Default: 5 columns, max 30 slides per grid (5×6)
422
+ - Custom prefix: `python scripts/thumbnail.py template.pptx my-grid`
423
+ - Note: The output prefix should include the path if you want output in a specific directory (e.g., `workspace/my-grid`)
424
+ - Adjust columns: `--cols 4` (range: 3-6, affects slides per grid)
425
+ - Grid limits: 3 cols = 12 slides/grid, 4 cols = 20, 5 cols = 30, 6 cols = 42
426
+ - Slides are zero-indexed (Slide 0, Slide 1, etc.)
427
+
428
+ **Use cases**:
429
+ - Template analysis: Quickly understand slide layouts and design patterns
430
+ - Content review: Visual overview of entire presentation
431
+ - Navigation reference: Find specific slides by their visual appearance
432
+ - Quality check: Verify all slides are properly formatted
433
+
434
+ **Examples**:
435
+ ```bash
436
+ # Basic usage
437
+ python scripts/thumbnail.py presentation.pptx
438
+
439
+ # Combine options: custom name, columns
440
+ python scripts/thumbnail.py template.pptx analysis --cols 4
441
+ ```
442
+
443
+ ## Converting Slides to Images
444
+
445
+ To visually analyze PowerPoint slides, convert them to images using a two-step process:
446
+
447
+ 1. **Convert PPTX to PDF**:
448
+ ```bash
449
+ soffice --headless --convert-to pdf template.pptx
450
+ ```
451
+
452
+ 2. **Convert PDF pages to JPEG images**:
453
+ ```bash
454
+ pdftoppm -jpeg -r 150 template.pdf slide
455
+ ```
456
+ This creates files like `slide-1.jpg`, `slide-2.jpg`, etc.
457
+
458
+ Options:
459
+ - `-r 150`: Sets resolution to 150 DPI (adjust for quality/size balance)
460
+ - `-jpeg`: Output JPEG format (use `-png` for PNG if preferred)
461
+ - `-f N`: First page to convert (e.g., `-f 2` starts from page 2)
462
+ - `-l N`: Last page to convert (e.g., `-l 5` stops at page 5)
463
+ - `slide`: Prefix for output files
464
+
465
+ Example for specific range:
466
+ ```bash
467
+ pdftoppm -jpeg -r 150 -f 2 -l 5 template.pdf slide # Converts only pages 2-5
468
+ ```
469
+
470
+ ## Code Style Guidelines
471
+ **IMPORTANT**: When generating code for PPTX operations:
472
+ - Write concise code
473
+ - Avoid verbose variable names and redundant operations
474
+ - Avoid unnecessary print statements
475
+
476
+ ## Dependencies
477
+
478
+ Required dependencies (should already be installed):
479
+
480
+ - **markitdown**: `pip install "markitdown[pptx]"` (for text extraction from presentations)
481
+ - **pptxgenjs**: `npm install -g pptxgenjs` (for creating presentations via html2pptx)
482
+ - **playwright**: `npm install -g playwright` (for HTML rendering in html2pptx)
483
+ - **react-icons**: `npm install -g react-icons react react-dom` (for icons)
484
+ - **sharp**: `npm install -g sharp` (for SVG rasterization and image processing)
485
+ - **LibreOffice**: `sudo apt-get install libreoffice` (for PDF conversion)
486
+ - **Poppler**: `sudo apt-get install poppler-utils` (for pdftoppm to convert PDF to images)
487
+ - **defusedxml**: `pip install defusedxml` (for secure XML parsing)