cli-jaw 0.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 (845) hide show
  1. package/LICENSE +21 -0
  2. package/README.ko.md +411 -0
  3. package/README.md +416 -0
  4. package/README.zh-CN.md +411 -0
  5. package/dist/bin/cli-jaw.js +108 -0
  6. package/dist/bin/cli-jaw.js.map +1 -0
  7. package/dist/bin/commands/browser.js +241 -0
  8. package/dist/bin/commands/browser.js.map +1 -0
  9. package/dist/bin/commands/chat.js +878 -0
  10. package/dist/bin/commands/chat.js.map +1 -0
  11. package/dist/bin/commands/doctor.js +152 -0
  12. package/dist/bin/commands/doctor.js.map +1 -0
  13. package/dist/bin/commands/employee.js +70 -0
  14. package/dist/bin/commands/employee.js.map +1 -0
  15. package/dist/bin/commands/init.js +110 -0
  16. package/dist/bin/commands/init.js.map +1 -0
  17. package/dist/bin/commands/mcp.js +219 -0
  18. package/dist/bin/commands/mcp.js.map +1 -0
  19. package/dist/bin/commands/memory.js +105 -0
  20. package/dist/bin/commands/memory.js.map +1 -0
  21. package/dist/bin/commands/reset.js +109 -0
  22. package/dist/bin/commands/reset.js.map +1 -0
  23. package/dist/bin/commands/serve.js +75 -0
  24. package/dist/bin/commands/serve.js.map +1 -0
  25. package/dist/bin/commands/skill.js +232 -0
  26. package/dist/bin/commands/skill.js.map +1 -0
  27. package/dist/bin/commands/status.js +51 -0
  28. package/dist/bin/commands/status.js.map +1 -0
  29. package/dist/bin/postinstall.js +218 -0
  30. package/dist/bin/postinstall.js.map +1 -0
  31. package/dist/lib/mcp-sync.js +639 -0
  32. package/dist/lib/mcp-sync.js.map +1 -0
  33. package/dist/lib/quota-copilot.js +62 -0
  34. package/dist/lib/quota-copilot.js.map +1 -0
  35. package/dist/lib/upload.js +72 -0
  36. package/dist/lib/upload.js.map +1 -0
  37. package/dist/server.js +832 -0
  38. package/dist/server.js.map +1 -0
  39. package/dist/src/agent/args.js +66 -0
  40. package/dist/src/agent/args.js.map +1 -0
  41. package/dist/src/agent/events.js +328 -0
  42. package/dist/src/agent/events.js.map +1 -0
  43. package/dist/src/agent/spawn.js +646 -0
  44. package/dist/src/agent/spawn.js.map +1 -0
  45. package/dist/src/browser/actions.js +168 -0
  46. package/dist/src/browser/actions.js.map +1 -0
  47. package/dist/src/browser/connection.js +79 -0
  48. package/dist/src/browser/connection.js.map +1 -0
  49. package/dist/src/browser/index.js +4 -0
  50. package/dist/src/browser/index.js.map +1 -0
  51. package/dist/src/browser/vision.js +128 -0
  52. package/dist/src/browser/vision.js.map +1 -0
  53. package/dist/src/cli/acp-client.js +298 -0
  54. package/dist/src/cli/acp-client.js.map +1 -0
  55. package/dist/src/cli/commands.js +267 -0
  56. package/dist/src/cli/commands.js.map +1 -0
  57. package/dist/src/cli/handlers.js +405 -0
  58. package/dist/src/cli/handlers.js.map +1 -0
  59. package/dist/src/cli/registry.js +87 -0
  60. package/dist/src/cli/registry.js.map +1 -0
  61. package/dist/src/command-contract/catalog.js +36 -0
  62. package/dist/src/command-contract/catalog.js.map +1 -0
  63. package/dist/src/command-contract/help-renderer.js +39 -0
  64. package/dist/src/command-contract/help-renderer.js.map +1 -0
  65. package/dist/src/command-contract/policy.js +34 -0
  66. package/dist/src/command-contract/policy.js.map +1 -0
  67. package/dist/src/core/bus.js +17 -0
  68. package/dist/src/core/bus.js.map +1 -0
  69. package/dist/src/core/config.js +198 -0
  70. package/dist/src/core/config.js.map +1 -0
  71. package/dist/src/core/db.js +97 -0
  72. package/dist/src/core/db.js.map +1 -0
  73. package/dist/src/core/i18n.js +86 -0
  74. package/dist/src/core/i18n.js.map +1 -0
  75. package/dist/src/core/logger.js +14 -0
  76. package/dist/src/core/logger.js.map +1 -0
  77. package/dist/src/core/settings-merge.js +40 -0
  78. package/dist/src/core/settings-merge.js.map +1 -0
  79. package/dist/src/http/async-handler.js +6 -0
  80. package/dist/src/http/async-handler.js.map +1 -0
  81. package/dist/src/http/error-middleware.js +24 -0
  82. package/dist/src/http/error-middleware.js.map +1 -0
  83. package/dist/src/http/response.js +16 -0
  84. package/dist/src/http/response.js.map +1 -0
  85. package/dist/src/memory/heartbeat.js +106 -0
  86. package/dist/src/memory/heartbeat.js.map +1 -0
  87. package/dist/src/memory/memory.js +119 -0
  88. package/dist/src/memory/memory.js.map +1 -0
  89. package/dist/src/memory/worklog.js +154 -0
  90. package/dist/src/memory/worklog.js.map +1 -0
  91. package/dist/src/orchestrator/distribute.js +310 -0
  92. package/dist/src/orchestrator/distribute.js.map +1 -0
  93. package/dist/src/orchestrator/parser.js +118 -0
  94. package/dist/src/orchestrator/parser.js.map +1 -0
  95. package/dist/src/orchestrator/pipeline.js +343 -0
  96. package/dist/src/orchestrator/pipeline.js.map +1 -0
  97. package/dist/src/prompt/builder.js +531 -0
  98. package/dist/src/prompt/builder.js.map +1 -0
  99. package/dist/src/routes/browser.js +126 -0
  100. package/dist/src/routes/browser.js.map +1 -0
  101. package/dist/src/routes/quota.js +94 -0
  102. package/dist/src/routes/quota.js.map +1 -0
  103. package/dist/src/security/decode.js +23 -0
  104. package/dist/src/security/decode.js.map +1 -0
  105. package/dist/src/security/path-guards.js +62 -0
  106. package/dist/src/security/path-guards.js.map +1 -0
  107. package/dist/src/telegram/bot.js +469 -0
  108. package/dist/src/telegram/bot.js.map +1 -0
  109. package/dist/src/telegram/forwarder.js +93 -0
  110. package/dist/src/telegram/forwarder.js.map +1 -0
  111. package/package.json +80 -0
  112. package/public/css/chat.css +571 -0
  113. package/public/css/layout.css +350 -0
  114. package/public/css/markdown.css +270 -0
  115. package/public/css/modals.css +172 -0
  116. package/public/css/sidebar.css +225 -0
  117. package/public/css/variables.css +142 -0
  118. package/public/index.html +470 -0
  119. package/public/js/api.js +55 -0
  120. package/public/js/constants.js +119 -0
  121. package/public/js/features/appname.js +43 -0
  122. package/public/js/features/chat.js +242 -0
  123. package/public/js/features/employees.js +120 -0
  124. package/public/js/features/heartbeat.js +80 -0
  125. package/public/js/features/i18n.js +125 -0
  126. package/public/js/features/memory.js +85 -0
  127. package/public/js/features/settings.js +512 -0
  128. package/public/js/features/sidebar.js +88 -0
  129. package/public/js/features/skills.js +68 -0
  130. package/public/js/features/slash-commands.js +231 -0
  131. package/public/js/features/theme.js +40 -0
  132. package/public/js/locale.js +23 -0
  133. package/public/js/main.js +281 -0
  134. package/public/js/render.js +294 -0
  135. package/public/js/state.js +16 -0
  136. package/public/js/ui.js +172 -0
  137. package/public/js/ws.js +76 -0
  138. package/public/locales/en.json +180 -0
  139. package/public/locales/ko.json +180 -0
  140. package/public/theme-test.html +545 -0
  141. package/skills_ref/1password/SKILL.md +70 -0
  142. package/skills_ref/agents-sdk/SKILL.md +155 -0
  143. package/skills_ref/agents-sdk/references/callable.md +92 -0
  144. package/skills_ref/agents-sdk/references/codemode.md +207 -0
  145. package/skills_ref/agents-sdk/references/email.md +146 -0
  146. package/skills_ref/agents-sdk/references/mcp.md +154 -0
  147. package/skills_ref/agents-sdk/references/state-scheduling.md +164 -0
  148. package/skills_ref/agents-sdk/references/streaming-chat.md +178 -0
  149. package/skills_ref/agents-sdk/references/workflows.md +132 -0
  150. package/skills_ref/algorithmic-art/LICENSE.txt +202 -0
  151. package/skills_ref/algorithmic-art/SKILL.md +405 -0
  152. package/skills_ref/algorithmic-art/templates/generator_template.js +223 -0
  153. package/skills_ref/algorithmic-art/templates/viewer.html +599 -0
  154. package/skills_ref/apple-notes/SKILL.md +77 -0
  155. package/skills_ref/apple-reminders/SKILL.md +118 -0
  156. package/skills_ref/atlas/SKILL.md +99 -0
  157. package/skills_ref/brainstorming/SKILL.md +96 -0
  158. package/skills_ref/browser/SKILL.md +179 -0
  159. package/skills_ref/canvas-design/LICENSE.txt +202 -0
  160. package/skills_ref/canvas-design/SKILL.md +130 -0
  161. package/skills_ref/canvas-design/canvas-fonts/ArsenalSC-OFL.txt +93 -0
  162. package/skills_ref/canvas-design/canvas-fonts/ArsenalSC-Regular.ttf +0 -0
  163. package/skills_ref/canvas-design/canvas-fonts/BigShoulders-Bold.ttf +0 -0
  164. package/skills_ref/canvas-design/canvas-fonts/BigShoulders-OFL.txt +93 -0
  165. package/skills_ref/canvas-design/canvas-fonts/BigShoulders-Regular.ttf +0 -0
  166. package/skills_ref/canvas-design/canvas-fonts/Boldonse-OFL.txt +93 -0
  167. package/skills_ref/canvas-design/canvas-fonts/Boldonse-Regular.ttf +0 -0
  168. package/skills_ref/canvas-design/canvas-fonts/BricolageGrotesque-Bold.ttf +0 -0
  169. package/skills_ref/canvas-design/canvas-fonts/BricolageGrotesque-OFL.txt +93 -0
  170. package/skills_ref/canvas-design/canvas-fonts/BricolageGrotesque-Regular.ttf +0 -0
  171. package/skills_ref/canvas-design/canvas-fonts/CrimsonPro-Bold.ttf +0 -0
  172. package/skills_ref/canvas-design/canvas-fonts/CrimsonPro-Italic.ttf +0 -0
  173. package/skills_ref/canvas-design/canvas-fonts/CrimsonPro-OFL.txt +93 -0
  174. package/skills_ref/canvas-design/canvas-fonts/CrimsonPro-Regular.ttf +0 -0
  175. package/skills_ref/canvas-design/canvas-fonts/DMMono-OFL.txt +93 -0
  176. package/skills_ref/canvas-design/canvas-fonts/DMMono-Regular.ttf +0 -0
  177. package/skills_ref/canvas-design/canvas-fonts/EricaOne-OFL.txt +94 -0
  178. package/skills_ref/canvas-design/canvas-fonts/EricaOne-Regular.ttf +0 -0
  179. package/skills_ref/canvas-design/canvas-fonts/GeistMono-Bold.ttf +0 -0
  180. package/skills_ref/canvas-design/canvas-fonts/GeistMono-OFL.txt +93 -0
  181. package/skills_ref/canvas-design/canvas-fonts/GeistMono-Regular.ttf +0 -0
  182. package/skills_ref/canvas-design/canvas-fonts/Gloock-OFL.txt +93 -0
  183. package/skills_ref/canvas-design/canvas-fonts/Gloock-Regular.ttf +0 -0
  184. package/skills_ref/canvas-design/canvas-fonts/IBMPlexMono-Bold.ttf +0 -0
  185. package/skills_ref/canvas-design/canvas-fonts/IBMPlexMono-OFL.txt +93 -0
  186. package/skills_ref/canvas-design/canvas-fonts/IBMPlexMono-Regular.ttf +0 -0
  187. package/skills_ref/canvas-design/canvas-fonts/IBMPlexSerif-Bold.ttf +0 -0
  188. package/skills_ref/canvas-design/canvas-fonts/IBMPlexSerif-BoldItalic.ttf +0 -0
  189. package/skills_ref/canvas-design/canvas-fonts/IBMPlexSerif-Italic.ttf +0 -0
  190. package/skills_ref/canvas-design/canvas-fonts/IBMPlexSerif-Regular.ttf +0 -0
  191. package/skills_ref/canvas-design/canvas-fonts/InstrumentSans-Bold.ttf +0 -0
  192. package/skills_ref/canvas-design/canvas-fonts/InstrumentSans-BoldItalic.ttf +0 -0
  193. package/skills_ref/canvas-design/canvas-fonts/InstrumentSans-Italic.ttf +0 -0
  194. package/skills_ref/canvas-design/canvas-fonts/InstrumentSans-OFL.txt +93 -0
  195. package/skills_ref/canvas-design/canvas-fonts/InstrumentSans-Regular.ttf +0 -0
  196. package/skills_ref/canvas-design/canvas-fonts/InstrumentSerif-Italic.ttf +0 -0
  197. package/skills_ref/canvas-design/canvas-fonts/InstrumentSerif-Regular.ttf +0 -0
  198. package/skills_ref/canvas-design/canvas-fonts/Italiana-OFL.txt +93 -0
  199. package/skills_ref/canvas-design/canvas-fonts/Italiana-Regular.ttf +0 -0
  200. package/skills_ref/canvas-design/canvas-fonts/JetBrainsMono-Bold.ttf +0 -0
  201. package/skills_ref/canvas-design/canvas-fonts/JetBrainsMono-OFL.txt +93 -0
  202. package/skills_ref/canvas-design/canvas-fonts/JetBrainsMono-Regular.ttf +0 -0
  203. package/skills_ref/canvas-design/canvas-fonts/Jura-Light.ttf +0 -0
  204. package/skills_ref/canvas-design/canvas-fonts/Jura-Medium.ttf +0 -0
  205. package/skills_ref/canvas-design/canvas-fonts/Jura-OFL.txt +93 -0
  206. package/skills_ref/canvas-design/canvas-fonts/LibreBaskerville-OFL.txt +93 -0
  207. package/skills_ref/canvas-design/canvas-fonts/LibreBaskerville-Regular.ttf +0 -0
  208. package/skills_ref/canvas-design/canvas-fonts/Lora-Bold.ttf +0 -0
  209. package/skills_ref/canvas-design/canvas-fonts/Lora-BoldItalic.ttf +0 -0
  210. package/skills_ref/canvas-design/canvas-fonts/Lora-Italic.ttf +0 -0
  211. package/skills_ref/canvas-design/canvas-fonts/Lora-OFL.txt +93 -0
  212. package/skills_ref/canvas-design/canvas-fonts/Lora-Regular.ttf +0 -0
  213. package/skills_ref/canvas-design/canvas-fonts/NationalPark-Bold.ttf +0 -0
  214. package/skills_ref/canvas-design/canvas-fonts/NationalPark-OFL.txt +93 -0
  215. package/skills_ref/canvas-design/canvas-fonts/NationalPark-Regular.ttf +0 -0
  216. package/skills_ref/canvas-design/canvas-fonts/NothingYouCouldDo-OFL.txt +93 -0
  217. package/skills_ref/canvas-design/canvas-fonts/NothingYouCouldDo-Regular.ttf +0 -0
  218. package/skills_ref/canvas-design/canvas-fonts/Outfit-Bold.ttf +0 -0
  219. package/skills_ref/canvas-design/canvas-fonts/Outfit-OFL.txt +93 -0
  220. package/skills_ref/canvas-design/canvas-fonts/Outfit-Regular.ttf +0 -0
  221. package/skills_ref/canvas-design/canvas-fonts/PixelifySans-Medium.ttf +0 -0
  222. package/skills_ref/canvas-design/canvas-fonts/PixelifySans-OFL.txt +93 -0
  223. package/skills_ref/canvas-design/canvas-fonts/PoiretOne-OFL.txt +93 -0
  224. package/skills_ref/canvas-design/canvas-fonts/PoiretOne-Regular.ttf +0 -0
  225. package/skills_ref/canvas-design/canvas-fonts/RedHatMono-Bold.ttf +0 -0
  226. package/skills_ref/canvas-design/canvas-fonts/RedHatMono-OFL.txt +93 -0
  227. package/skills_ref/canvas-design/canvas-fonts/RedHatMono-Regular.ttf +0 -0
  228. package/skills_ref/canvas-design/canvas-fonts/Silkscreen-OFL.txt +93 -0
  229. package/skills_ref/canvas-design/canvas-fonts/Silkscreen-Regular.ttf +0 -0
  230. package/skills_ref/canvas-design/canvas-fonts/SmoochSans-Medium.ttf +0 -0
  231. package/skills_ref/canvas-design/canvas-fonts/SmoochSans-OFL.txt +93 -0
  232. package/skills_ref/canvas-design/canvas-fonts/Tektur-Medium.ttf +0 -0
  233. package/skills_ref/canvas-design/canvas-fonts/Tektur-OFL.txt +93 -0
  234. package/skills_ref/canvas-design/canvas-fonts/Tektur-Regular.ttf +0 -0
  235. package/skills_ref/canvas-design/canvas-fonts/WorkSans-Bold.ttf +0 -0
  236. package/skills_ref/canvas-design/canvas-fonts/WorkSans-BoldItalic.ttf +0 -0
  237. package/skills_ref/canvas-design/canvas-fonts/WorkSans-Italic.ttf +0 -0
  238. package/skills_ref/canvas-design/canvas-fonts/WorkSans-OFL.txt +93 -0
  239. package/skills_ref/canvas-design/canvas-fonts/WorkSans-Regular.ttf +0 -0
  240. package/skills_ref/canvas-design/canvas-fonts/YoungSerif-OFL.txt +93 -0
  241. package/skills_ref/canvas-design/canvas-fonts/YoungSerif-Regular.ttf +0 -0
  242. package/skills_ref/changelog-generator/SKILL.md +104 -0
  243. package/skills_ref/cloudflare-deploy/SKILL.md +207 -0
  244. package/skills_ref/codebase-orientation/SKILL.md +29 -0
  245. package/skills_ref/config-file-explainer/SKILL.md +26 -0
  246. package/skills_ref/context-compression/SKILL.md +265 -0
  247. package/skills_ref/context-compression/references/evaluation-framework.md +213 -0
  248. package/skills_ref/context-compression/scripts/compression_evaluator.py +658 -0
  249. package/skills_ref/data-structure-chooser/SKILL.md +26 -0
  250. package/skills_ref/debugging-checklist/SKILL.md +26 -0
  251. package/skills_ref/debugging-helpers/CREATION-LOG.md +119 -0
  252. package/skills_ref/debugging-helpers/SKILL.md +296 -0
  253. package/skills_ref/debugging-helpers/condition-based-waiting-example.ts +158 -0
  254. package/skills_ref/debugging-helpers/condition-based-waiting.md +115 -0
  255. package/skills_ref/debugging-helpers/defense-in-depth.md +122 -0
  256. package/skills_ref/debugging-helpers/find-polluter.sh +63 -0
  257. package/skills_ref/debugging-helpers/root-cause-tracing.md +169 -0
  258. package/skills_ref/debugging-helpers/test-academic.md +14 -0
  259. package/skills_ref/debugging-helpers/test-pressure-1.md +58 -0
  260. package/skills_ref/debugging-helpers/test-pressure-2.md +68 -0
  261. package/skills_ref/debugging-helpers/test-pressure-3.md +69 -0
  262. package/skills_ref/deep-research/.env.example +7 -0
  263. package/skills_ref/deep-research/README.md +246 -0
  264. package/skills_ref/deep-research/SKILL.md +106 -0
  265. package/skills_ref/deep-research/requirements.txt +2 -0
  266. package/skills_ref/deep-research/scripts/research.py +692 -0
  267. package/skills_ref/dependency-install-helper/SKILL.md +26 -0
  268. package/skills_ref/dev/SKILL.md +65 -0
  269. package/skills_ref/dev-backend/SKILL.md +61 -0
  270. package/skills_ref/dev-data/SKILL.md +76 -0
  271. package/skills_ref/dev-frontend/LICENSE.txt +177 -0
  272. package/skills_ref/dev-frontend/SKILL.md +42 -0
  273. package/skills_ref/dev-testing/LICENSE.txt +202 -0
  274. package/skills_ref/dev-testing/SKILL.md +96 -0
  275. package/skills_ref/dev-testing/examples/console_logging.py +35 -0
  276. package/skills_ref/dev-testing/examples/element_discovery.py +40 -0
  277. package/skills_ref/dev-testing/examples/static_html_automation.py +33 -0
  278. package/skills_ref/dev-testing/scripts/with_server.py +106 -0
  279. package/skills_ref/develop-web-game/SKILL.md +149 -0
  280. package/skills_ref/differential-review/.claude-plugin/plugin.json +10 -0
  281. package/skills_ref/differential-review/README.md +109 -0
  282. package/skills_ref/differential-review/commands/diff-review.md +21 -0
  283. package/skills_ref/differential-review/skills/differential-review/SKILL.md +220 -0
  284. package/skills_ref/differential-review/skills/differential-review/adversarial.md +203 -0
  285. package/skills_ref/differential-review/skills/differential-review/methodology.md +234 -0
  286. package/skills_ref/differential-review/skills/differential-review/patterns.md +300 -0
  287. package/skills_ref/differential-review/skills/differential-review/reporting.md +369 -0
  288. package/skills_ref/dispatching-parallel-agents/SKILL.md +180 -0
  289. package/skills_ref/doc-coauthoring/SKILL.md +375 -0
  290. package/skills_ref/docx/LICENSE.txt +30 -0
  291. package/skills_ref/docx/SKILL.md +481 -0
  292. package/skills_ref/docx/scripts/__init__.py +1 -0
  293. package/skills_ref/docx/scripts/accept_changes.py +135 -0
  294. package/skills_ref/docx/scripts/comment.py +318 -0
  295. package/skills_ref/docx/scripts/office/helpers/__init__.py +0 -0
  296. package/skills_ref/docx/scripts/office/helpers/merge_runs.py +199 -0
  297. package/skills_ref/docx/scripts/office/helpers/simplify_redlines.py +197 -0
  298. package/skills_ref/docx/scripts/office/pack.py +159 -0
  299. package/skills_ref/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
  300. package/skills_ref/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
  301. package/skills_ref/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
  302. package/skills_ref/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
  303. package/skills_ref/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
  304. package/skills_ref/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
  305. package/skills_ref/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
  306. package/skills_ref/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
  307. package/skills_ref/docx/scripts/office/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
  308. package/skills_ref/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
  309. package/skills_ref/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
  310. package/skills_ref/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
  311. package/skills_ref/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
  312. package/skills_ref/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
  313. package/skills_ref/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
  314. package/skills_ref/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
  315. package/skills_ref/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
  316. package/skills_ref/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
  317. package/skills_ref/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
  318. package/skills_ref/docx/scripts/office/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
  319. package/skills_ref/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
  320. package/skills_ref/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
  321. package/skills_ref/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
  322. package/skills_ref/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
  323. package/skills_ref/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
  324. package/skills_ref/docx/scripts/office/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
  325. package/skills_ref/docx/scripts/office/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
  326. package/skills_ref/docx/scripts/office/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
  327. package/skills_ref/docx/scripts/office/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
  328. package/skills_ref/docx/scripts/office/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
  329. package/skills_ref/docx/scripts/office/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
  330. package/skills_ref/docx/scripts/office/schemas/mce/mc.xsd +75 -0
  331. package/skills_ref/docx/scripts/office/schemas/microsoft/wml-2010.xsd +560 -0
  332. package/skills_ref/docx/scripts/office/schemas/microsoft/wml-2012.xsd +67 -0
  333. package/skills_ref/docx/scripts/office/schemas/microsoft/wml-2018.xsd +14 -0
  334. package/skills_ref/docx/scripts/office/schemas/microsoft/wml-cex-2018.xsd +20 -0
  335. package/skills_ref/docx/scripts/office/schemas/microsoft/wml-cid-2016.xsd +13 -0
  336. package/skills_ref/docx/scripts/office/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
  337. package/skills_ref/docx/scripts/office/schemas/microsoft/wml-symex-2015.xsd +8 -0
  338. package/skills_ref/docx/scripts/office/soffice.py +183 -0
  339. package/skills_ref/docx/scripts/office/unpack.py +132 -0
  340. package/skills_ref/docx/scripts/office/validate.py +111 -0
  341. package/skills_ref/docx/scripts/office/validators/__init__.py +15 -0
  342. package/skills_ref/docx/scripts/office/validators/base.py +847 -0
  343. package/skills_ref/docx/scripts/office/validators/docx.py +446 -0
  344. package/skills_ref/docx/scripts/office/validators/pptx.py +275 -0
  345. package/skills_ref/docx/scripts/office/validators/redlining.py +247 -0
  346. package/skills_ref/docx/scripts/templates/comments.xml +3 -0
  347. package/skills_ref/docx/scripts/templates/commentsExtended.xml +3 -0
  348. package/skills_ref/docx/scripts/templates/commentsExtensible.xml +3 -0
  349. package/skills_ref/docx/scripts/templates/commentsIds.xml +3 -0
  350. package/skills_ref/docx/scripts/templates/people.xml +3 -0
  351. package/skills_ref/durable-objects/SKILL.md +186 -0
  352. package/skills_ref/durable-objects/references/rules.md +286 -0
  353. package/skills_ref/durable-objects/references/testing.md +264 -0
  354. package/skills_ref/durable-objects/references/workers.md +346 -0
  355. package/skills_ref/email-draft-polish/SKILL.md +24 -0
  356. package/skills_ref/error-message-explainer/SKILL.md +27 -0
  357. package/skills_ref/fal-image-edit/SKILL.md +249 -0
  358. package/skills_ref/fal-image-edit/scripts/edit-image.sh +199 -0
  359. package/skills_ref/figma-implement-design/SKILL.md +264 -0
  360. package/skills_ref/git-worktrees/SKILL.md +218 -0
  361. package/skills_ref/github/SKILL.md +210 -0
  362. package/skills_ref/gog/SKILL.md +116 -0
  363. package/skills_ref/goplaces/SKILL.md +52 -0
  364. package/skills_ref/himalaya/SKILL.md +257 -0
  365. package/skills_ref/hugging-face-cli/SKILL.md +186 -0
  366. package/skills_ref/hugging-face-cli/references/commands.md +954 -0
  367. package/skills_ref/hugging-face-cli/references/examples.md +374 -0
  368. package/skills_ref/hugging-face-evaluation/SKILL.md +651 -0
  369. package/skills_ref/hugging-face-evaluation/examples/.env.example +7 -0
  370. package/skills_ref/hugging-face-evaluation/examples/USAGE_EXAMPLES.md +382 -0
  371. package/skills_ref/hugging-face-evaluation/examples/artificial_analysis_to_hub.py +141 -0
  372. package/skills_ref/hugging-face-evaluation/examples/example_readme_tables.md +135 -0
  373. package/skills_ref/hugging-face-evaluation/examples/metric_mapping.json +50 -0
  374. package/skills_ref/hugging-face-evaluation/requirements.txt +20 -0
  375. package/skills_ref/hugging-face-evaluation/scripts/evaluation_manager.py +1374 -0
  376. package/skills_ref/hugging-face-evaluation/scripts/inspect_eval_uv.py +104 -0
  377. package/skills_ref/hugging-face-evaluation/scripts/inspect_vllm_uv.py +317 -0
  378. package/skills_ref/hugging-face-evaluation/scripts/lighteval_vllm_uv.py +303 -0
  379. package/skills_ref/hugging-face-evaluation/scripts/run_eval_job.py +98 -0
  380. package/skills_ref/hugging-face-evaluation/scripts/run_vllm_eval_job.py +331 -0
  381. package/skills_ref/hugging-face-evaluation/scripts/test_extraction.py +206 -0
  382. package/skills_ref/hugging-face-model-trainer/SKILL.md +718 -0
  383. package/skills_ref/hugging-face-model-trainer/references/gguf_conversion.md +296 -0
  384. package/skills_ref/hugging-face-model-trainer/references/hardware_guide.md +283 -0
  385. package/skills_ref/hugging-face-model-trainer/references/hub_saving.md +364 -0
  386. package/skills_ref/hugging-face-model-trainer/references/reliability_principles.md +371 -0
  387. package/skills_ref/hugging-face-model-trainer/references/trackio_guide.md +189 -0
  388. package/skills_ref/hugging-face-model-trainer/references/training_methods.md +150 -0
  389. package/skills_ref/hugging-face-model-trainer/references/training_patterns.md +203 -0
  390. package/skills_ref/hugging-face-model-trainer/references/troubleshooting.md +282 -0
  391. package/skills_ref/hugging-face-model-trainer/references/unsloth.md +313 -0
  392. package/skills_ref/hugging-face-model-trainer/scripts/convert_to_gguf.py +424 -0
  393. package/skills_ref/hugging-face-model-trainer/scripts/dataset_inspector.py +417 -0
  394. package/skills_ref/hugging-face-model-trainer/scripts/estimate_cost.py +150 -0
  395. package/skills_ref/hugging-face-model-trainer/scripts/train_dpo_example.py +106 -0
  396. package/skills_ref/hugging-face-model-trainer/scripts/train_grpo_example.py +89 -0
  397. package/skills_ref/hugging-face-model-trainer/scripts/train_sft_example.py +122 -0
  398. package/skills_ref/hugging-face-model-trainer/scripts/unsloth_sft_example.py +512 -0
  399. package/skills_ref/imagegen/SKILL.md +174 -0
  400. package/skills_ref/insecure-defaults/.claude-plugin/plugin.json +10 -0
  401. package/skills_ref/insecure-defaults/README.md +45 -0
  402. package/skills_ref/insecure-defaults/skills/insecure-defaults/SKILL.md +117 -0
  403. package/skills_ref/insecure-defaults/skills/insecure-defaults/references/examples.md +409 -0
  404. package/skills_ref/jupyter-notebook/SKILL.md +107 -0
  405. package/skills_ref/linear/SKILL.md +87 -0
  406. package/skills_ref/linter-fix-guide/SKILL.md +27 -0
  407. package/skills_ref/log-summarizer/SKILL.md +27 -0
  408. package/skills_ref/mcp-builder/LICENSE.txt +202 -0
  409. package/skills_ref/mcp-builder/SKILL.md +236 -0
  410. package/skills_ref/mcp-builder/reference/evaluation.md +602 -0
  411. package/skills_ref/mcp-builder/reference/mcp_best_practices.md +249 -0
  412. package/skills_ref/mcp-builder/reference/node_mcp_server.md +970 -0
  413. package/skills_ref/mcp-builder/reference/python_mcp_server.md +719 -0
  414. package/skills_ref/mcp-builder/scripts/connections.py +151 -0
  415. package/skills_ref/mcp-builder/scripts/evaluation.py +373 -0
  416. package/skills_ref/mcp-builder/scripts/example_evaluation.xml +22 -0
  417. package/skills_ref/mcp-builder/scripts/requirements.txt +2 -0
  418. package/skills_ref/memory/SKILL.md +129 -0
  419. package/skills_ref/modern-python/.claude-plugin/plugin.json +10 -0
  420. package/skills_ref/modern-python/README.md +66 -0
  421. package/skills_ref/modern-python/hooks/hooks.json +16 -0
  422. package/skills_ref/modern-python/hooks/setup-shims.bats +70 -0
  423. package/skills_ref/modern-python/hooks/setup-shims.sh +24 -0
  424. package/skills_ref/modern-python/hooks/shims/pip +27 -0
  425. package/skills_ref/modern-python/hooks/shims/pip-shim.bats +45 -0
  426. package/skills_ref/modern-python/hooks/shims/pip3 +27 -0
  427. package/skills_ref/modern-python/hooks/shims/pipx +41 -0
  428. package/skills_ref/modern-python/hooks/shims/pipx-shim.bats +64 -0
  429. package/skills_ref/modern-python/hooks/shims/python +26 -0
  430. package/skills_ref/modern-python/hooks/shims/python-shim.bats +53 -0
  431. package/skills_ref/modern-python/hooks/shims/python3 +26 -0
  432. package/skills_ref/modern-python/hooks/shims/uv +27 -0
  433. package/skills_ref/modern-python/hooks/shims/uv-shim.bats +47 -0
  434. package/skills_ref/modern-python/skills/modern-python/SKILL.md +333 -0
  435. package/skills_ref/modern-python/skills/modern-python/references/dependabot.md +43 -0
  436. package/skills_ref/modern-python/skills/modern-python/references/migration-checklist.md +141 -0
  437. package/skills_ref/modern-python/skills/modern-python/references/pep723-scripts.md +259 -0
  438. package/skills_ref/modern-python/skills/modern-python/references/prek.md +211 -0
  439. package/skills_ref/modern-python/skills/modern-python/references/pyproject.md +254 -0
  440. package/skills_ref/modern-python/skills/modern-python/references/ruff-config.md +240 -0
  441. package/skills_ref/modern-python/skills/modern-python/references/security-setup.md +255 -0
  442. package/skills_ref/modern-python/skills/modern-python/references/testing.md +284 -0
  443. package/skills_ref/modern-python/skills/modern-python/references/uv-commands.md +200 -0
  444. package/skills_ref/modern-python/skills/modern-python/templates/dependabot.yml +36 -0
  445. package/skills_ref/modern-python/skills/modern-python/templates/pre-commit-config.yaml +66 -0
  446. package/skills_ref/nano-banana-pro/SKILL.md +58 -0
  447. package/skills_ref/netlify-deploy/SKILL.md +233 -0
  448. package/skills_ref/notion/SKILL.md +304 -0
  449. package/skills_ref/notion-knowledge-capture/SKILL.md +56 -0
  450. package/skills_ref/notion-meeting-intelligence/SKILL.md +60 -0
  451. package/skills_ref/notion-research-documentation/SKILL.md +59 -0
  452. package/skills_ref/notion-spec-to-implementation/SKILL.md +58 -0
  453. package/skills_ref/obsidian/SKILL.md +81 -0
  454. package/skills_ref/openai-docs/SKILL.md +56 -0
  455. package/skills_ref/openhue/SKILL.md +112 -0
  456. package/skills_ref/pdf/SKILL.md +69 -0
  457. package/skills_ref/postgres/README.md +77 -0
  458. package/skills_ref/postgres/SKILL.md +129 -0
  459. package/skills_ref/postgres/connections.example.json +34 -0
  460. package/skills_ref/postgres/requirements.txt +1 -0
  461. package/skills_ref/postgres/scripts/query.py +262 -0
  462. package/skills_ref/pptx/LICENSE.txt +30 -0
  463. package/skills_ref/pptx/SKILL.md +232 -0
  464. package/skills_ref/pptx/editing.md +205 -0
  465. package/skills_ref/pptx/pptxgenjs.md +420 -0
  466. package/skills_ref/pptx/scripts/__init__.py +0 -0
  467. package/skills_ref/pptx/scripts/add_slide.py +195 -0
  468. package/skills_ref/pptx/scripts/clean.py +286 -0
  469. package/skills_ref/pptx/scripts/office/helpers/__init__.py +0 -0
  470. package/skills_ref/pptx/scripts/office/helpers/merge_runs.py +199 -0
  471. package/skills_ref/pptx/scripts/office/helpers/simplify_redlines.py +197 -0
  472. package/skills_ref/pptx/scripts/office/pack.py +159 -0
  473. package/skills_ref/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
  474. package/skills_ref/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
  475. package/skills_ref/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
  476. package/skills_ref/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
  477. package/skills_ref/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
  478. package/skills_ref/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
  479. package/skills_ref/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
  480. package/skills_ref/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
  481. package/skills_ref/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
  482. package/skills_ref/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
  483. package/skills_ref/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
  484. package/skills_ref/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
  485. package/skills_ref/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
  486. package/skills_ref/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
  487. package/skills_ref/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
  488. package/skills_ref/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
  489. package/skills_ref/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
  490. package/skills_ref/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
  491. package/skills_ref/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
  492. package/skills_ref/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
  493. package/skills_ref/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
  494. package/skills_ref/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
  495. package/skills_ref/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
  496. package/skills_ref/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
  497. package/skills_ref/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
  498. package/skills_ref/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
  499. package/skills_ref/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
  500. package/skills_ref/pptx/scripts/office/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
  501. package/skills_ref/pptx/scripts/office/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
  502. package/skills_ref/pptx/scripts/office/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
  503. package/skills_ref/pptx/scripts/office/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
  504. package/skills_ref/pptx/scripts/office/schemas/mce/mc.xsd +75 -0
  505. package/skills_ref/pptx/scripts/office/schemas/microsoft/wml-2010.xsd +560 -0
  506. package/skills_ref/pptx/scripts/office/schemas/microsoft/wml-2012.xsd +67 -0
  507. package/skills_ref/pptx/scripts/office/schemas/microsoft/wml-2018.xsd +14 -0
  508. package/skills_ref/pptx/scripts/office/schemas/microsoft/wml-cex-2018.xsd +20 -0
  509. package/skills_ref/pptx/scripts/office/schemas/microsoft/wml-cid-2016.xsd +13 -0
  510. package/skills_ref/pptx/scripts/office/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
  511. package/skills_ref/pptx/scripts/office/schemas/microsoft/wml-symex-2015.xsd +8 -0
  512. package/skills_ref/pptx/scripts/office/soffice.py +183 -0
  513. package/skills_ref/pptx/scripts/office/unpack.py +132 -0
  514. package/skills_ref/pptx/scripts/office/validate.py +111 -0
  515. package/skills_ref/pptx/scripts/office/validators/__init__.py +15 -0
  516. package/skills_ref/pptx/scripts/office/validators/base.py +847 -0
  517. package/skills_ref/pptx/scripts/office/validators/docx.py +446 -0
  518. package/skills_ref/pptx/scripts/office/validators/pptx.py +275 -0
  519. package/skills_ref/pptx/scripts/office/validators/redlining.py +247 -0
  520. package/skills_ref/pptx/scripts/thumbnail.py +289 -0
  521. package/skills_ref/property-based-testing/.claude-plugin/plugin.json +9 -0
  522. package/skills_ref/property-based-testing/README.md +47 -0
  523. package/skills_ref/property-based-testing/skills/property-based-testing/README.md +88 -0
  524. package/skills_ref/property-based-testing/skills/property-based-testing/SKILL.md +123 -0
  525. package/skills_ref/property-based-testing/skills/property-based-testing/references/design.md +191 -0
  526. package/skills_ref/property-based-testing/skills/property-based-testing/references/generating.md +204 -0
  527. package/skills_ref/property-based-testing/skills/property-based-testing/references/interpreting-failures.md +239 -0
  528. package/skills_ref/property-based-testing/skills/property-based-testing/references/libraries.md +130 -0
  529. package/skills_ref/property-based-testing/skills/property-based-testing/references/refactoring.md +181 -0
  530. package/skills_ref/property-based-testing/skills/property-based-testing/references/reviewing.md +209 -0
  531. package/skills_ref/property-based-testing/skills/property-based-testing/references/strategies.md +124 -0
  532. package/skills_ref/react-best-practices/AGENTS.md +2934 -0
  533. package/skills_ref/react-best-practices/README.md +123 -0
  534. package/skills_ref/react-best-practices/SKILL.md +136 -0
  535. package/skills_ref/react-best-practices/metadata.json +15 -0
  536. package/skills_ref/react-best-practices/rules/_sections.md +46 -0
  537. package/skills_ref/react-best-practices/rules/_template.md +28 -0
  538. package/skills_ref/react-best-practices/rules/advanced-event-handler-refs.md +55 -0
  539. package/skills_ref/react-best-practices/rules/advanced-init-once.md +42 -0
  540. package/skills_ref/react-best-practices/rules/advanced-use-latest.md +39 -0
  541. package/skills_ref/react-best-practices/rules/async-api-routes.md +38 -0
  542. package/skills_ref/react-best-practices/rules/async-defer-await.md +80 -0
  543. package/skills_ref/react-best-practices/rules/async-dependencies.md +51 -0
  544. package/skills_ref/react-best-practices/rules/async-parallel.md +28 -0
  545. package/skills_ref/react-best-practices/rules/async-suspense-boundaries.md +99 -0
  546. package/skills_ref/react-best-practices/rules/bundle-barrel-imports.md +59 -0
  547. package/skills_ref/react-best-practices/rules/bundle-conditional.md +31 -0
  548. package/skills_ref/react-best-practices/rules/bundle-defer-third-party.md +49 -0
  549. package/skills_ref/react-best-practices/rules/bundle-dynamic-imports.md +35 -0
  550. package/skills_ref/react-best-practices/rules/bundle-preload.md +50 -0
  551. package/skills_ref/react-best-practices/rules/client-event-listeners.md +74 -0
  552. package/skills_ref/react-best-practices/rules/client-localstorage-schema.md +71 -0
  553. package/skills_ref/react-best-practices/rules/client-passive-event-listeners.md +48 -0
  554. package/skills_ref/react-best-practices/rules/client-swr-dedup.md +56 -0
  555. package/skills_ref/react-best-practices/rules/js-batch-dom-css.md +107 -0
  556. package/skills_ref/react-best-practices/rules/js-cache-function-results.md +80 -0
  557. package/skills_ref/react-best-practices/rules/js-cache-property-access.md +28 -0
  558. package/skills_ref/react-best-practices/rules/js-cache-storage.md +70 -0
  559. package/skills_ref/react-best-practices/rules/js-combine-iterations.md +32 -0
  560. package/skills_ref/react-best-practices/rules/js-early-exit.md +50 -0
  561. package/skills_ref/react-best-practices/rules/js-hoist-regexp.md +45 -0
  562. package/skills_ref/react-best-practices/rules/js-index-maps.md +37 -0
  563. package/skills_ref/react-best-practices/rules/js-length-check-first.md +49 -0
  564. package/skills_ref/react-best-practices/rules/js-min-max-loop.md +82 -0
  565. package/skills_ref/react-best-practices/rules/js-set-map-lookups.md +24 -0
  566. package/skills_ref/react-best-practices/rules/js-tosorted-immutable.md +57 -0
  567. package/skills_ref/react-best-practices/rules/rendering-activity.md +26 -0
  568. package/skills_ref/react-best-practices/rules/rendering-animate-svg-wrapper.md +47 -0
  569. package/skills_ref/react-best-practices/rules/rendering-conditional-render.md +40 -0
  570. package/skills_ref/react-best-practices/rules/rendering-content-visibility.md +38 -0
  571. package/skills_ref/react-best-practices/rules/rendering-hoist-jsx.md +46 -0
  572. package/skills_ref/react-best-practices/rules/rendering-hydration-no-flicker.md +82 -0
  573. package/skills_ref/react-best-practices/rules/rendering-hydration-suppress-warning.md +30 -0
  574. package/skills_ref/react-best-practices/rules/rendering-svg-precision.md +28 -0
  575. package/skills_ref/react-best-practices/rules/rendering-usetransition-loading.md +75 -0
  576. package/skills_ref/react-best-practices/rules/rerender-defer-reads.md +39 -0
  577. package/skills_ref/react-best-practices/rules/rerender-dependencies.md +45 -0
  578. package/skills_ref/react-best-practices/rules/rerender-derived-state-no-effect.md +40 -0
  579. package/skills_ref/react-best-practices/rules/rerender-derived-state.md +29 -0
  580. package/skills_ref/react-best-practices/rules/rerender-functional-setstate.md +74 -0
  581. package/skills_ref/react-best-practices/rules/rerender-lazy-state-init.md +58 -0
  582. package/skills_ref/react-best-practices/rules/rerender-memo-with-default-value.md +38 -0
  583. package/skills_ref/react-best-practices/rules/rerender-memo.md +44 -0
  584. package/skills_ref/react-best-practices/rules/rerender-move-effect-to-event.md +45 -0
  585. package/skills_ref/react-best-practices/rules/rerender-simple-expression-in-memo.md +35 -0
  586. package/skills_ref/react-best-practices/rules/rerender-transitions.md +40 -0
  587. package/skills_ref/react-best-practices/rules/rerender-use-ref-transient-values.md +73 -0
  588. package/skills_ref/react-best-practices/rules/server-after-nonblocking.md +73 -0
  589. package/skills_ref/react-best-practices/rules/server-auth-actions.md +96 -0
  590. package/skills_ref/react-best-practices/rules/server-cache-lru.md +41 -0
  591. package/skills_ref/react-best-practices/rules/server-cache-react.md +76 -0
  592. package/skills_ref/react-best-practices/rules/server-dedup-props.md +65 -0
  593. package/skills_ref/react-best-practices/rules/server-parallel-fetching.md +83 -0
  594. package/skills_ref/react-best-practices/rules/server-serialization.md +38 -0
  595. package/skills_ref/receiving-code-review/SKILL.md +213 -0
  596. package/skills_ref/registry.json +1493 -0
  597. package/skills_ref/render-deploy/SKILL.md +462 -0
  598. package/skills_ref/requesting-code-review/SKILL.md +105 -0
  599. package/skills_ref/requesting-code-review/code-reviewer.md +146 -0
  600. package/skills_ref/screen-capture/SKILL.md +162 -0
  601. package/skills_ref/security-best-practices/LICENSE.txt +201 -0
  602. package/skills_ref/security-best-practices/SKILL.md +86 -0
  603. package/skills_ref/security-best-practices/agents/openai.yaml +4 -0
  604. package/skills_ref/security-best-practices/references/golang-general-backend-security.md +826 -0
  605. package/skills_ref/security-best-practices/references/javascript-express-web-server-security.md +1158 -0
  606. package/skills_ref/security-best-practices/references/javascript-general-web-frontend-security.md +747 -0
  607. package/skills_ref/security-best-practices/references/javascript-jquery-web-frontend-security.md +678 -0
  608. package/skills_ref/security-best-practices/references/javascript-typescript-nextjs-web-server-security.md +1144 -0
  609. package/skills_ref/security-best-practices/references/javascript-typescript-react-web-frontend-security.md +990 -0
  610. package/skills_ref/security-best-practices/references/javascript-typescript-vue-web-frontend-security.md +791 -0
  611. package/skills_ref/security-best-practices/references/python-django-web-server-security.md +882 -0
  612. package/skills_ref/security-best-practices/references/python-fastapi-web-server-security.md +1036 -0
  613. package/skills_ref/security-best-practices/references/python-flask-web-server-security.md +705 -0
  614. package/skills_ref/security-ownership-map/LICENSE.txt +201 -0
  615. package/skills_ref/security-ownership-map/SKILL.md +206 -0
  616. package/skills_ref/security-ownership-map/agents/openai.yaml +4 -0
  617. package/skills_ref/security-ownership-map/references/neo4j-import.md +60 -0
  618. package/skills_ref/security-ownership-map/scripts/build_ownership_map.py +956 -0
  619. package/skills_ref/security-ownership-map/scripts/community_maintainers.py +544 -0
  620. package/skills_ref/security-ownership-map/scripts/query_ownership.py +483 -0
  621. package/skills_ref/security-ownership-map/scripts/run_ownership_map.py +200 -0
  622. package/skills_ref/security-threat-model/LICENSE.txt +201 -0
  623. package/skills_ref/security-threat-model/SKILL.md +81 -0
  624. package/skills_ref/security-threat-model/agents/openai.yaml +4 -0
  625. package/skills_ref/security-threat-model/references/prompt-template.md +255 -0
  626. package/skills_ref/security-threat-model/references/security-controls-and-assets.md +32 -0
  627. package/skills_ref/sentry/SKILL.md +123 -0
  628. package/skills_ref/skill-creator/SKILL.md +372 -0
  629. package/skills_ref/sora/SKILL.md +153 -0
  630. package/skills_ref/speech/SKILL.md +144 -0
  631. package/skills_ref/spotify-player/SKILL.md +64 -0
  632. package/skills_ref/static-analysis/.claude-plugin/plugin.json +8 -0
  633. package/skills_ref/static-analysis/README.md +65 -0
  634. package/skills_ref/static-analysis/agents/semgrep-scanner.md +71 -0
  635. package/skills_ref/static-analysis/agents/semgrep-triager.md +107 -0
  636. package/skills_ref/static-analysis/skills/codeql/SKILL.md +119 -0
  637. package/skills_ref/static-analysis/skills/codeql/references/diagnostic-query-templates.md +339 -0
  638. package/skills_ref/static-analysis/skills/codeql/references/language-details.md +207 -0
  639. package/skills_ref/static-analysis/skills/codeql/references/performance-tuning.md +111 -0
  640. package/skills_ref/static-analysis/skills/codeql/references/ruleset-catalog.md +63 -0
  641. package/skills_ref/static-analysis/skills/codeql/references/threat-models.md +44 -0
  642. package/skills_ref/static-analysis/skills/codeql/workflows/build-database.md +669 -0
  643. package/skills_ref/static-analysis/skills/codeql/workflows/create-data-extensions.md +536 -0
  644. package/skills_ref/static-analysis/skills/codeql/workflows/run-analysis.md +436 -0
  645. package/skills_ref/static-analysis/skills/sarif-parsing/SKILL.md +479 -0
  646. package/skills_ref/static-analysis/skills/sarif-parsing/resources/jq-queries.md +162 -0
  647. package/skills_ref/static-analysis/skills/sarif-parsing/resources/sarif_helpers.py +331 -0
  648. package/skills_ref/static-analysis/skills/semgrep/SKILL.md +431 -0
  649. package/skills_ref/static-analysis/skills/semgrep/references/rulesets.md +162 -0
  650. package/skills_ref/static-analysis/skills/semgrep/references/scanner-task-prompt.md +102 -0
  651. package/skills_ref/static-analysis/skills/semgrep/references/triage-task-prompt.md +122 -0
  652. package/skills_ref/static-analysis/skills/semgrep/scripts/merge_triaged_sarif.py +252 -0
  653. package/skills_ref/summarize/SKILL.md +87 -0
  654. package/skills_ref/tdd/SKILL.md +371 -0
  655. package/skills_ref/tdd/testing-anti-patterns.md +299 -0
  656. package/skills_ref/telegram-send/SKILL.md +99 -0
  657. package/skills_ref/terraform/README.md +105 -0
  658. package/skills_ref/terraform/code-generation/.claude-plugin/plugin.json +30 -0
  659. package/skills_ref/terraform/code-generation/skills/azure-verified-modules/SKILL.md +613 -0
  660. package/skills_ref/terraform/code-generation/skills/terraform-style-guide/SKILL.md +353 -0
  661. package/skills_ref/terraform/code-generation/skills/terraform-test/SKILL.md +1669 -0
  662. package/skills_ref/terraform/module-generation/.claude-plugin/plugin.json +30 -0
  663. package/skills_ref/terraform/module-generation/skills/refactor-module/SKILL.md +538 -0
  664. package/skills_ref/terraform/module-generation/skills/terraform-stacks/SKILL.md +468 -0
  665. package/skills_ref/terraform/module-generation/skills/terraform-stacks/references/api-monitoring.md +543 -0
  666. package/skills_ref/terraform/module-generation/skills/terraform-stacks/references/component-blocks.md +476 -0
  667. package/skills_ref/terraform/module-generation/skills/terraform-stacks/references/deployment-blocks.md +391 -0
  668. package/skills_ref/terraform/module-generation/skills/terraform-stacks/references/examples.md +1529 -0
  669. package/skills_ref/terraform/module-generation/skills/terraform-stacks/references/linked-stacks.md +187 -0
  670. package/skills_ref/terraform/module-generation/skills/terraform-stacks/references/troubleshooting.md +671 -0
  671. package/skills_ref/terraform/provider-development/.claude-plugin/plugin.json +13 -0
  672. package/skills_ref/terraform/provider-development/skills/new-terraform-provider/SKILL.md +25 -0
  673. package/skills_ref/terraform/provider-development/skills/new-terraform-provider/assets/main.go +40 -0
  674. package/skills_ref/terraform/provider-development/skills/provider-actions/SKILL.md +478 -0
  675. package/skills_ref/terraform/provider-development/skills/provider-resources/SKILL.md +599 -0
  676. package/skills_ref/terraform/provider-development/skills/run-acceptance-tests/SKILL.md +41 -0
  677. package/skills_ref/theme-factory/LICENSE.txt +202 -0
  678. package/skills_ref/theme-factory/SKILL.md +59 -0
  679. package/skills_ref/theme-factory/theme-showcase.pdf +0 -0
  680. package/skills_ref/theme-factory/themes/arctic-frost.md +19 -0
  681. package/skills_ref/theme-factory/themes/botanical-garden.md +19 -0
  682. package/skills_ref/theme-factory/themes/desert-rose.md +19 -0
  683. package/skills_ref/theme-factory/themes/forest-canopy.md +19 -0
  684. package/skills_ref/theme-factory/themes/golden-hour.md +19 -0
  685. package/skills_ref/theme-factory/themes/midnight-galaxy.md +19 -0
  686. package/skills_ref/theme-factory/themes/modern-minimalist.md +19 -0
  687. package/skills_ref/theme-factory/themes/ocean-depths.md +19 -0
  688. package/skills_ref/theme-factory/themes/sunset-boulevard.md +19 -0
  689. package/skills_ref/theme-factory/themes/tech-innovation.md +19 -0
  690. package/skills_ref/things-mac/SKILL.md +86 -0
  691. package/skills_ref/tmux/SKILL.md +153 -0
  692. package/skills_ref/transcribe/SKILL.md +81 -0
  693. package/skills_ref/trello/SKILL.md +95 -0
  694. package/skills_ref/tts/SKILL.md +99 -0
  695. package/skills_ref/vercel-deploy/SKILL.md +115 -0
  696. package/skills_ref/video-downloader/SKILL.md +99 -0
  697. package/skills_ref/video-downloader/scripts/download_video.py +145 -0
  698. package/skills_ref/video-frames/SKILL.md +46 -0
  699. package/skills_ref/vision-click/SKILL.md +128 -0
  700. package/skills_ref/weather/SKILL.md +112 -0
  701. package/skills_ref/web-artifacts-builder/LICENSE.txt +202 -0
  702. package/skills_ref/web-artifacts-builder/SKILL.md +74 -0
  703. package/skills_ref/web-artifacts-builder/scripts/bundle-artifact.sh +54 -0
  704. package/skills_ref/web-artifacts-builder/scripts/init-artifact.sh +322 -0
  705. package/skills_ref/web-artifacts-builder/scripts/shadcn-components.tar.gz +0 -0
  706. package/skills_ref/web-perf/SKILL.md +193 -0
  707. package/skills_ref/web-routing/SKILL.md +26 -0
  708. package/skills_ref/whatsapp/SKILL.md +255 -0
  709. package/skills_ref/whatsapp/assets/agent-app-integration-example.json +35 -0
  710. package/skills_ref/whatsapp/assets/databases-example.json +11 -0
  711. package/skills_ref/whatsapp/assets/function-decide-route-interactive-buttons.json +6 -0
  712. package/skills_ref/whatsapp/assets/functions-example.json +5 -0
  713. package/skills_ref/whatsapp/assets/workflow-agent-simple.json +31 -0
  714. package/skills_ref/whatsapp/assets/workflow-api-template-wait-agent.json +59 -0
  715. package/skills_ref/whatsapp/assets/workflow-customer-support-intake-agent.json +56 -0
  716. package/skills_ref/whatsapp/assets/workflow-decision.json +83 -0
  717. package/skills_ref/whatsapp/assets/workflow-interactive-buttons-decide-ai.json +89 -0
  718. package/skills_ref/whatsapp/assets/workflow-interactive-buttons-decide-function.json +88 -0
  719. package/skills_ref/whatsapp/assets/workflow-linear.json +53 -0
  720. package/skills_ref/whatsapp/package.json +10 -0
  721. package/skills_ref/whatsapp/references/app-integrations.md +89 -0
  722. package/skills_ref/whatsapp/references/databases-reference.md +21 -0
  723. package/skills_ref/whatsapp/references/execution-context.md +42 -0
  724. package/skills_ref/whatsapp/references/function-contracts.md +55 -0
  725. package/skills_ref/whatsapp/references/functions-payloads.md +87 -0
  726. package/skills_ref/whatsapp/references/functions-reference.md +133 -0
  727. package/skills_ref/whatsapp/references/graph-contract.md +145 -0
  728. package/skills_ref/whatsapp/references/node-types.md +430 -0
  729. package/skills_ref/whatsapp/references/triggers.md +20 -0
  730. package/skills_ref/whatsapp/references/workflow-overview.md +22 -0
  731. package/skills_ref/whatsapp/references/workflow-reference.md +123 -0
  732. package/skills_ref/whatsapp/scripts/configure-prop.js +113 -0
  733. package/skills_ref/whatsapp/scripts/create-connect-token.js +38 -0
  734. package/skills_ref/whatsapp/scripts/create-function.js +64 -0
  735. package/skills_ref/whatsapp/scripts/create-integration.js +137 -0
  736. package/skills_ref/whatsapp/scripts/create-row.js +47 -0
  737. package/skills_ref/whatsapp/scripts/create-trigger.js +88 -0
  738. package/skills_ref/whatsapp/scripts/create-workflow.js +85 -0
  739. package/skills_ref/whatsapp/scripts/delete-integration.js +44 -0
  740. package/skills_ref/whatsapp/scripts/delete-row.js +49 -0
  741. package/skills_ref/whatsapp/scripts/delete-trigger.js +44 -0
  742. package/skills_ref/whatsapp/scripts/deploy-function.js +47 -0
  743. package/skills_ref/whatsapp/scripts/edit-graph.js +289 -0
  744. package/skills_ref/whatsapp/scripts/get-action-schema.js +44 -0
  745. package/skills_ref/whatsapp/scripts/get-context-value.js +80 -0
  746. package/skills_ref/whatsapp/scripts/get-execution-event.js +55 -0
  747. package/skills_ref/whatsapp/scripts/get-execution.js +44 -0
  748. package/skills_ref/whatsapp/scripts/get-function.js +43 -0
  749. package/skills_ref/whatsapp/scripts/get-graph.js +85 -0
  750. package/skills_ref/whatsapp/scripts/get-table.js +45 -0
  751. package/skills_ref/whatsapp/scripts/get-workflow.js +44 -0
  752. package/skills_ref/whatsapp/scripts/invoke-function.js +60 -0
  753. package/skills_ref/whatsapp/scripts/lib/databases/args.js +87 -0
  754. package/skills_ref/whatsapp/scripts/lib/databases/filters.js +30 -0
  755. package/skills_ref/whatsapp/scripts/lib/databases/kapso-api.js +70 -0
  756. package/skills_ref/whatsapp/scripts/lib/functions/args.js +55 -0
  757. package/skills_ref/whatsapp/scripts/lib/functions/kapso-api.js +70 -0
  758. package/skills_ref/whatsapp/scripts/lib/workflows/args.js +53 -0
  759. package/skills_ref/whatsapp/scripts/lib/workflows/kapso-api.js +123 -0
  760. package/skills_ref/whatsapp/scripts/lib/workflows/result.js +16 -0
  761. package/skills_ref/whatsapp/scripts/list-accounts.js +62 -0
  762. package/skills_ref/whatsapp/scripts/list-apps.js +42 -0
  763. package/skills_ref/whatsapp/scripts/list-execution-events.js +61 -0
  764. package/skills_ref/whatsapp/scripts/list-executions.js +53 -0
  765. package/skills_ref/whatsapp/scripts/list-function-invocations.js +53 -0
  766. package/skills_ref/whatsapp/scripts/list-functions.js +41 -0
  767. package/skills_ref/whatsapp/scripts/list-integrations.js +41 -0
  768. package/skills_ref/whatsapp/scripts/list-provider-models.js +48 -0
  769. package/skills_ref/whatsapp/scripts/list-tables.js +41 -0
  770. package/skills_ref/whatsapp/scripts/list-triggers.js +44 -0
  771. package/skills_ref/whatsapp/scripts/list-whatsapp-phone-numbers.js +56 -0
  772. package/skills_ref/whatsapp/scripts/list-workflows.js +44 -0
  773. package/skills_ref/whatsapp/scripts/openapi-explore.mjs +1273 -0
  774. package/skills_ref/whatsapp/scripts/query-rows.js +71 -0
  775. package/skills_ref/whatsapp/scripts/reload-props.js +110 -0
  776. package/skills_ref/whatsapp/scripts/resume-execution.js +75 -0
  777. package/skills_ref/whatsapp/scripts/search-actions.js +64 -0
  778. package/skills_ref/whatsapp/scripts/update-execution-status.js +51 -0
  779. package/skills_ref/whatsapp/scripts/update-function.js +65 -0
  780. package/skills_ref/whatsapp/scripts/update-graph.js +154 -0
  781. package/skills_ref/whatsapp/scripts/update-integration.js +82 -0
  782. package/skills_ref/whatsapp/scripts/update-row.js +51 -0
  783. package/skills_ref/whatsapp/scripts/update-trigger.js +60 -0
  784. package/skills_ref/whatsapp/scripts/update-workflow-settings.js +67 -0
  785. package/skills_ref/whatsapp/scripts/upsert-row.js +64 -0
  786. package/skills_ref/whatsapp/scripts/validate-graph.js +293 -0
  787. package/skills_ref/whatsapp/scripts/variables-delete.js +37 -0
  788. package/skills_ref/whatsapp/scripts/variables-list.js +55 -0
  789. package/skills_ref/whatsapp/scripts/variables-set.js +39 -0
  790. package/skills_ref/writing-plans/SKILL.md +116 -0
  791. package/skills_ref/xlsx/LICENSE.txt +30 -0
  792. package/skills_ref/xlsx/SKILL.md +292 -0
  793. package/skills_ref/xlsx/scripts/office/helpers/__init__.py +0 -0
  794. package/skills_ref/xlsx/scripts/office/helpers/merge_runs.py +199 -0
  795. package/skills_ref/xlsx/scripts/office/helpers/simplify_redlines.py +197 -0
  796. package/skills_ref/xlsx/scripts/office/pack.py +159 -0
  797. package/skills_ref/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
  798. package/skills_ref/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
  799. package/skills_ref/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
  800. package/skills_ref/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
  801. package/skills_ref/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
  802. package/skills_ref/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
  803. package/skills_ref/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
  804. package/skills_ref/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
  805. package/skills_ref/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
  806. package/skills_ref/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
  807. package/skills_ref/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
  808. package/skills_ref/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
  809. package/skills_ref/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
  810. package/skills_ref/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
  811. package/skills_ref/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
  812. package/skills_ref/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
  813. package/skills_ref/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
  814. package/skills_ref/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
  815. package/skills_ref/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
  816. package/skills_ref/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
  817. package/skills_ref/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
  818. package/skills_ref/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
  819. package/skills_ref/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
  820. package/skills_ref/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
  821. package/skills_ref/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
  822. package/skills_ref/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
  823. package/skills_ref/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
  824. package/skills_ref/xlsx/scripts/office/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
  825. package/skills_ref/xlsx/scripts/office/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
  826. package/skills_ref/xlsx/scripts/office/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
  827. package/skills_ref/xlsx/scripts/office/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
  828. package/skills_ref/xlsx/scripts/office/schemas/mce/mc.xsd +75 -0
  829. package/skills_ref/xlsx/scripts/office/schemas/microsoft/wml-2010.xsd +560 -0
  830. package/skills_ref/xlsx/scripts/office/schemas/microsoft/wml-2012.xsd +67 -0
  831. package/skills_ref/xlsx/scripts/office/schemas/microsoft/wml-2018.xsd +14 -0
  832. package/skills_ref/xlsx/scripts/office/schemas/microsoft/wml-cex-2018.xsd +20 -0
  833. package/skills_ref/xlsx/scripts/office/schemas/microsoft/wml-cid-2016.xsd +13 -0
  834. package/skills_ref/xlsx/scripts/office/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
  835. package/skills_ref/xlsx/scripts/office/schemas/microsoft/wml-symex-2015.xsd +8 -0
  836. package/skills_ref/xlsx/scripts/office/soffice.py +183 -0
  837. package/skills_ref/xlsx/scripts/office/unpack.py +132 -0
  838. package/skills_ref/xlsx/scripts/office/validate.py +111 -0
  839. package/skills_ref/xlsx/scripts/office/validators/__init__.py +15 -0
  840. package/skills_ref/xlsx/scripts/office/validators/base.py +847 -0
  841. package/skills_ref/xlsx/scripts/office/validators/docx.py +446 -0
  842. package/skills_ref/xlsx/scripts/office/validators/pptx.py +275 -0
  843. package/skills_ref/xlsx/scripts/office/validators/redlining.py +247 -0
  844. package/skills_ref/xlsx/scripts/recalc.py +184 -0
  845. package/skills_ref/xurl/SKILL.md +461 -0
@@ -0,0 +1,1669 @@
1
+ ---
2
+ name: terraform-test
3
+ description: Comprehensive guide for writing and running Terraform tests. Use when creating test files (.tftest.hcl), writing test scenarios with run blocks, validating infrastructure behavior with assertions, mocking providers and data sources, testing module outputs and resource configurations, or troubleshooting Terraform test syntax and execution.
4
+ metadata:
5
+ copyright: Copyright IBM Corp. 2026
6
+ version: "0.0.1"
7
+ ---
8
+
9
+ # Terraform Test
10
+
11
+ Terraform's built-in testing framework enables module authors to validate that configuration updates don't introduce breaking changes. Tests execute against temporary resources, protecting existing infrastructure and state files.
12
+
13
+ ## Core Concepts
14
+
15
+ **Test File**: A `.tftest.hcl` or `.tftest.json` file containing test configuration and run blocks that validate your Terraform configuration.
16
+
17
+ **Test Block**: Optional configuration block that defines test-wide settings (available since Terraform 1.6.0).
18
+
19
+ **Run Block**: Defines a single test scenario with optional variables, provider configurations, and assertions. Each test file requires at least one run block.
20
+
21
+ **Assert Block**: Contains conditions that must evaluate to true for the test to pass. Failed assertions cause the test to fail.
22
+
23
+ **Mock Provider**: Simulates provider behavior without creating real infrastructure (available since Terraform 1.7.0).
24
+
25
+ **Test Modes**: Tests run in apply mode (default, creates real infrastructure) or plan mode (validates logic without creating resources).
26
+
27
+ ## File Structure
28
+
29
+ Terraform test files use the `.tftest.hcl` or `.tftest.json` extension and are typically organized in a `tests/` directory. Use clear naming conventions to distinguish between unit tests (plan mode) and integration tests (apply mode):
30
+
31
+ ```
32
+ my-module/
33
+ ├── main.tf
34
+ ├── variables.tf
35
+ ├── outputs.tf
36
+ └── tests/
37
+ ├── validation_unit_test.tftest.hcl # Unit test (plan mode)
38
+ ├── edge_cases_unit_test.tftest.hcl # Unit test (plan mode)
39
+ └── full_stack_integration_test.tftest.hcl # Integration test (apply mode - creates real resources)
40
+ ```
41
+
42
+ ### Test File Components
43
+
44
+ A test file contains:
45
+ - **Zero to one** `test` block (configuration settings)
46
+ - **One to many** `run` blocks (test executions)
47
+ - **Zero to one** `variables` block (input values)
48
+ - **Zero to many** `provider` blocks (provider configuration)
49
+ - **Zero to many** `mock_provider` blocks (mock provider data, since v1.7.0)
50
+
51
+ **Important**: The order of `variables` and `provider` blocks doesn't matter. Terraform processes all values within these blocks at the beginning of the test operation.
52
+
53
+ ## Test Configuration (.tftest.hcl)
54
+
55
+ ### Test Block
56
+
57
+ The optional `test` block configures test-wide settings:
58
+
59
+ ```hcl
60
+ test {
61
+ parallel = true # Enable parallel execution for all run blocks (default: false)
62
+ }
63
+ ```
64
+
65
+ **Test Block Attributes:**
66
+ - `parallel` - Boolean, when set to `true`, enables parallel execution for all run blocks by default (default: `false`). Individual run blocks can override this setting.
67
+
68
+ ### Run Block
69
+
70
+ Each `run` block executes a command against your configuration. Run blocks execute **sequentially by default**.
71
+
72
+ **Basic Integration Test (Apply Mode - Default):**
73
+
74
+ ```hcl
75
+ run "test_instance_creation" {
76
+ command = apply
77
+
78
+ assert {
79
+ condition = aws_instance.example.id != ""
80
+ error_message = "Instance should be created with a valid ID"
81
+ }
82
+
83
+ assert {
84
+ condition = output.instance_public_ip != ""
85
+ error_message = "Instance should have a public IP"
86
+ }
87
+ }
88
+ ```
89
+
90
+ **Unit Test (Plan Mode):**
91
+
92
+ ```hcl
93
+ run "test_default_configuration" {
94
+ command = plan
95
+
96
+ assert {
97
+ condition = aws_instance.example.instance_type == "t2.micro"
98
+ error_message = "Instance type should be t2.micro by default"
99
+ }
100
+
101
+ assert {
102
+ condition = aws_instance.example.tags["Environment"] == "test"
103
+ error_message = "Environment tag should be 'test'"
104
+ }
105
+ }
106
+ ```
107
+
108
+ **Run Block Attributes:**
109
+
110
+ - `command` - Either `apply` (default) or `plan`
111
+ - `plan_options` - Configure plan behavior (see below)
112
+ - `variables` - Override test-level variable values
113
+ - `module` - Reference alternate modules for testing
114
+ - `providers` - Customize provider availability
115
+ - `assert` - Validation conditions (multiple allowed)
116
+ - `expect_failures` - Specify expected validation failures
117
+ - `state_key` - Manage state file isolation (since v1.9.0)
118
+ - `parallel` - Enable parallel execution when set to `true` (since v1.9.0)
119
+
120
+ ### Plan Options
121
+
122
+ The `plan_options` block configures plan command behavior:
123
+
124
+ ```hcl
125
+ run "test_refresh_only" {
126
+ command = plan
127
+
128
+ plan_options {
129
+ mode = refresh-only # "normal" (default) or "refresh-only"
130
+ refresh = true # boolean, defaults to true
131
+ replace = [
132
+ aws_instance.example
133
+ ]
134
+ target = [
135
+ aws_instance.example
136
+ ]
137
+ }
138
+
139
+ assert {
140
+ condition = aws_instance.example.instance_type == "t2.micro"
141
+ error_message = "Instance type should be t2.micro"
142
+ }
143
+ }
144
+ ```
145
+
146
+ **Plan Options Attributes:**
147
+ - `mode` - `normal` (default) or `refresh-only`
148
+ - `refresh` - Boolean, defaults to `true`
149
+ - `replace` - List of resource addresses to replace
150
+ - `target` - List of resource addresses to target
151
+
152
+ ### Variables Block
153
+
154
+ Define variables at the test file level (applied to all run blocks) or within individual run blocks.
155
+
156
+ **Important**: Variables defined in test files take the **highest precedence**, overriding environment variables, variables files, or command-line input.
157
+
158
+ **File-Level Variables:**
159
+
160
+ ```hcl
161
+ # Applied to all run blocks
162
+ variables {
163
+ aws_region = "us-west-2"
164
+ instance_type = "t2.micro"
165
+ environment = "test"
166
+ }
167
+
168
+ run "test_with_file_variables" {
169
+ command = plan
170
+
171
+ assert {
172
+ condition = var.aws_region == "us-west-2"
173
+ error_message = "Region should be us-west-2"
174
+ }
175
+ }
176
+ ```
177
+
178
+ **Run Block Variables (Override File-Level):**
179
+
180
+ ```hcl
181
+ variables {
182
+ instance_type = "t2.small"
183
+ environment = "test"
184
+ }
185
+
186
+ run "test_with_override_variables" {
187
+ command = plan
188
+
189
+ # Override file-level variables
190
+ variables {
191
+ instance_type = "t3.large"
192
+ }
193
+
194
+ assert {
195
+ condition = var.instance_type == "t3.large"
196
+ error_message = "Instance type should be overridden to t3.large"
197
+ }
198
+ }
199
+ ```
200
+
201
+ **Variables Referencing Prior Run Blocks:**
202
+
203
+ ```hcl
204
+ run "setup_vpc" {
205
+ command = apply
206
+ }
207
+
208
+ run "test_with_vpc_output" {
209
+ command = plan
210
+
211
+ variables {
212
+ vpc_id = run.setup_vpc.vpc_id
213
+ }
214
+
215
+ assert {
216
+ condition = var.vpc_id == run.setup_vpc.vpc_id
217
+ error_message = "VPC ID should match setup_vpc output"
218
+ }
219
+ }
220
+ ```
221
+
222
+ ### Assert Block
223
+
224
+ Assert blocks validate conditions within run blocks. All assertions must pass for the test to succeed.
225
+
226
+ **Syntax:**
227
+
228
+ ```hcl
229
+ assert {
230
+ condition = <expression>
231
+ error_message = "failure description"
232
+ }
233
+ ```
234
+
235
+ **Resource Attribute Assertions:**
236
+
237
+ ```hcl
238
+ run "test_resource_configuration" {
239
+ command = plan
240
+
241
+ assert {
242
+ condition = aws_s3_bucket.example.bucket == "my-test-bucket"
243
+ error_message = "Bucket name should match expected value"
244
+ }
245
+
246
+ assert {
247
+ condition = aws_s3_bucket.example.versioning[0].enabled == true
248
+ error_message = "Bucket versioning should be enabled"
249
+ }
250
+
251
+ assert {
252
+ condition = length(aws_s3_bucket.example.tags) > 0
253
+ error_message = "Bucket should have at least one tag"
254
+ }
255
+ }
256
+ ```
257
+
258
+ **Output Validation:**
259
+
260
+ ```hcl
261
+ run "test_outputs" {
262
+ command = plan
263
+
264
+ assert {
265
+ condition = output.vpc_id != ""
266
+ error_message = "VPC ID output should not be empty"
267
+ }
268
+
269
+ assert {
270
+ condition = length(output.subnet_ids) == 3
271
+ error_message = "Should create exactly 3 subnets"
272
+ }
273
+ }
274
+ ```
275
+
276
+ **Referencing Prior Run Block Outputs:**
277
+
278
+ ```hcl
279
+ run "create_vpc" {
280
+ command = apply
281
+ }
282
+
283
+ run "validate_vpc_output" {
284
+ command = plan
285
+
286
+ assert {
287
+ condition = run.create_vpc.vpc_id != ""
288
+ error_message = "VPC from previous run should have an ID"
289
+ }
290
+ }
291
+ ```
292
+
293
+ **Complex Conditions:**
294
+
295
+ ```hcl
296
+ run "test_complex_validation" {
297
+ command = plan
298
+
299
+ assert {
300
+ condition = alltrue([
301
+ for subnet in aws_subnet.private :
302
+ can(regex("^10\\.0\\.", subnet.cidr_block))
303
+ ])
304
+ error_message = "All private subnets should use 10.0.0.0/8 CIDR range"
305
+ }
306
+
307
+ assert {
308
+ condition = alltrue([
309
+ for instance in aws_instance.workers :
310
+ contains(["t2.micro", "t2.small", "t3.micro"], instance.instance_type)
311
+ ])
312
+ error_message = "Worker instances should use approved instance types"
313
+ }
314
+ }
315
+ ```
316
+
317
+ ### Expect Failures Block
318
+
319
+ Test that certain conditions intentionally fail. The test **passes** if the specified checkable objects report an issue, and **fails** if they do not.
320
+
321
+ **Checkable objects include**: Input variables, output values, check blocks, and managed resources or data sources.
322
+
323
+ ```hcl
324
+ run "test_invalid_input_rejected" {
325
+ command = plan
326
+
327
+ variables {
328
+ instance_count = -1
329
+ }
330
+
331
+ expect_failures = [
332
+ var.instance_count
333
+ ]
334
+ }
335
+ ```
336
+
337
+ **Testing Custom Conditions:**
338
+
339
+ ```hcl
340
+ run "test_custom_condition_failure" {
341
+ command = plan
342
+
343
+ variables {
344
+ instance_type = "t2.nano" # Invalid type
345
+ }
346
+
347
+ expect_failures = [
348
+ var.instance_type
349
+ ]
350
+ }
351
+ ```
352
+
353
+ ### Module Block
354
+
355
+ Test a specific module rather than the root configuration.
356
+
357
+ **Supported Module Sources:**
358
+ - ✅ **Local modules**: `./modules/vpc`, `../shared/networking`
359
+ - ✅ **Public Terraform Registry**: `terraform-aws-modules/vpc/aws`
360
+ - ✅ **Private Registry (HCP Terraform)**: `app.terraform.io/org/module/provider`
361
+
362
+ **Unsupported Module Sources:**
363
+ - ❌ Git repositories: `git::https://github.com/...`
364
+ - ❌ HTTP URLs: `https://example.com/module.zip`
365
+ - ❌ Other remote sources (S3, GCS, etc.)
366
+
367
+ **Module Block Attributes:**
368
+ - `source` - Module source (local path or registry address)
369
+ - `version` - Version constraint (only for registry modules)
370
+
371
+ **Testing Local Modules:**
372
+
373
+ ```hcl
374
+ run "test_vpc_module" {
375
+ command = plan
376
+
377
+ module {
378
+ source = "./modules/vpc"
379
+ }
380
+
381
+ variables {
382
+ cidr_block = "10.0.0.0/16"
383
+ name = "test-vpc"
384
+ }
385
+
386
+ assert {
387
+ condition = aws_vpc.main.cidr_block == "10.0.0.0/16"
388
+ error_message = "VPC CIDR should match input variable"
389
+ }
390
+ }
391
+ ```
392
+
393
+ **Testing Public Registry Modules:**
394
+
395
+ ```hcl
396
+ run "test_registry_module" {
397
+ command = plan
398
+
399
+ module {
400
+ source = "terraform-aws-modules/vpc/aws"
401
+ version = "5.0.0"
402
+ }
403
+
404
+ variables {
405
+ name = "test-vpc"
406
+ cidr = "10.0.0.0/16"
407
+ }
408
+
409
+ assert {
410
+ condition = output.vpc_id != ""
411
+ error_message = "VPC should be created"
412
+ }
413
+ }
414
+ ```
415
+
416
+ ### Provider Configuration
417
+
418
+ Override or configure providers for tests. Since Terraform 1.7.0, provider blocks can reference test variables and prior run block outputs.
419
+
420
+ **Basic Provider Configuration:**
421
+
422
+ ```hcl
423
+ provider "aws" {
424
+ region = "us-west-2"
425
+ }
426
+
427
+ run "test_with_provider" {
428
+ command = plan
429
+
430
+ assert {
431
+ condition = aws_instance.example.availability_zone == "us-west-2a"
432
+ error_message = "Instance should be in us-west-2 region"
433
+ }
434
+ }
435
+ ```
436
+
437
+ **Multiple Provider Configurations:**
438
+
439
+ ```hcl
440
+ provider "aws" {
441
+ alias = "primary"
442
+ region = "us-west-2"
443
+ }
444
+
445
+ provider "aws" {
446
+ alias = "secondary"
447
+ region = "us-east-1"
448
+ }
449
+
450
+ run "test_with_specific_provider" {
451
+ command = plan
452
+
453
+ providers = {
454
+ aws = provider.aws.secondary
455
+ }
456
+
457
+ assert {
458
+ condition = aws_instance.example.availability_zone == "us-east-1a"
459
+ error_message = "Instance should be in us-east-1 region"
460
+ }
461
+ }
462
+ ```
463
+
464
+ **Provider with Test Variables:**
465
+
466
+ ```hcl
467
+ variables {
468
+ aws_region = "eu-west-1"
469
+ }
470
+
471
+ provider "aws" {
472
+ region = var.aws_region
473
+ }
474
+ ```
475
+
476
+ ### State Key Management
477
+
478
+ The `state_key` attribute controls which state file a run block uses. By default:
479
+ - The main configuration shares a state file across all run blocks
480
+ - Each alternate module (referenced via `module` block) gets its own state file
481
+
482
+ **Force Run Blocks to Share State:**
483
+
484
+ ```hcl
485
+ run "create_vpc" {
486
+ command = apply
487
+
488
+ module {
489
+ source = "./modules/vpc"
490
+ }
491
+
492
+ state_key = "shared_state"
493
+ }
494
+
495
+ run "create_subnet" {
496
+ command = apply
497
+
498
+ module {
499
+ source = "./modules/subnet"
500
+ }
501
+
502
+ state_key = "shared_state" # Shares state with create_vpc
503
+ }
504
+ ```
505
+
506
+ ### Parallel Execution
507
+
508
+ Run blocks execute **sequentially by default**. Enable parallel execution with `parallel = true`.
509
+
510
+ **Requirements for Parallel Execution:**
511
+ - No inter-run output references (run blocks cannot reference outputs from parallel runs)
512
+ - Different state files (via different modules or state keys)
513
+ - Explicit `parallel = true` attribute
514
+
515
+ ```hcl
516
+ run "test_module_a" {
517
+ command = plan
518
+ parallel = true
519
+
520
+ module {
521
+ source = "./modules/module-a"
522
+ }
523
+
524
+ assert {
525
+ condition = output.result != ""
526
+ error_message = "Module A should produce output"
527
+ }
528
+ }
529
+
530
+ run "test_module_b" {
531
+ command = plan
532
+ parallel = true
533
+
534
+ module {
535
+ source = "./modules/module-b"
536
+ }
537
+
538
+ assert {
539
+ condition = output.result != ""
540
+ error_message = "Module B should produce output"
541
+ }
542
+ }
543
+
544
+ # This creates a synchronization point
545
+ run "test_integration" {
546
+ command = plan
547
+
548
+ # Waits for parallel runs above to complete
549
+ assert {
550
+ condition = output.combined != ""
551
+ error_message = "Integration should work"
552
+ }
553
+ }
554
+ ```
555
+
556
+ ## Mock Providers
557
+
558
+ Mock providers simulate provider behavior without creating real infrastructure (available since Terraform 1.7.0).
559
+
560
+ **Basic Mock Provider:**
561
+
562
+ ```hcl
563
+ mock_provider "aws" {
564
+ mock_resource "aws_instance" {
565
+ defaults = {
566
+ id = "i-1234567890abcdef0"
567
+ instance_type = "t2.micro"
568
+ ami = "ami-12345678"
569
+ }
570
+ }
571
+
572
+ mock_data "aws_ami" {
573
+ defaults = {
574
+ id = "ami-12345678"
575
+ }
576
+ }
577
+ }
578
+
579
+ run "test_with_mocks" {
580
+ command = plan
581
+
582
+ assert {
583
+ condition = aws_instance.example.id == "i-1234567890abcdef0"
584
+ error_message = "Mock instance ID should match"
585
+ }
586
+ }
587
+ ```
588
+
589
+ **Advanced Mock with Custom Values:**
590
+
591
+ ```hcl
592
+ mock_provider "aws" {
593
+ alias = "mocked"
594
+
595
+ mock_resource "aws_s3_bucket" {
596
+ defaults = {
597
+ id = "test-bucket-12345"
598
+ bucket = "test-bucket"
599
+ arn = "arn:aws:s3:::test-bucket"
600
+ }
601
+ }
602
+
603
+ mock_data "aws_availability_zones" {
604
+ defaults = {
605
+ names = ["us-west-2a", "us-west-2b", "us-west-2c"]
606
+ }
607
+ }
608
+ }
609
+
610
+ run "test_with_mock_provider" {
611
+ command = plan
612
+
613
+ providers = {
614
+ aws = provider.aws.mocked
615
+ }
616
+
617
+ assert {
618
+ condition = length(data.aws_availability_zones.available.names) == 3
619
+ error_message = "Should return 3 availability zones"
620
+ }
621
+ }
622
+ ```
623
+
624
+ ## Test Execution
625
+
626
+ ### Running Tests
627
+
628
+ **Run all tests:**
629
+
630
+ ```bash
631
+ terraform test
632
+ ```
633
+
634
+ **Run specific test file:**
635
+
636
+ ```bash
637
+ terraform test tests/defaults.tftest.hcl
638
+ ```
639
+
640
+ **Run with verbose output:**
641
+
642
+ ```bash
643
+ terraform test -verbose
644
+ ```
645
+
646
+ **Run tests in a specific directory:**
647
+
648
+ ```bash
649
+ terraform test -test-directory=integration-tests
650
+ ```
651
+
652
+ **Filter tests by name:**
653
+
654
+ ```bash
655
+ terraform test -filter=test_vpc_configuration
656
+ ```
657
+
658
+ **Run tests without cleanup (for debugging):**
659
+
660
+ ```bash
661
+ terraform test -no-cleanup
662
+ ```
663
+
664
+ ### Test Output
665
+
666
+ **Successful test output:**
667
+
668
+ ```
669
+ tests/defaults.tftest.hcl... in progress
670
+ run "test_default_configuration"... pass
671
+ run "test_outputs"... pass
672
+ tests/defaults.tftest.hcl... tearing down
673
+ tests/defaults.tftest.hcl... pass
674
+
675
+ Success! 2 passed, 0 failed.
676
+ ```
677
+
678
+ **Failed test output:**
679
+
680
+ ```
681
+ tests/defaults.tftest.hcl... in progress
682
+ run "test_default_configuration"... fail
683
+ Error: Test assertion failed
684
+ Instance type should be t2.micro by default
685
+
686
+ Success! 0 passed, 1 failed.
687
+ ```
688
+
689
+ ## Common Test Patterns (Unit Tests - Plan Mode)
690
+
691
+ The following examples demonstrate common unit test patterns using `command = plan`. These tests validate Terraform logic without creating real infrastructure, making them fast and cost-free.
692
+
693
+ ### Testing Module Outputs
694
+
695
+ ```hcl
696
+ run "test_module_outputs" {
697
+ command = plan
698
+
699
+ assert {
700
+ condition = output.vpc_id != null
701
+ error_message = "VPC ID output must be defined"
702
+ }
703
+
704
+ assert {
705
+ condition = can(regex("^vpc-", output.vpc_id))
706
+ error_message = "VPC ID should start with 'vpc-'"
707
+ }
708
+
709
+ assert {
710
+ condition = length(output.subnet_ids) >= 2
711
+ error_message = "Should output at least 2 subnet IDs"
712
+ }
713
+ }
714
+ ```
715
+
716
+ ### Testing Resource Counts
717
+
718
+ ```hcl
719
+ run "test_resource_count" {
720
+ command = plan
721
+
722
+ variables {
723
+ instance_count = 3
724
+ }
725
+
726
+ assert {
727
+ condition = length(aws_instance.workers) == 3
728
+ error_message = "Should create exactly 3 worker instances"
729
+ }
730
+ }
731
+ ```
732
+
733
+ ### Testing Conditional Resources
734
+
735
+ ```hcl
736
+ run "test_conditional_resource_created" {
737
+ command = plan
738
+
739
+ variables {
740
+ create_nat_gateway = true
741
+ }
742
+
743
+ assert {
744
+ condition = length(aws_nat_gateway.main) == 1
745
+ error_message = "NAT gateway should be created when enabled"
746
+ }
747
+ }
748
+
749
+ run "test_conditional_resource_not_created" {
750
+ command = plan
751
+
752
+ variables {
753
+ create_nat_gateway = false
754
+ }
755
+
756
+ assert {
757
+ condition = length(aws_nat_gateway.main) == 0
758
+ error_message = "NAT gateway should not be created when disabled"
759
+ }
760
+ }
761
+ ```
762
+
763
+ ### Testing Tags
764
+
765
+ ```hcl
766
+ run "test_resource_tags" {
767
+ command = plan
768
+
769
+ variables {
770
+ common_tags = {
771
+ Environment = "production"
772
+ ManagedBy = "Terraform"
773
+ }
774
+ }
775
+
776
+ assert {
777
+ condition = aws_instance.example.tags["Environment"] == "production"
778
+ error_message = "Environment tag should be set correctly"
779
+ }
780
+
781
+ assert {
782
+ condition = aws_instance.example.tags["ManagedBy"] == "Terraform"
783
+ error_message = "ManagedBy tag should be set correctly"
784
+ }
785
+ }
786
+ ```
787
+
788
+ ### Sequential Tests with Dependencies
789
+
790
+ ```hcl
791
+ run "setup_vpc" {
792
+ # command defaults to apply
793
+
794
+ variables {
795
+ vpc_cidr = "10.0.0.0/16"
796
+ }
797
+
798
+ assert {
799
+ condition = output.vpc_id != ""
800
+ error_message = "VPC should be created"
801
+ }
802
+ }
803
+
804
+ run "test_subnet_in_vpc" {
805
+ command = plan
806
+
807
+ variables {
808
+ vpc_id = run.setup_vpc.vpc_id
809
+ }
810
+
811
+ assert {
812
+ condition = aws_subnet.example.vpc_id == run.setup_vpc.vpc_id
813
+ error_message = "Subnet should be created in the VPC from setup_vpc"
814
+ }
815
+ }
816
+ ```
817
+
818
+ ### Testing Data Sources
819
+
820
+ ```hcl
821
+ run "test_data_source_lookup" {
822
+ command = plan
823
+
824
+ assert {
825
+ condition = data.aws_ami.ubuntu.id != ""
826
+ error_message = "Should find a valid Ubuntu AMI"
827
+ }
828
+
829
+ assert {
830
+ condition = can(regex("^ami-", data.aws_ami.ubuntu.id))
831
+ error_message = "AMI ID should be in correct format"
832
+ }
833
+ }
834
+ ```
835
+
836
+ ### Testing Validation Rules
837
+
838
+ ```hcl
839
+ # In variables.tf
840
+ variable "environment" {
841
+ type = string
842
+
843
+ validation {
844
+ condition = contains(["dev", "staging", "prod"], var.environment)
845
+ error_message = "Environment must be dev, staging, or prod"
846
+ }
847
+ }
848
+
849
+ # In test file
850
+ run "test_valid_environment" {
851
+ command = plan
852
+
853
+ variables {
854
+ environment = "staging"
855
+ }
856
+
857
+ assert {
858
+ condition = var.environment == "staging"
859
+ error_message = "Valid environment should be accepted"
860
+ }
861
+ }
862
+
863
+ run "test_invalid_environment" {
864
+ command = plan
865
+
866
+ variables {
867
+ environment = "invalid"
868
+ }
869
+
870
+ expect_failures = [
871
+ var.environment
872
+ ]
873
+ }
874
+ ```
875
+
876
+ ## Integration Testing
877
+
878
+ For tests that create real infrastructure (default behavior with `command = apply`):
879
+
880
+ ```hcl
881
+ run "integration_test_full_stack" {
882
+ # command defaults to apply
883
+
884
+ variables {
885
+ environment = "integration-test"
886
+ vpc_cidr = "10.100.0.0/16"
887
+ }
888
+
889
+ assert {
890
+ condition = aws_vpc.main.id != ""
891
+ error_message = "VPC should be created"
892
+ }
893
+
894
+ assert {
895
+ condition = length(aws_subnet.private) == 2
896
+ error_message = "Should create 2 private subnets"
897
+ }
898
+
899
+ assert {
900
+ condition = aws_instance.bastion.public_ip != ""
901
+ error_message = "Bastion instance should have a public IP"
902
+ }
903
+ }
904
+
905
+ # Cleanup happens automatically after test completes
906
+ ```
907
+
908
+ ## Cleanup and Destruction
909
+
910
+ **Important**: Resources are destroyed in **reverse run block order** after test completion. This is critical for configurations with dependencies.
911
+
912
+ **Example**: For S3 buckets containing objects, the bucket must be emptied before deletion:
913
+
914
+ ```hcl
915
+ run "create_bucket_with_objects" {
916
+ command = apply
917
+
918
+ assert {
919
+ condition = aws_s3_bucket.example.id != ""
920
+ error_message = "Bucket should be created"
921
+ }
922
+ }
923
+
924
+ run "add_objects_to_bucket" {
925
+ command = apply
926
+
927
+ assert {
928
+ condition = length(aws_s3_object.files) > 0
929
+ error_message = "Objects should be added"
930
+ }
931
+ }
932
+
933
+ # Cleanup occurs in reverse order:
934
+ # 1. Destroys objects (run "add_objects_to_bucket")
935
+ # 2. Destroys bucket (run "create_bucket_with_objects")
936
+ ```
937
+
938
+ **Disable Cleanup for Debugging:**
939
+
940
+ ```bash
941
+ terraform test -no-cleanup
942
+ ```
943
+
944
+ ## Best Practices
945
+
946
+ 1. **Test Organization**: Organize tests by type using clear naming conventions:
947
+ - Unit tests (plan mode): `*_unit_test.tftest.hcl` - fast, no resources created
948
+ - Integration tests (apply mode): `*_integration_test.tftest.hcl` - creates real resources
949
+ - Example: `defaults_unit_test.tftest.hcl`, `validation_unit_test.tftest.hcl`, `full_stack_integration_test.tftest.hcl`
950
+ - This makes it easy to run unit tests separately from integration tests in CI/CD
951
+
952
+ 2. **Apply vs Plan**:
953
+ - Default is `command = apply` (integration testing with real resources)
954
+ - Use `command = plan` for unit tests (fast, no real resources)
955
+ - Use mocks for isolated unit testing
956
+
957
+ 3. **Meaningful Assertions**: Write clear, specific assertion error messages that help diagnose failures
958
+
959
+ 4. **Test Isolation**: Each run block should be independent when possible. Use sequential runs only when testing dependencies
960
+
961
+ 5. **Variable Coverage**: Test different variable combinations to validate all code paths. Remember that test variables have the highest precedence
962
+
963
+ 6. **Mock Providers**: Use mocks for external dependencies to speed up tests and reduce costs (requires Terraform 1.7.0+)
964
+
965
+ 7. **Cleanup**: Integration tests automatically destroy resources in reverse order after completion. Use `-no-cleanup` flag for debugging
966
+
967
+ 8. **CI Integration**: Run `terraform test` in CI/CD pipelines to catch issues early
968
+
969
+ 9. **Test Naming**: Use descriptive names for run blocks that explain what scenario is being tested
970
+
971
+ 10. **Negative Testing**: Test invalid inputs and expected failures using `expect_failures`
972
+
973
+ 11. **Module Support**: Remember that test files only support **local** and **registry** modules, not Git or other sources
974
+
975
+ 12. **Parallel Execution**: Use `parallel = true` for independent tests with different state files to speed up test execution
976
+
977
+ ## Advanced Features
978
+
979
+ ### Testing with Refresh-Only Mode
980
+
981
+ ```hcl
982
+ run "test_refresh_only" {
983
+ command = plan
984
+
985
+ plan_options {
986
+ mode = refresh-only
987
+ }
988
+
989
+ assert {
990
+ condition = aws_instance.example.tags["Environment"] == "production"
991
+ error_message = "Tags should be refreshed correctly"
992
+ }
993
+ }
994
+ ```
995
+
996
+ ### Testing with Targeted Resources
997
+
998
+ ```hcl
999
+ run "test_specific_resource" {
1000
+ command = plan
1001
+
1002
+ plan_options {
1003
+ target = [
1004
+ aws_instance.example
1005
+ ]
1006
+ }
1007
+
1008
+ assert {
1009
+ condition = aws_instance.example.instance_type == "t2.micro"
1010
+ error_message = "Targeted resource should be planned"
1011
+ }
1012
+ }
1013
+ ```
1014
+
1015
+ ### Testing Multiple Modules in Parallel
1016
+
1017
+ ```hcl
1018
+ run "test_networking_module" {
1019
+ command = plan
1020
+ parallel = true
1021
+
1022
+ module {
1023
+ source = "./modules/networking"
1024
+ }
1025
+
1026
+ variables {
1027
+ cidr_block = "10.0.0.0/16"
1028
+ }
1029
+
1030
+ assert {
1031
+ condition = output.vpc_id != ""
1032
+ error_message = "VPC should be created"
1033
+ }
1034
+ }
1035
+
1036
+ run "test_compute_module" {
1037
+ command = plan
1038
+ parallel = true
1039
+
1040
+ module {
1041
+ source = "./modules/compute"
1042
+ }
1043
+
1044
+ variables {
1045
+ instance_type = "t2.micro"
1046
+ }
1047
+
1048
+ assert {
1049
+ condition = output.instance_id != ""
1050
+ error_message = "Instance should be created"
1051
+ }
1052
+ }
1053
+ ```
1054
+
1055
+ ### Custom State Management
1056
+
1057
+ ```hcl
1058
+ run "create_foundation" {
1059
+ command = apply
1060
+ state_key = "foundation"
1061
+
1062
+ assert {
1063
+ condition = aws_vpc.main.id != ""
1064
+ error_message = "Foundation VPC should be created"
1065
+ }
1066
+ }
1067
+
1068
+ run "create_application" {
1069
+ command = apply
1070
+ state_key = "foundation" # Share state with foundation
1071
+
1072
+ variables {
1073
+ vpc_id = run.create_foundation.vpc_id
1074
+ }
1075
+
1076
+ assert {
1077
+ condition = aws_instance.app.vpc_id == run.create_foundation.vpc_id
1078
+ error_message = "Application should use foundation VPC"
1079
+ }
1080
+ }
1081
+ ```
1082
+
1083
+ ## Troubleshooting
1084
+
1085
+ ### Test Failures
1086
+
1087
+ **Issue**: Assertion failures
1088
+
1089
+ **Solution**: Review error messages, check actual vs expected values, verify variable inputs. Use `-verbose` flag for detailed output
1090
+
1091
+ ### Provider Authentication
1092
+
1093
+ **Issue**: Tests fail due to missing credentials
1094
+
1095
+ **Solution**: Configure provider credentials for testing, or use mock providers for unit tests (available since v1.7.0)
1096
+
1097
+ ### Resource Dependencies
1098
+
1099
+ **Issue**: Tests fail due to missing dependencies
1100
+
1101
+ **Solution**: Use sequential run blocks or create setup runs to establish required resources. Remember cleanup happens in reverse order
1102
+
1103
+ ### Long Test Execution
1104
+
1105
+ **Issue**: Tests take too long to run
1106
+
1107
+ **Solution**:
1108
+ - Use `command = plan` instead of `apply` where possible
1109
+ - Leverage mock providers
1110
+ - Use `parallel = true` for independent tests
1111
+ - Organize slow integration tests separately
1112
+
1113
+ ### State Conflicts
1114
+
1115
+ **Issue**: Multiple tests interfere with each other
1116
+
1117
+ **Solution**:
1118
+ - Use different modules (automatic separate state)
1119
+ - Use `state_key` attribute to control state file sharing
1120
+ - Use mock providers for isolated testing
1121
+
1122
+ ### Module Source Errors
1123
+
1124
+ **Issue**: Test fails with unsupported module source
1125
+
1126
+ **Solution**: Terraform test files only support **local** and **registry** modules. Convert Git or HTTP sources to local modules or use registry modules
1127
+
1128
+ ## Example Test Suite
1129
+
1130
+ Complete example testing a VPC module, demonstrating both unit tests (plan mode) and integration tests (apply mode):
1131
+
1132
+ ```hcl
1133
+ # tests/vpc_module_unit_test.tftest.hcl
1134
+ # This file contains unit tests using command = plan (fast, no resources created)
1135
+
1136
+ variables {
1137
+ environment = "test"
1138
+ aws_region = "us-west-2"
1139
+ }
1140
+
1141
+ # ============================================================================
1142
+ # UNIT TESTS (Plan Mode) - Validate logic without creating resources
1143
+ # ============================================================================
1144
+
1145
+ # Test default configuration
1146
+ run "test_defaults" {
1147
+ command = plan
1148
+
1149
+ variables {
1150
+ vpc_cidr = "10.0.0.0/16"
1151
+ vpc_name = "test-vpc"
1152
+ }
1153
+
1154
+ assert {
1155
+ condition = aws_vpc.main.cidr_block == "10.0.0.0/16"
1156
+ error_message = "VPC CIDR should match input"
1157
+ }
1158
+
1159
+ assert {
1160
+ condition = aws_vpc.main.enable_dns_hostnames == true
1161
+ error_message = "DNS hostnames should be enabled by default"
1162
+ }
1163
+
1164
+ assert {
1165
+ condition = aws_vpc.main.tags["Name"] == "test-vpc"
1166
+ error_message = "VPC name tag should match input"
1167
+ }
1168
+ }
1169
+
1170
+ # Test subnet creation
1171
+ run "test_subnets" {
1172
+ command = plan
1173
+
1174
+ variables {
1175
+ vpc_cidr = "10.0.0.0/16"
1176
+ vpc_name = "test-vpc"
1177
+ public_subnets = ["10.0.1.0/24", "10.0.2.0/24"]
1178
+ private_subnets = ["10.0.10.0/24", "10.0.11.0/24"]
1179
+ }
1180
+
1181
+ assert {
1182
+ condition = length(aws_subnet.public) == 2
1183
+ error_message = "Should create 2 public subnets"
1184
+ }
1185
+
1186
+ assert {
1187
+ condition = length(aws_subnet.private) == 2
1188
+ error_message = "Should create 2 private subnets"
1189
+ }
1190
+
1191
+ assert {
1192
+ condition = alltrue([
1193
+ for subnet in aws_subnet.private :
1194
+ subnet.map_public_ip_on_launch == false
1195
+ ])
1196
+ error_message = "Private subnets should not assign public IPs"
1197
+ }
1198
+ }
1199
+
1200
+ # Test outputs
1201
+ run "test_outputs" {
1202
+ command = plan
1203
+
1204
+ variables {
1205
+ vpc_cidr = "10.0.0.0/16"
1206
+ vpc_name = "test-vpc"
1207
+ }
1208
+
1209
+ assert {
1210
+ condition = output.vpc_id != ""
1211
+ error_message = "VPC ID output should not be empty"
1212
+ }
1213
+
1214
+ assert {
1215
+ condition = can(regex("^vpc-", output.vpc_id))
1216
+ error_message = "VPC ID should have correct format"
1217
+ }
1218
+
1219
+ assert {
1220
+ condition = output.vpc_cidr == "10.0.0.0/16"
1221
+ error_message = "VPC CIDR output should match input"
1222
+ }
1223
+ }
1224
+
1225
+ # Test invalid CIDR block
1226
+ run "test_invalid_cidr" {
1227
+ command = plan
1228
+
1229
+ variables {
1230
+ vpc_cidr = "invalid"
1231
+ vpc_name = "test-vpc"
1232
+ }
1233
+
1234
+ expect_failures = [
1235
+ var.vpc_cidr
1236
+ ]
1237
+ }
1238
+ ```
1239
+
1240
+ ```hcl
1241
+ # tests/vpc_module_integration_test.tftest.hcl
1242
+ # This file contains integration tests using command = apply (creates real resources)
1243
+
1244
+ variables {
1245
+ environment = "integration-test"
1246
+ aws_region = "us-west-2"
1247
+ }
1248
+
1249
+ # ============================================================================
1250
+ # INTEGRATION TESTS (Apply Mode) - Creates and validates real infrastructure
1251
+ # ============================================================================
1252
+
1253
+ # Integration test creating real VPC
1254
+ run "integration_test_vpc_creation" {
1255
+ # command defaults to apply - creates real AWS resources!
1256
+
1257
+ variables {
1258
+ vpc_cidr = "10.100.0.0/16"
1259
+ vpc_name = "integration-test-vpc"
1260
+ }
1261
+
1262
+ assert {
1263
+ condition = aws_vpc.main.id != ""
1264
+ error_message = "VPC should be created with valid ID"
1265
+ }
1266
+
1267
+ assert {
1268
+ condition = aws_vpc.main.state == "available"
1269
+ error_message = "VPC should be in available state"
1270
+ }
1271
+ }
1272
+ ```
1273
+
1274
+ ```hcl
1275
+ # tests/vpc_module_mock_test.tftest.hcl
1276
+ # This file demonstrates mock provider testing - fastest option, no credentials needed
1277
+
1278
+ # ============================================================================
1279
+ # MOCK TESTS (Plan Mode with Mocks) - No real infrastructure or API calls
1280
+ # ============================================================================
1281
+ # Mock tests are ideal for:
1282
+ # - Testing complex logic without cloud costs
1283
+ # - Running tests without provider credentials
1284
+ # - Fast feedback in local development
1285
+ # - CI/CD pipelines without cloud access
1286
+ # - Testing with predictable data source results
1287
+
1288
+ # Define mock provider to simulate AWS behavior
1289
+ mock_provider "aws" {
1290
+ # Mock EC2 instances - returns these values instead of creating real resources
1291
+ mock_resource "aws_instance" {
1292
+ defaults = {
1293
+ id = "i-1234567890abcdef0"
1294
+ arn = "arn:aws:ec2:us-west-2:123456789012:instance/i-1234567890abcdef0"
1295
+ instance_type = "t2.micro"
1296
+ ami = "ami-12345678"
1297
+ availability_zone = "us-west-2a"
1298
+ subnet_id = "subnet-12345678"
1299
+ vpc_security_group_ids = ["sg-12345678"]
1300
+ associate_public_ip_address = true
1301
+ public_ip = "203.0.113.1"
1302
+ private_ip = "10.0.1.100"
1303
+ tags = {}
1304
+ }
1305
+ }
1306
+
1307
+ # Mock VPC resources
1308
+ mock_resource "aws_vpc" {
1309
+ defaults = {
1310
+ id = "vpc-12345678"
1311
+ arn = "arn:aws:ec2:us-west-2:123456789012:vpc/vpc-12345678"
1312
+ cidr_block = "10.0.0.0/16"
1313
+ enable_dns_hostnames = true
1314
+ enable_dns_support = true
1315
+ instance_tenancy = "default"
1316
+ tags = {}
1317
+ }
1318
+ }
1319
+
1320
+ # Mock subnet resources
1321
+ mock_resource "aws_subnet" {
1322
+ defaults = {
1323
+ id = "subnet-12345678"
1324
+ arn = "arn:aws:ec2:us-west-2:123456789012:subnet/subnet-12345678"
1325
+ vpc_id = "vpc-12345678"
1326
+ cidr_block = "10.0.1.0/24"
1327
+ availability_zone = "us-west-2a"
1328
+ map_public_ip_on_launch = false
1329
+ tags = {}
1330
+ }
1331
+ }
1332
+
1333
+ # Mock S3 bucket resources
1334
+ mock_resource "aws_s3_bucket" {
1335
+ defaults = {
1336
+ id = "test-bucket-12345"
1337
+ arn = "arn:aws:s3:::test-bucket-12345"
1338
+ bucket = "test-bucket-12345"
1339
+ bucket_domain_name = "test-bucket-12345.s3.amazonaws.com"
1340
+ region = "us-west-2"
1341
+ tags = {}
1342
+ }
1343
+ }
1344
+
1345
+ # Mock data sources - critical for testing modules that query existing infrastructure
1346
+ mock_data "aws_ami" {
1347
+ defaults = {
1348
+ id = "ami-0c55b159cbfafe1f0"
1349
+ name = "ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-20210430"
1350
+ architecture = "x86_64"
1351
+ root_device_type = "ebs"
1352
+ virtualization_type = "hvm"
1353
+ owners = ["099720109477"]
1354
+ }
1355
+ }
1356
+
1357
+ mock_data "aws_availability_zones" {
1358
+ defaults = {
1359
+ names = ["us-west-2a", "us-west-2b", "us-west-2c"]
1360
+ zone_ids = ["usw2-az1", "usw2-az2", "usw2-az3"]
1361
+ }
1362
+ }
1363
+
1364
+ mock_data "aws_vpc" {
1365
+ defaults = {
1366
+ id = "vpc-12345678"
1367
+ cidr_block = "10.0.0.0/16"
1368
+ enable_dns_hostnames = true
1369
+ enable_dns_support = true
1370
+ }
1371
+ }
1372
+ }
1373
+
1374
+ # Test 1: Validate resource configuration with mocked values
1375
+ run "test_instance_with_mocks" {
1376
+ command = plan # Mocks only work with plan mode
1377
+
1378
+ variables {
1379
+ instance_type = "t2.micro"
1380
+ ami_id = "ami-12345678"
1381
+ }
1382
+
1383
+ assert {
1384
+ condition = aws_instance.example.instance_type == "t2.micro"
1385
+ error_message = "Instance type should match input variable"
1386
+ }
1387
+
1388
+ assert {
1389
+ condition = aws_instance.example.id == "i-1234567890abcdef0"
1390
+ error_message = "Mock should return consistent instance ID"
1391
+ }
1392
+
1393
+ assert {
1394
+ condition = can(regex("^203\\.0\\.113\\.", aws_instance.example.public_ip))
1395
+ error_message = "Mock public IP should be in TEST-NET-3 range"
1396
+ }
1397
+ }
1398
+
1399
+ # Test 2: Validate data source behavior with mocked results
1400
+ run "test_data_source_with_mocks" {
1401
+ command = plan
1402
+
1403
+ assert {
1404
+ condition = data.aws_ami.ubuntu.id == "ami-0c55b159cbfafe1f0"
1405
+ error_message = "Mock data source should return predictable AMI ID"
1406
+ }
1407
+
1408
+ assert {
1409
+ condition = length(data.aws_availability_zones.available.names) == 3
1410
+ error_message = "Should return 3 mocked availability zones"
1411
+ }
1412
+
1413
+ assert {
1414
+ condition = contains(
1415
+ data.aws_availability_zones.available.names,
1416
+ "us-west-2a"
1417
+ )
1418
+ error_message = "Should include us-west-2a in mocked zones"
1419
+ }
1420
+ }
1421
+
1422
+ # Test 3: Validate complex logic with for_each and mocks
1423
+ run "test_multiple_subnets_with_mocks" {
1424
+ command = plan
1425
+
1426
+ variables {
1427
+ subnet_cidrs = {
1428
+ "public-a" = "10.0.1.0/24"
1429
+ "public-b" = "10.0.2.0/24"
1430
+ "private-a" = "10.0.10.0/24"
1431
+ "private-b" = "10.0.11.0/24"
1432
+ }
1433
+ }
1434
+
1435
+ # Test that all subnets are created
1436
+ assert {
1437
+ condition = length(keys(aws_subnet.subnets)) == 4
1438
+ error_message = "Should create 4 subnets from for_each map"
1439
+ }
1440
+
1441
+ # Test that public subnets have correct naming
1442
+ assert {
1443
+ condition = alltrue([
1444
+ for name, subnet in aws_subnet.subnets :
1445
+ can(regex("^public-", name)) ? subnet.map_public_ip_on_launch == true : true
1446
+ ])
1447
+ error_message = "Public subnets should map public IPs on launch"
1448
+ }
1449
+
1450
+ # Test that all subnets belong to mocked VPC
1451
+ assert {
1452
+ condition = alltrue([
1453
+ for subnet in aws_subnet.subnets :
1454
+ subnet.vpc_id == "vpc-12345678"
1455
+ ])
1456
+ error_message = "All subnets should belong to mocked VPC"
1457
+ }
1458
+ }
1459
+
1460
+ # Test 4: Validate output values with mocks
1461
+ run "test_outputs_with_mocks" {
1462
+ command = plan
1463
+
1464
+ assert {
1465
+ condition = output.vpc_id == "vpc-12345678"
1466
+ error_message = "VPC ID output should match mocked value"
1467
+ }
1468
+
1469
+ assert {
1470
+ condition = can(regex("^vpc-", output.vpc_id))
1471
+ error_message = "VPC ID output should have correct format"
1472
+ }
1473
+
1474
+ assert {
1475
+ condition = output.instance_public_ip == "203.0.113.1"
1476
+ error_message = "Instance public IP should match mock"
1477
+ }
1478
+ }
1479
+
1480
+ # Test 5: Test conditional logic with mocks
1481
+ run "test_conditional_resources_with_mocks" {
1482
+ command = plan
1483
+
1484
+ variables {
1485
+ create_bastion = true
1486
+ create_nat_gateway = false
1487
+ }
1488
+
1489
+ assert {
1490
+ condition = length(aws_instance.bastion) == 1
1491
+ error_message = "Bastion should be created when enabled"
1492
+ }
1493
+
1494
+ assert {
1495
+ condition = length(aws_nat_gateway.nat) == 0
1496
+ error_message = "NAT gateway should not be created when disabled"
1497
+ }
1498
+ }
1499
+
1500
+ # Test 6: Test tag propagation with mocks
1501
+ run "test_tag_inheritance_with_mocks" {
1502
+ command = plan
1503
+
1504
+ variables {
1505
+ common_tags = {
1506
+ Environment = "test"
1507
+ ManagedBy = "Terraform"
1508
+ Project = "MockTesting"
1509
+ }
1510
+ }
1511
+
1512
+ # Verify tags are properly merged with defaults
1513
+ assert {
1514
+ condition = alltrue([
1515
+ for key in keys(var.common_tags) :
1516
+ contains(keys(aws_instance.example.tags), key)
1517
+ ])
1518
+ error_message = "All common tags should be present on instance"
1519
+ }
1520
+
1521
+ assert {
1522
+ condition = aws_instance.example.tags["Environment"] == "test"
1523
+ error_message = "Environment tag should be set correctly"
1524
+ }
1525
+ }
1526
+
1527
+ # Test 7: Test validation rules with mocks (expect_failures)
1528
+ run "test_invalid_cidr_with_mocks" {
1529
+ command = plan
1530
+
1531
+ variables {
1532
+ vpc_cidr = "192.168.0.0/8" # Invalid - should be /16 or /24
1533
+ }
1534
+
1535
+ # Expect custom validation to fail
1536
+ expect_failures = [
1537
+ var.vpc_cidr
1538
+ ]
1539
+ }
1540
+
1541
+ # Test 8: Sequential mock tests with state sharing
1542
+ run "setup_vpc_with_mocks" {
1543
+ command = plan
1544
+
1545
+ variables {
1546
+ vpc_cidr = "10.0.0.0/16"
1547
+ vpc_name = "test-vpc"
1548
+ }
1549
+
1550
+ assert {
1551
+ condition = aws_vpc.main.cidr_block == "10.0.0.0/16"
1552
+ error_message = "VPC CIDR should match input"
1553
+ }
1554
+ }
1555
+
1556
+ run "test_subnet_references_vpc_with_mocks" {
1557
+ command = plan
1558
+
1559
+ variables {
1560
+ vpc_id = run.setup_vpc_with_mocks.vpc_id
1561
+ subnet_cidr = "10.0.1.0/24"
1562
+ }
1563
+
1564
+ assert {
1565
+ condition = aws_subnet.example.vpc_id == run.setup_vpc_with_mocks.vpc_id
1566
+ error_message = "Subnet should reference VPC from previous run"
1567
+ }
1568
+
1569
+ assert {
1570
+ condition = aws_subnet.example.vpc_id == "vpc-12345678"
1571
+ error_message = "VPC ID should match mocked value"
1572
+ }
1573
+ }
1574
+ ```
1575
+
1576
+ **Key Benefits of Mock Testing:**
1577
+
1578
+ 1. **No Cloud Costs**: Runs entirely locally without creating infrastructure
1579
+ 2. **No Credentials Needed**: Perfect for CI/CD environments without cloud access
1580
+ 3. **Fast Execution**: Tests complete in seconds, not minutes
1581
+ 4. **Predictable Results**: Data sources return consistent values
1582
+ 5. **Isolated Testing**: No dependencies on existing cloud resources
1583
+ 6. **Safe Experimentation**: Test destructive operations without risk
1584
+
1585
+ **Limitations of Mock Testing:**
1586
+
1587
+ 1. **Plan Mode Only**: Mocks don't work with `command = apply`
1588
+ 2. **Not Real Behavior**: Mocks may not reflect actual provider API behavior
1589
+ 3. **Computed Values**: Mock defaults may not match real computed attributes
1590
+ 4. **Provider Updates**: Mocks need manual updates when provider schemas change
1591
+ 5. **Resource Interactions**: Can't test real resource dependencies or timing issues
1592
+
1593
+ **When to Use Mock Tests:**
1594
+
1595
+ - ✅ Testing Terraform logic and conditionals
1596
+ - ✅ Validating variable transformations
1597
+ - ✅ Testing for_each and count expressions
1598
+ - ✅ Checking output calculations
1599
+ - ✅ Local development without cloud access
1600
+ - ✅ Fast CI/CD feedback loops
1601
+ - ❌ Validating actual provider behavior
1602
+ - ❌ Testing real resource creation side effects
1603
+ - ❌ Verifying API-level interactions
1604
+ - ❌ End-to-end integration testing
1605
+
1606
+ ## CI/CD Integration
1607
+
1608
+ ### GitHub Actions Example
1609
+
1610
+ ```yaml
1611
+ name: Terraform Tests
1612
+
1613
+ on:
1614
+ pull_request:
1615
+ branches: [ main ]
1616
+ push:
1617
+ branches: [ main ]
1618
+
1619
+ jobs:
1620
+ terraform-test:
1621
+ runs-on: ubuntu-latest
1622
+ steps:
1623
+ - name: Checkout code
1624
+ uses: actions/checkout@v4
1625
+
1626
+ - name: Setup Terraform
1627
+ uses: hashicorp/setup-terraform@v3
1628
+ with:
1629
+ terraform_version: 1.9.0
1630
+
1631
+ - name: Terraform Format Check
1632
+ run: terraform fmt -check -recursive
1633
+
1634
+ - name: Terraform Init
1635
+ run: terraform init
1636
+
1637
+ - name: Terraform Validate
1638
+ run: terraform validate
1639
+
1640
+ - name: Run Terraform Tests
1641
+ run: terraform test -verbose
1642
+ env:
1643
+ AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
1644
+ AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
1645
+ ```
1646
+
1647
+ ### GitLab CI Example
1648
+
1649
+ ```yaml
1650
+ terraform-test:
1651
+ image: hashicorp/terraform:1.9
1652
+ stage: test
1653
+ before_script:
1654
+ - terraform init
1655
+ script:
1656
+ - terraform fmt -check -recursive
1657
+ - terraform validate
1658
+ - terraform test -verbose
1659
+ only:
1660
+ - merge_requests
1661
+ - main
1662
+ ```
1663
+
1664
+ ## References
1665
+
1666
+ For more information:
1667
+ - [Terraform Testing Documentation](https://developer.hashicorp.com/terraform/language/tests)
1668
+ - [Terraform Test Command Reference](https://developer.hashicorp.com/terraform/cli/commands/test)
1669
+ - [Testing Best Practices](https://developer.hashicorp.com/terraform/language/tests/best-practices)