@minhduydev/mdpi 0.3.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 (561) hide show
  1. package/README.md +31 -0
  2. package/dist/index.js +1187 -0
  3. package/dist/template/.pi/.env.example +28 -0
  4. package/dist/template/.pi/AGENTS.md +226 -0
  5. package/dist/template/.pi/QUALITY.md +13 -0
  6. package/dist/template/.pi/README.md +452 -0
  7. package/dist/template/.pi/VERSION +1 -0
  8. package/dist/template/.pi/agents/INDEX.md +54 -0
  9. package/dist/template/.pi/agents/build.md +194 -0
  10. package/dist/template/.pi/agents/explore.md +85 -0
  11. package/dist/template/.pi/agents/general.md +189 -0
  12. package/dist/template/.pi/agents/plan.md +407 -0
  13. package/dist/template/.pi/agents/review.md +198 -0
  14. package/dist/template/.pi/agents/scout.md +142 -0
  15. package/dist/template/.pi/agents/vision.md +157 -0
  16. package/dist/template/.pi/artifacts/example/plan.md +12 -0
  17. package/dist/template/.pi/artifacts/example/progress.md +4 -0
  18. package/dist/template/.pi/artifacts/example/research.md +4 -0
  19. package/dist/template/.pi/artifacts/example/spec.md +16 -0
  20. package/dist/template/.pi/context/architecture.md +141 -0
  21. package/dist/template/.pi/context/fallow.md +137 -0
  22. package/dist/template/.pi/extensions/templates-injector.ts +76 -0
  23. package/dist/template/.pi/extensions/workflows-runner.ts +301 -0
  24. package/dist/template/.pi/guard.example.json +75 -0
  25. package/dist/template/.pi/prompts/INDEX.md +78 -0
  26. package/dist/template/.pi/prompts/audit.md +109 -0
  27. package/dist/template/.pi/prompts/close.md +88 -0
  28. package/dist/template/.pi/prompts/create.md +197 -0
  29. package/dist/template/.pi/prompts/fix.md +117 -0
  30. package/dist/template/.pi/prompts/gc.md +112 -0
  31. package/dist/template/.pi/prompts/init.md +206 -0
  32. package/dist/template/.pi/prompts/loop-check.md +87 -0
  33. package/dist/template/.pi/prompts/loop-init.md +157 -0
  34. package/dist/template/.pi/prompts/loop-review.md +90 -0
  35. package/dist/template/.pi/prompts/plan.md +254 -0
  36. package/dist/template/.pi/prompts/research.md +136 -0
  37. package/dist/template/.pi/prompts/ship.md +219 -0
  38. package/dist/template/.pi/prompts/status.md +92 -0
  39. package/dist/template/.pi/prompts/verify.md +154 -0
  40. package/dist/template/.pi/scripts/gc-check.sh +86 -0
  41. package/dist/template/.pi/settings.json +15 -0
  42. package/dist/template/.pi/skills/INDEX.md +331 -0
  43. package/dist/template/.pi/skills/accessibility-audit/SKILL.md +205 -0
  44. package/dist/template/.pi/skills/accessibility-audit/references/accessibility-checklist.md +109 -0
  45. package/dist/template/.pi/skills/agent-code-quality-gate/SKILL.md +131 -0
  46. package/dist/template/.pi/skills/api-and-interface-design/SKILL.md +159 -0
  47. package/dist/template/.pi/skills/behavioral-kernel/SKILL.md +92 -0
  48. package/dist/template/.pi/skills/brainstorming/SKILL.md +138 -0
  49. package/dist/template/.pi/skills/browser-testing-with-devtools/SKILL.md +90 -0
  50. package/dist/template/.pi/skills/chrome-devtools/SKILL.md +129 -0
  51. package/dist/template/.pi/skills/ci-cd-and-automation/SKILL.md +199 -0
  52. package/dist/template/.pi/skills/cloudflare/SKILL.md +271 -0
  53. package/dist/template/.pi/skills/cloudflare/references/agents-sdk/README.md +35 -0
  54. package/dist/template/.pi/skills/cloudflare/references/agents-sdk/api.md +100 -0
  55. package/dist/template/.pi/skills/cloudflare/references/agents-sdk/configuration.md +99 -0
  56. package/dist/template/.pi/skills/cloudflare/references/agents-sdk/gotchas.md +59 -0
  57. package/dist/template/.pi/skills/cloudflare/references/agents-sdk/patterns.md +89 -0
  58. package/dist/template/.pi/skills/cloudflare/references/ai-gateway/README.md +695 -0
  59. package/dist/template/.pi/skills/cloudflare/references/ai-search/README.md +14 -0
  60. package/dist/template/.pi/skills/cloudflare/references/ai-search/api.md +38 -0
  61. package/dist/template/.pi/skills/cloudflare/references/ai-search/configuration.md +52 -0
  62. package/dist/template/.pi/skills/cloudflare/references/ai-search/gotchas.md +41 -0
  63. package/dist/template/.pi/skills/cloudflare/references/ai-search/patterns.md +45 -0
  64. package/dist/template/.pi/skills/cloudflare/references/analytics-engine/README.md +14 -0
  65. package/dist/template/.pi/skills/cloudflare/references/analytics-engine/api.md +27 -0
  66. package/dist/template/.pi/skills/cloudflare/references/analytics-engine/configuration.md +45 -0
  67. package/dist/template/.pi/skills/cloudflare/references/analytics-engine/gotchas.md +3 -0
  68. package/dist/template/.pi/skills/cloudflare/references/analytics-engine/patterns.md +36 -0
  69. package/dist/template/.pi/skills/cloudflare/references/api/README.md +21 -0
  70. package/dist/template/.pi/skills/cloudflare/references/api/api.md +31 -0
  71. package/dist/template/.pi/skills/cloudflare/references/api/configuration.md +20 -0
  72. package/dist/template/.pi/skills/cloudflare/references/api/gotchas.md +28 -0
  73. package/dist/template/.pi/skills/cloudflare/references/api/patterns.md +47 -0
  74. package/dist/template/.pi/skills/cloudflare/references/api-shield/README.md +20 -0
  75. package/dist/template/.pi/skills/cloudflare/references/api-shield/api.md +78 -0
  76. package/dist/template/.pi/skills/cloudflare/references/api-shield/configuration.md +128 -0
  77. package/dist/template/.pi/skills/cloudflare/references/api-shield/gotchas.md +51 -0
  78. package/dist/template/.pi/skills/cloudflare/references/api-shield/patterns.md +145 -0
  79. package/dist/template/.pi/skills/cloudflare/references/argo-smart-routing/README.md +16 -0
  80. package/dist/template/.pi/skills/cloudflare/references/argo-smart-routing/api.md +50 -0
  81. package/dist/template/.pi/skills/cloudflare/references/argo-smart-routing/configuration.md +53 -0
  82. package/dist/template/.pi/skills/cloudflare/references/argo-smart-routing/gotchas.md +16 -0
  83. package/dist/template/.pi/skills/cloudflare/references/argo-smart-routing/patterns.md +45 -0
  84. package/dist/template/.pi/skills/cloudflare/references/bindings/README.md +14 -0
  85. package/dist/template/.pi/skills/cloudflare/references/bindings/api.md +3 -0
  86. package/dist/template/.pi/skills/cloudflare/references/bindings/configuration.md +58 -0
  87. package/dist/template/.pi/skills/cloudflare/references/bindings/gotchas.md +35 -0
  88. package/dist/template/.pi/skills/cloudflare/references/bindings/patterns.md +37 -0
  89. package/dist/template/.pi/skills/cloudflare/references/bot-management/README.md +71 -0
  90. package/dist/template/.pi/skills/cloudflare/references/bot-management/api.md +168 -0
  91. package/dist/template/.pi/skills/cloudflare/references/bot-management/configuration.md +114 -0
  92. package/dist/template/.pi/skills/cloudflare/references/bot-management/gotchas.md +99 -0
  93. package/dist/template/.pi/skills/cloudflare/references/bot-management/patterns.md +125 -0
  94. package/dist/template/.pi/skills/cloudflare/references/browser-rendering/README.md +16 -0
  95. package/dist/template/.pi/skills/cloudflare/references/browser-rendering/api.md +54 -0
  96. package/dist/template/.pi/skills/cloudflare/references/browser-rendering/configuration.md +47 -0
  97. package/dist/template/.pi/skills/cloudflare/references/browser-rendering/gotchas.md +29 -0
  98. package/dist/template/.pi/skills/cloudflare/references/browser-rendering/patterns.md +29 -0
  99. package/dist/template/.pi/skills/cloudflare/references/c3/README.md +264 -0
  100. package/dist/template/.pi/skills/cloudflare/references/cache-reserve/README.md +93 -0
  101. package/dist/template/.pi/skills/cloudflare/references/cache-reserve/api.md +176 -0
  102. package/dist/template/.pi/skills/cloudflare/references/cache-reserve/configuration.md +164 -0
  103. package/dist/template/.pi/skills/cloudflare/references/cache-reserve/gotchas.md +203 -0
  104. package/dist/template/.pi/skills/cloudflare/references/cache-reserve/patterns.md +180 -0
  105. package/dist/template/.pi/skills/cloudflare/references/containers/README.md +16 -0
  106. package/dist/template/.pi/skills/cloudflare/references/containers/api.md +43 -0
  107. package/dist/template/.pi/skills/cloudflare/references/containers/configuration.md +56 -0
  108. package/dist/template/.pi/skills/cloudflare/references/containers/gotchas.md +21 -0
  109. package/dist/template/.pi/skills/cloudflare/references/containers/patterns.md +40 -0
  110. package/dist/template/.pi/skills/cloudflare/references/cron-triggers/README.md +85 -0
  111. package/dist/template/.pi/skills/cloudflare/references/cron-triggers/api.md +198 -0
  112. package/dist/template/.pi/skills/cloudflare/references/cron-triggers/configuration.md +151 -0
  113. package/dist/template/.pi/skills/cloudflare/references/cron-triggers/gotchas.md +129 -0
  114. package/dist/template/.pi/skills/cloudflare/references/cron-triggers/patterns.md +122 -0
  115. package/dist/template/.pi/skills/cloudflare/references/d1/README.md +92 -0
  116. package/dist/template/.pi/skills/cloudflare/references/d1/api.md +141 -0
  117. package/dist/template/.pi/skills/cloudflare/references/d1/configuration.md +127 -0
  118. package/dist/template/.pi/skills/cloudflare/references/d1/gotchas.md +70 -0
  119. package/dist/template/.pi/skills/cloudflare/references/d1/patterns.md +144 -0
  120. package/dist/template/.pi/skills/cloudflare/references/ddos/README.md +34 -0
  121. package/dist/template/.pi/skills/cloudflare/references/ddos/api.md +136 -0
  122. package/dist/template/.pi/skills/cloudflare/references/ddos/configuration.md +67 -0
  123. package/dist/template/.pi/skills/cloudflare/references/ddos/gotchas.md +114 -0
  124. package/dist/template/.pi/skills/cloudflare/references/ddos/patterns.md +158 -0
  125. package/dist/template/.pi/skills/cloudflare/references/do-storage/README.md +62 -0
  126. package/dist/template/.pi/skills/cloudflare/references/do-storage/api.md +89 -0
  127. package/dist/template/.pi/skills/cloudflare/references/do-storage/configuration.md +116 -0
  128. package/dist/template/.pi/skills/cloudflare/references/do-storage/gotchas.md +93 -0
  129. package/dist/template/.pi/skills/cloudflare/references/do-storage/patterns.md +112 -0
  130. package/dist/template/.pi/skills/cloudflare/references/durable-objects/README.md +125 -0
  131. package/dist/template/.pi/skills/cloudflare/references/durable-objects/api.md +152 -0
  132. package/dist/template/.pi/skills/cloudflare/references/durable-objects/configuration.md +148 -0
  133. package/dist/template/.pi/skills/cloudflare/references/durable-objects/gotchas.md +158 -0
  134. package/dist/template/.pi/skills/cloudflare/references/durable-objects/patterns.md +255 -0
  135. package/dist/template/.pi/skills/cloudflare/references/email-routing/README.md +18 -0
  136. package/dist/template/.pi/skills/cloudflare/references/email-routing/api.md +46 -0
  137. package/dist/template/.pi/skills/cloudflare/references/email-routing/configuration.md +63 -0
  138. package/dist/template/.pi/skills/cloudflare/references/email-routing/gotchas.md +16 -0
  139. package/dist/template/.pi/skills/cloudflare/references/email-routing/patterns.md +46 -0
  140. package/dist/template/.pi/skills/cloudflare/references/email-workers/README.md +598 -0
  141. package/dist/template/.pi/skills/cloudflare/references/hyperdrive/README.md +62 -0
  142. package/dist/template/.pi/skills/cloudflare/references/hyperdrive/api.md +137 -0
  143. package/dist/template/.pi/skills/cloudflare/references/hyperdrive/configuration.md +133 -0
  144. package/dist/template/.pi/skills/cloudflare/references/hyperdrive/gotchas.md +184 -0
  145. package/dist/template/.pi/skills/cloudflare/references/hyperdrive/patterns.md +176 -0
  146. package/dist/template/.pi/skills/cloudflare/references/images/README.md +14 -0
  147. package/dist/template/.pi/skills/cloudflare/references/images/api.md +3 -0
  148. package/dist/template/.pi/skills/cloudflare/references/images/configuration.md +45 -0
  149. package/dist/template/.pi/skills/cloudflare/references/images/gotchas.md +23 -0
  150. package/dist/template/.pi/skills/cloudflare/references/images/patterns.md +31 -0
  151. package/dist/template/.pi/skills/cloudflare/references/kv/README.md +60 -0
  152. package/dist/template/.pi/skills/cloudflare/references/kv/api.md +114 -0
  153. package/dist/template/.pi/skills/cloudflare/references/kv/configuration.md +92 -0
  154. package/dist/template/.pi/skills/cloudflare/references/kv/gotchas.md +117 -0
  155. package/dist/template/.pi/skills/cloudflare/references/kv/patterns.md +139 -0
  156. package/dist/template/.pi/skills/cloudflare/references/miniflare/README.md +64 -0
  157. package/dist/template/.pi/skills/cloudflare/references/miniflare/api.md +144 -0
  158. package/dist/template/.pi/skills/cloudflare/references/miniflare/configuration.md +203 -0
  159. package/dist/template/.pi/skills/cloudflare/references/miniflare/gotchas.md +187 -0
  160. package/dist/template/.pi/skills/cloudflare/references/miniflare/patterns.md +211 -0
  161. package/dist/template/.pi/skills/cloudflare/references/network-interconnect/README.md +60 -0
  162. package/dist/template/.pi/skills/cloudflare/references/network-interconnect/api.md +240 -0
  163. package/dist/template/.pi/skills/cloudflare/references/network-interconnect/configuration.md +127 -0
  164. package/dist/template/.pi/skills/cloudflare/references/network-interconnect/gotchas.md +171 -0
  165. package/dist/template/.pi/skills/cloudflare/references/network-interconnect/patterns.md +171 -0
  166. package/dist/template/.pi/skills/cloudflare/references/observability/README.md +18 -0
  167. package/dist/template/.pi/skills/cloudflare/references/observability/api.md +51 -0
  168. package/dist/template/.pi/skills/cloudflare/references/observability/configuration.md +60 -0
  169. package/dist/template/.pi/skills/cloudflare/references/observability/gotchas.md +36 -0
  170. package/dist/template/.pi/skills/cloudflare/references/observability/patterns.md +42 -0
  171. package/dist/template/.pi/skills/cloudflare/references/pages/README.md +76 -0
  172. package/dist/template/.pi/skills/cloudflare/references/pages/api.md +200 -0
  173. package/dist/template/.pi/skills/cloudflare/references/pages/configuration.md +228 -0
  174. package/dist/template/.pi/skills/cloudflare/references/pages/gotchas.md +161 -0
  175. package/dist/template/.pi/skills/cloudflare/references/pages/patterns.md +145 -0
  176. package/dist/template/.pi/skills/cloudflare/references/pages-functions/README.md +57 -0
  177. package/dist/template/.pi/skills/cloudflare/references/pages-functions/api.md +201 -0
  178. package/dist/template/.pi/skills/cloudflare/references/pages-functions/configuration.md +159 -0
  179. package/dist/template/.pi/skills/cloudflare/references/pages-functions/gotchas.md +151 -0
  180. package/dist/template/.pi/skills/cloudflare/references/pages-functions/patterns.md +190 -0
  181. package/dist/template/.pi/skills/cloudflare/references/pipelines/README.md +664 -0
  182. package/dist/template/.pi/skills/cloudflare/references/pulumi/README.md +107 -0
  183. package/dist/template/.pi/skills/cloudflare/references/pulumi/api.md +194 -0
  184. package/dist/template/.pi/skills/cloudflare/references/pulumi/configuration.md +216 -0
  185. package/dist/template/.pi/skills/cloudflare/references/pulumi/gotchas.md +223 -0
  186. package/dist/template/.pi/skills/cloudflare/references/pulumi/patterns.md +139 -0
  187. package/dist/template/.pi/skills/cloudflare/references/queues/README.md +69 -0
  188. package/dist/template/.pi/skills/cloudflare/references/queues/api.md +138 -0
  189. package/dist/template/.pi/skills/cloudflare/references/queues/configuration.md +125 -0
  190. package/dist/template/.pi/skills/cloudflare/references/queues/gotchas.md +112 -0
  191. package/dist/template/.pi/skills/cloudflare/references/queues/patterns.md +155 -0
  192. package/dist/template/.pi/skills/cloudflare/references/r2/README.md +61 -0
  193. package/dist/template/.pi/skills/cloudflare/references/r2/api.md +127 -0
  194. package/dist/template/.pi/skills/cloudflare/references/r2/configuration.md +76 -0
  195. package/dist/template/.pi/skills/cloudflare/references/r2/gotchas.md +94 -0
  196. package/dist/template/.pi/skills/cloudflare/references/r2/patterns.md +127 -0
  197. package/dist/template/.pi/skills/cloudflare/references/r2-data-catalog/README.md +18 -0
  198. package/dist/template/.pi/skills/cloudflare/references/r2-data-catalog/api.md +29 -0
  199. package/dist/template/.pi/skills/cloudflare/references/r2-data-catalog/configuration.md +39 -0
  200. package/dist/template/.pi/skills/cloudflare/references/r2-data-catalog/gotchas.md +20 -0
  201. package/dist/template/.pi/skills/cloudflare/references/r2-data-catalog/patterns.md +46 -0
  202. package/dist/template/.pi/skills/cloudflare/references/r2-sql/README.md +512 -0
  203. package/dist/template/.pi/skills/cloudflare/references/realtime-sfu/README.md +21 -0
  204. package/dist/template/.pi/skills/cloudflare/references/realtime-sfu/api.md +135 -0
  205. package/dist/template/.pi/skills/cloudflare/references/realtime-sfu/configuration.md +63 -0
  206. package/dist/template/.pi/skills/cloudflare/references/realtime-sfu/gotchas.md +75 -0
  207. package/dist/template/.pi/skills/cloudflare/references/realtime-sfu/patterns.md +102 -0
  208. package/dist/template/.pi/skills/cloudflare/references/realtimekit/README.md +81 -0
  209. package/dist/template/.pi/skills/cloudflare/references/realtimekit/api.md +164 -0
  210. package/dist/template/.pi/skills/cloudflare/references/realtimekit/configuration.md +147 -0
  211. package/dist/template/.pi/skills/cloudflare/references/realtimekit/gotchas.md +172 -0
  212. package/dist/template/.pi/skills/cloudflare/references/realtimekit/patterns.md +155 -0
  213. package/dist/template/.pi/skills/cloudflare/references/sandbox/README.md +90 -0
  214. package/dist/template/.pi/skills/cloudflare/references/sandbox/api.md +178 -0
  215. package/dist/template/.pi/skills/cloudflare/references/sandbox/configuration.md +131 -0
  216. package/dist/template/.pi/skills/cloudflare/references/sandbox/gotchas.md +156 -0
  217. package/dist/template/.pi/skills/cloudflare/references/sandbox/patterns.md +203 -0
  218. package/dist/template/.pi/skills/cloudflare/references/secrets-store/README.md +58 -0
  219. package/dist/template/.pi/skills/cloudflare/references/secrets-store/api.md +182 -0
  220. package/dist/template/.pi/skills/cloudflare/references/secrets-store/configuration.md +140 -0
  221. package/dist/template/.pi/skills/cloudflare/references/secrets-store/gotchas.md +129 -0
  222. package/dist/template/.pi/skills/cloudflare/references/secrets-store/patterns.md +218 -0
  223. package/dist/template/.pi/skills/cloudflare/references/smart-placement/README.md +91 -0
  224. package/dist/template/.pi/skills/cloudflare/references/smart-placement/api.md +139 -0
  225. package/dist/template/.pi/skills/cloudflare/references/smart-placement/configuration.md +129 -0
  226. package/dist/template/.pi/skills/cloudflare/references/smart-placement/gotchas.md +87 -0
  227. package/dist/template/.pi/skills/cloudflare/references/smart-placement/patterns.md +135 -0
  228. package/dist/template/.pi/skills/cloudflare/references/snippets/README.md +15 -0
  229. package/dist/template/.pi/skills/cloudflare/references/snippets/api.md +47 -0
  230. package/dist/template/.pi/skills/cloudflare/references/snippets/configuration.md +33 -0
  231. package/dist/template/.pi/skills/cloudflare/references/snippets/gotchas.md +21 -0
  232. package/dist/template/.pi/skills/cloudflare/references/snippets/patterns.md +34 -0
  233. package/dist/template/.pi/skills/cloudflare/references/spectrum/README.md +16 -0
  234. package/dist/template/.pi/skills/cloudflare/references/spectrum/api.md +24 -0
  235. package/dist/template/.pi/skills/cloudflare/references/spectrum/configuration.md +43 -0
  236. package/dist/template/.pi/skills/cloudflare/references/spectrum/gotchas.md +42 -0
  237. package/dist/template/.pi/skills/cloudflare/references/spectrum/patterns.md +40 -0
  238. package/dist/template/.pi/skills/cloudflare/references/static-assets/README.md +14 -0
  239. package/dist/template/.pi/skills/cloudflare/references/static-assets/api.md +3 -0
  240. package/dist/template/.pi/skills/cloudflare/references/static-assets/configuration.md +47 -0
  241. package/dist/template/.pi/skills/cloudflare/references/static-assets/gotchas.md +44 -0
  242. package/dist/template/.pi/skills/cloudflare/references/static-assets/patterns.md +42 -0
  243. package/dist/template/.pi/skills/cloudflare/references/stream/README.md +103 -0
  244. package/dist/template/.pi/skills/cloudflare/references/stream/api.md +204 -0
  245. package/dist/template/.pi/skills/cloudflare/references/stream/configuration.md +127 -0
  246. package/dist/template/.pi/skills/cloudflare/references/stream/gotchas.md +131 -0
  247. package/dist/template/.pi/skills/cloudflare/references/stream/patterns.md +152 -0
  248. package/dist/template/.pi/skills/cloudflare/references/tail-workers/README.md +640 -0
  249. package/dist/template/.pi/skills/cloudflare/references/terraform/README.md +76 -0
  250. package/dist/template/.pi/skills/cloudflare/references/terraform/api.md +159 -0
  251. package/dist/template/.pi/skills/cloudflare/references/terraform/configuration.md +156 -0
  252. package/dist/template/.pi/skills/cloudflare/references/terraform/gotchas.md +207 -0
  253. package/dist/template/.pi/skills/cloudflare/references/terraform/patterns.md +135 -0
  254. package/dist/template/.pi/skills/cloudflare/references/tunnel/README.md +82 -0
  255. package/dist/template/.pi/skills/cloudflare/references/tunnel/api.md +105 -0
  256. package/dist/template/.pi/skills/cloudflare/references/tunnel/configuration.md +113 -0
  257. package/dist/template/.pi/skills/cloudflare/references/tunnel/gotchas.md +115 -0
  258. package/dist/template/.pi/skills/cloudflare/references/tunnel/patterns.md +157 -0
  259. package/dist/template/.pi/skills/cloudflare/references/turn/README.md +699 -0
  260. package/dist/template/.pi/skills/cloudflare/references/turnstile/README.md +14 -0
  261. package/dist/template/.pi/skills/cloudflare/references/turnstile/api.md +3 -0
  262. package/dist/template/.pi/skills/cloudflare/references/turnstile/configuration.md +19 -0
  263. package/dist/template/.pi/skills/cloudflare/references/turnstile/gotchas.md +27 -0
  264. package/dist/template/.pi/skills/cloudflare/references/turnstile/patterns.md +41 -0
  265. package/dist/template/.pi/skills/cloudflare/references/vectorize/README.md +682 -0
  266. package/dist/template/.pi/skills/cloudflare/references/waf/README.md +14 -0
  267. package/dist/template/.pi/skills/cloudflare/references/waf/api.md +3 -0
  268. package/dist/template/.pi/skills/cloudflare/references/waf/configuration.md +44 -0
  269. package/dist/template/.pi/skills/cloudflare/references/waf/gotchas.md +24 -0
  270. package/dist/template/.pi/skills/cloudflare/references/waf/patterns.md +29 -0
  271. package/dist/template/.pi/skills/cloudflare/references/web-analytics/README.md +19 -0
  272. package/dist/template/.pi/skills/cloudflare/references/web-analytics/api.md +52 -0
  273. package/dist/template/.pi/skills/cloudflare/references/web-analytics/configuration.md +31 -0
  274. package/dist/template/.pi/skills/cloudflare/references/web-analytics/gotchas.md +28 -0
  275. package/dist/template/.pi/skills/cloudflare/references/web-analytics/patterns.md +52 -0
  276. package/dist/template/.pi/skills/cloudflare/references/workerd/README.md +47 -0
  277. package/dist/template/.pi/skills/cloudflare/references/workerd/api.md +199 -0
  278. package/dist/template/.pi/skills/cloudflare/references/workerd/configuration.md +185 -0
  279. package/dist/template/.pi/skills/cloudflare/references/workerd/gotchas.md +203 -0
  280. package/dist/template/.pi/skills/cloudflare/references/workerd/patterns.md +216 -0
  281. package/dist/template/.pi/skills/cloudflare/references/workers/README.md +96 -0
  282. package/dist/template/.pi/skills/cloudflare/references/workers/api.md +137 -0
  283. package/dist/template/.pi/skills/cloudflare/references/workers/configuration.md +147 -0
  284. package/dist/template/.pi/skills/cloudflare/references/workers/gotchas.md +99 -0
  285. package/dist/template/.pi/skills/cloudflare/references/workers/patterns.md +149 -0
  286. package/dist/template/.pi/skills/cloudflare/references/workers-ai/README.md +116 -0
  287. package/dist/template/.pi/skills/cloudflare/references/workers-for-platforms/README.md +48 -0
  288. package/dist/template/.pi/skills/cloudflare/references/workers-for-platforms/api.md +169 -0
  289. package/dist/template/.pi/skills/cloudflare/references/workers-for-platforms/configuration.md +136 -0
  290. package/dist/template/.pi/skills/cloudflare/references/workers-for-platforms/gotchas.md +130 -0
  291. package/dist/template/.pi/skills/cloudflare/references/workers-for-platforms/patterns.md +170 -0
  292. package/dist/template/.pi/skills/cloudflare/references/workers-playground/README.md +16 -0
  293. package/dist/template/.pi/skills/cloudflare/references/workers-playground/api.md +20 -0
  294. package/dist/template/.pi/skills/cloudflare/references/workers-playground/configuration.md +3 -0
  295. package/dist/template/.pi/skills/cloudflare/references/workers-playground/gotchas.md +35 -0
  296. package/dist/template/.pi/skills/cloudflare/references/workers-playground/patterns.md +42 -0
  297. package/dist/template/.pi/skills/cloudflare/references/workers-vpc/README.md +579 -0
  298. package/dist/template/.pi/skills/cloudflare/references/workflows/README.md +62 -0
  299. package/dist/template/.pi/skills/cloudflare/references/workflows/api.md +125 -0
  300. package/dist/template/.pi/skills/cloudflare/references/workflows/configuration.md +177 -0
  301. package/dist/template/.pi/skills/cloudflare/references/workflows/gotchas.md +136 -0
  302. package/dist/template/.pi/skills/cloudflare/references/workflows/patterns.md +132 -0
  303. package/dist/template/.pi/skills/cloudflare/references/wrangler/README.md +90 -0
  304. package/dist/template/.pi/skills/cloudflare/references/wrangler/api.md +140 -0
  305. package/dist/template/.pi/skills/cloudflare/references/wrangler/configuration.md +128 -0
  306. package/dist/template/.pi/skills/cloudflare/references/wrangler/gotchas.md +93 -0
  307. package/dist/template/.pi/skills/cloudflare/references/wrangler/patterns.md +150 -0
  308. package/dist/template/.pi/skills/cloudflare/references/zaraz/README.md +360 -0
  309. package/dist/template/.pi/skills/code-cleanup/SKILL.md +232 -0
  310. package/dist/template/.pi/skills/code-review-and-quality/SKILL.md +344 -0
  311. package/dist/template/.pi/skills/code-simplification/SKILL.md +348 -0
  312. package/dist/template/.pi/skills/context-engineering/SKILL.md +296 -0
  313. package/dist/template/.pi/skills/core-data-expert/SKILL.md +117 -0
  314. package/dist/template/.pi/skills/core-data-expert/references/batch-operations.md +543 -0
  315. package/dist/template/.pi/skills/core-data-expert/references/cloudkit-integration.md +259 -0
  316. package/dist/template/.pi/skills/core-data-expert/references/concurrency.md +522 -0
  317. package/dist/template/.pi/skills/core-data-expert/references/fetch-requests.md +643 -0
  318. package/dist/template/.pi/skills/core-data-expert/references/glossary.md +233 -0
  319. package/dist/template/.pi/skills/core-data-expert/references/migration.md +393 -0
  320. package/dist/template/.pi/skills/core-data-expert/references/model-configuration.md +597 -0
  321. package/dist/template/.pi/skills/core-data-expert/references/performance.md +300 -0
  322. package/dist/template/.pi/skills/core-data-expert/references/persistent-history.md +553 -0
  323. package/dist/template/.pi/skills/core-data-expert/references/project-audit.md +60 -0
  324. package/dist/template/.pi/skills/core-data-expert/references/saving.md +574 -0
  325. package/dist/template/.pi/skills/core-data-expert/references/stack-setup.md +625 -0
  326. package/dist/template/.pi/skills/core-data-expert/references/testing.md +300 -0
  327. package/dist/template/.pi/skills/core-data-expert/references/threading.md +589 -0
  328. package/dist/template/.pi/skills/debugging-and-error-recovery/SKILL.md +274 -0
  329. package/dist/template/.pi/skills/deep-module-design/SKILL.md +218 -0
  330. package/dist/template/.pi/skills/defense-in-depth/SKILL.md +161 -0
  331. package/dist/template/.pi/skills/deprecation-and-migration/SKILL.md +186 -0
  332. package/dist/template/.pi/skills/design-system-audit/SKILL.md +176 -0
  333. package/dist/template/.pi/skills/design-taste-frontend/SKILL.md +255 -0
  334. package/dist/template/.pi/skills/development-lifecycle/SKILL.md +285 -0
  335. package/dist/template/.pi/skills/documentation-and-adrs/SKILL.md +217 -0
  336. package/dist/template/.pi/skills/doubt-driven-development/SKILL.md +207 -0
  337. package/dist/template/.pi/skills/fallow/SKILL.md +457 -0
  338. package/dist/template/.pi/skills/fallow/references/cli-reference.md +1905 -0
  339. package/dist/template/.pi/skills/fallow/references/gotchas.md +644 -0
  340. package/dist/template/.pi/skills/fallow/references/patterns.md +791 -0
  341. package/dist/template/.pi/skills/figma/SKILL.md +241 -0
  342. package/dist/template/.pi/skills/frontend-design/SKILL.md +262 -0
  343. package/dist/template/.pi/skills/frontend-design/references/animation/motion-advanced.md +224 -0
  344. package/dist/template/.pi/skills/frontend-design/references/animation/motion-core.md +181 -0
  345. package/dist/template/.pi/skills/frontend-design/references/canvas/execution.md +90 -0
  346. package/dist/template/.pi/skills/frontend-design/references/canvas/philosophy.md +94 -0
  347. package/dist/template/.pi/skills/frontend-design/references/design/color-system.md +111 -0
  348. package/dist/template/.pi/skills/frontend-design/references/design/interaction.md +149 -0
  349. package/dist/template/.pi/skills/frontend-design/references/design/typography-rules.md +106 -0
  350. package/dist/template/.pi/skills/frontend-design/references/design/ux-writing.md +99 -0
  351. package/dist/template/.pi/skills/frontend-design/references/shadcn/accessibility.md +132 -0
  352. package/dist/template/.pi/skills/frontend-design/references/shadcn/core-components.md +153 -0
  353. package/dist/template/.pi/skills/frontend-design/references/shadcn/form-components.md +158 -0
  354. package/dist/template/.pi/skills/frontend-design/references/shadcn/setup.md +69 -0
  355. package/dist/template/.pi/skills/frontend-design/references/shadcn/theming.md +152 -0
  356. package/dist/template/.pi/skills/frontend-design/references/tailwind/responsive.md +112 -0
  357. package/dist/template/.pi/skills/frontend-design/references/tailwind/utilities-layout.md +134 -0
  358. package/dist/template/.pi/skills/frontend-design/references/tailwind/utilities-styling.md +165 -0
  359. package/dist/template/.pi/skills/frontend-design/references/tailwind/v4-config.md +147 -0
  360. package/dist/template/.pi/skills/frontend-design/references/tailwind/v4-features.md +128 -0
  361. package/dist/template/.pi/skills/frontend-ui-engineering/SKILL.md +217 -0
  362. package/dist/template/.pi/skills/gemini-large-context/SKILL.md +238 -0
  363. package/dist/template/.pi/skills/git-workflow-and-versioning/SKILL.md +217 -0
  364. package/dist/template/.pi/skills/grill-me/SKILL.md +162 -0
  365. package/dist/template/.pi/skills/high-end-visual-design/SKILL.md +128 -0
  366. package/dist/template/.pi/skills/idea-refine/SKILL.md +195 -0
  367. package/dist/template/.pi/skills/idea-refine/examples.md +62 -0
  368. package/dist/template/.pi/skills/idea-refine/frameworks.md +63 -0
  369. package/dist/template/.pi/skills/idea-refine/refinement-criteria.md +56 -0
  370. package/dist/template/.pi/skills/incremental-implementation/SKILL.md +190 -0
  371. package/dist/template/.pi/skills/industrial-brutalist-ui/SKILL.md +131 -0
  372. package/dist/template/.pi/skills/interview-me/SKILL.md +227 -0
  373. package/dist/template/.pi/skills/jira/SKILL.md +306 -0
  374. package/dist/template/.pi/skills/loop-audit/SKILL.md +141 -0
  375. package/dist/template/.pi/skills/loop-cost/SKILL.md +130 -0
  376. package/dist/template/.pi/skills/loop-engineering/SKILL.md +175 -0
  377. package/dist/template/.pi/skills/minimalist-ui/SKILL.md +124 -0
  378. package/dist/template/.pi/skills/mockup-to-code/SKILL.md +197 -0
  379. package/dist/template/.pi/skills/observability-and-instrumentation/SKILL.md +202 -0
  380. package/dist/template/.pi/skills/opensrc/SKILL.md +297 -0
  381. package/dist/template/.pi/skills/opensrc/references/architecture.md +176 -0
  382. package/dist/template/.pi/skills/opensrc/references/cli-usage.md +176 -0
  383. package/dist/template/.pi/skills/opensrc/references/registry-support.md +137 -0
  384. package/dist/template/.pi/skills/pdf-extract/SKILL.md +461 -0
  385. package/dist/template/.pi/skills/performance-optimization/SKILL.md +233 -0
  386. package/dist/template/.pi/skills/performance-optimization/references/performance-checklist.md +85 -0
  387. package/dist/template/.pi/skills/planning-and-task-breakdown/SKILL.md +204 -0
  388. package/dist/template/.pi/skills/playwright/SKILL.md +404 -0
  389. package/dist/template/.pi/skills/playwright/references/agent-browser-cli.md +405 -0
  390. package/dist/template/.pi/skills/polar/SKILL.md +125 -0
  391. package/dist/template/.pi/skills/react-best-practices/SKILL.md +156 -0
  392. package/dist/template/.pi/skills/react-best-practices/rules/_sections.md +46 -0
  393. package/dist/template/.pi/skills/react-best-practices/rules/_template.md +28 -0
  394. package/dist/template/.pi/skills/react-best-practices/rules/advanced-event-handler-refs.md +55 -0
  395. package/dist/template/.pi/skills/react-best-practices/rules/advanced-use-latest.md +49 -0
  396. package/dist/template/.pi/skills/react-best-practices/rules/async-api-routes.md +38 -0
  397. package/dist/template/.pi/skills/react-best-practices/rules/async-defer-await.md +80 -0
  398. package/dist/template/.pi/skills/react-best-practices/rules/async-dependencies.md +36 -0
  399. package/dist/template/.pi/skills/react-best-practices/rules/async-parallel.md +28 -0
  400. package/dist/template/.pi/skills/react-best-practices/rules/async-suspense-boundaries.md +99 -0
  401. package/dist/template/.pi/skills/react-best-practices/rules/bundle-barrel-imports.md +59 -0
  402. package/dist/template/.pi/skills/react-best-practices/rules/bundle-conditional.md +31 -0
  403. package/dist/template/.pi/skills/react-best-practices/rules/bundle-defer-third-party.md +49 -0
  404. package/dist/template/.pi/skills/react-best-practices/rules/bundle-dynamic-imports.md +35 -0
  405. package/dist/template/.pi/skills/react-best-practices/rules/bundle-preload.md +50 -0
  406. package/dist/template/.pi/skills/react-best-practices/rules/client-event-listeners.md +74 -0
  407. package/dist/template/.pi/skills/react-best-practices/rules/client-localstorage-schema.md +71 -0
  408. package/dist/template/.pi/skills/react-best-practices/rules/client-passive-event-listeners.md +48 -0
  409. package/dist/template/.pi/skills/react-best-practices/rules/client-swr-dedup.md +56 -0
  410. package/dist/template/.pi/skills/react-best-practices/rules/js-batch-dom-css.md +82 -0
  411. package/dist/template/.pi/skills/react-best-practices/rules/js-cache-function-results.md +80 -0
  412. package/dist/template/.pi/skills/react-best-practices/rules/js-cache-property-access.md +28 -0
  413. package/dist/template/.pi/skills/react-best-practices/rules/js-cache-storage.md +70 -0
  414. package/dist/template/.pi/skills/react-best-practices/rules/js-combine-iterations.md +32 -0
  415. package/dist/template/.pi/skills/react-best-practices/rules/js-early-exit.md +50 -0
  416. package/dist/template/.pi/skills/react-best-practices/rules/js-hoist-regexp.md +45 -0
  417. package/dist/template/.pi/skills/react-best-practices/rules/js-index-maps.md +37 -0
  418. package/dist/template/.pi/skills/react-best-practices/rules/js-length-check-first.md +49 -0
  419. package/dist/template/.pi/skills/react-best-practices/rules/js-min-max-loop.md +82 -0
  420. package/dist/template/.pi/skills/react-best-practices/rules/js-set-map-lookups.md +24 -0
  421. package/dist/template/.pi/skills/react-best-practices/rules/js-tosorted-immutable.md +57 -0
  422. package/dist/template/.pi/skills/react-best-practices/rules/rendering-activity.md +26 -0
  423. package/dist/template/.pi/skills/react-best-practices/rules/rendering-animate-svg-wrapper.md +47 -0
  424. package/dist/template/.pi/skills/react-best-practices/rules/rendering-conditional-render.md +40 -0
  425. package/dist/template/.pi/skills/react-best-practices/rules/rendering-content-visibility.md +38 -0
  426. package/dist/template/.pi/skills/react-best-practices/rules/rendering-hoist-jsx.md +46 -0
  427. package/dist/template/.pi/skills/react-best-practices/rules/rendering-hydration-no-flicker.md +82 -0
  428. package/dist/template/.pi/skills/react-best-practices/rules/rendering-svg-precision.md +28 -0
  429. package/dist/template/.pi/skills/react-best-practices/rules/rerender-defer-reads.md +39 -0
  430. package/dist/template/.pi/skills/react-best-practices/rules/rerender-dependencies.md +45 -0
  431. package/dist/template/.pi/skills/react-best-practices/rules/rerender-derived-state.md +29 -0
  432. package/dist/template/.pi/skills/react-best-practices/rules/rerender-functional-setstate.md +74 -0
  433. package/dist/template/.pi/skills/react-best-practices/rules/rerender-lazy-state-init.md +58 -0
  434. package/dist/template/.pi/skills/react-best-practices/rules/rerender-memo.md +44 -0
  435. package/dist/template/.pi/skills/react-best-practices/rules/rerender-transitions.md +40 -0
  436. package/dist/template/.pi/skills/react-best-practices/rules/server-after-nonblocking.md +73 -0
  437. package/dist/template/.pi/skills/react-best-practices/rules/server-cache-lru.md +41 -0
  438. package/dist/template/.pi/skills/react-best-practices/rules/server-cache-react.md +76 -0
  439. package/dist/template/.pi/skills/react-best-practices/rules/server-parallel-fetching.md +83 -0
  440. package/dist/template/.pi/skills/react-best-practices/rules/server-serialization.md +38 -0
  441. package/dist/template/.pi/skills/redesign-existing-projects/SKILL.md +217 -0
  442. package/dist/template/.pi/skills/resend/SKILL.md +196 -0
  443. package/dist/template/.pi/skills/resend/references/react-email.md +287 -0
  444. package/dist/template/.pi/skills/resend/references/receive-email.md +248 -0
  445. package/dist/template/.pi/skills/resend/references/send-email.md +318 -0
  446. package/dist/template/.pi/skills/root-cause-tracing/SKILL.md +216 -0
  447. package/dist/template/.pi/skills/security-and-hardening/SKILL.md +293 -0
  448. package/dist/template/.pi/skills/security-and-hardening/references/security-checklist.md +105 -0
  449. package/dist/template/.pi/skills/shipping-and-launch/SKILL.md +101 -0
  450. package/dist/template/.pi/skills/source-driven-development/SKILL.md +108 -0
  451. package/dist/template/.pi/skills/spec-driven-development/SKILL.md +177 -0
  452. package/dist/template/.pi/skills/srcwalk/SKILL.md +182 -0
  453. package/dist/template/.pi/skills/subagent-driven-development/SKILL.md +253 -0
  454. package/dist/template/.pi/skills/supabase/SKILL.md +153 -0
  455. package/dist/template/.pi/skills/supabase-postgres-best-practices/SKILL.md +88 -0
  456. package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/advanced-full-text-search.md +55 -0
  457. package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/advanced-jsonb-indexing.md +49 -0
  458. package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/conn-idle-timeout.md +46 -0
  459. package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/conn-limits.md +44 -0
  460. package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/conn-pooling.md +41 -0
  461. package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/conn-prepared-statements.md +46 -0
  462. package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/data-batch-inserts.md +54 -0
  463. package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/data-n-plus-one.md +53 -0
  464. package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/data-pagination.md +50 -0
  465. package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/data-upsert.md +50 -0
  466. package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/lock-advisory.md +56 -0
  467. package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/lock-deadlock-prevention.md +68 -0
  468. package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/lock-short-transactions.md +50 -0
  469. package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/lock-skip-locked.md +54 -0
  470. package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/monitor-explain-analyze.md +45 -0
  471. package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/monitor-pg-stat-statements.md +55 -0
  472. package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/monitor-vacuum-analyze.md +55 -0
  473. package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/query-composite-indexes.md +44 -0
  474. package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/query-covering-indexes.md +40 -0
  475. package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/query-index-types.md +45 -0
  476. package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/query-missing-indexes.md +43 -0
  477. package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/query-partial-indexes.md +45 -0
  478. package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/schema-data-types.md +46 -0
  479. package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/schema-foreign-key-indexes.md +59 -0
  480. package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/schema-lowercase-identifiers.md +55 -0
  481. package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/schema-partitioning.md +55 -0
  482. package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/schema-primary-keys.md +61 -0
  483. package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/security-privileges.md +54 -0
  484. package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/security-rls-basics.md +50 -0
  485. package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/security-rls-performance.md +57 -0
  486. package/dist/template/.pi/skills/swift-concurrency/SKILL.md +290 -0
  487. package/dist/template/.pi/skills/swift-concurrency/references/actors.md +640 -0
  488. package/dist/template/.pi/skills/swift-concurrency/references/async-algorithms.md +822 -0
  489. package/dist/template/.pi/skills/swift-concurrency/references/async-await-basics.md +249 -0
  490. package/dist/template/.pi/skills/swift-concurrency/references/async-sequences.md +670 -0
  491. package/dist/template/.pi/skills/swift-concurrency/references/core-data.md +533 -0
  492. package/dist/template/.pi/skills/swift-concurrency/references/glossary.md +128 -0
  493. package/dist/template/.pi/skills/swift-concurrency/references/linting.md +142 -0
  494. package/dist/template/.pi/skills/swift-concurrency/references/memory-management.md +542 -0
  495. package/dist/template/.pi/skills/swift-concurrency/references/migration.md +1076 -0
  496. package/dist/template/.pi/skills/swift-concurrency/references/performance.md +574 -0
  497. package/dist/template/.pi/skills/swift-concurrency/references/sendable.md +578 -0
  498. package/dist/template/.pi/skills/swift-concurrency/references/tasks.md +604 -0
  499. package/dist/template/.pi/skills/swift-concurrency/references/testing.md +565 -0
  500. package/dist/template/.pi/skills/swift-concurrency/references/threading.md +452 -0
  501. package/dist/template/.pi/skills/swiftui-expert-skill/SKILL.md +343 -0
  502. package/dist/template/.pi/skills/swiftui-expert-skill/references/animation-advanced.md +351 -0
  503. package/dist/template/.pi/skills/swiftui-expert-skill/references/animation-basics.md +284 -0
  504. package/dist/template/.pi/skills/swiftui-expert-skill/references/animation-transitions.md +326 -0
  505. package/dist/template/.pi/skills/swiftui-expert-skill/references/image-optimization.md +286 -0
  506. package/dist/template/.pi/skills/swiftui-expert-skill/references/layout-best-practices.md +312 -0
  507. package/dist/template/.pi/skills/swiftui-expert-skill/references/liquid-glass.md +377 -0
  508. package/dist/template/.pi/skills/swiftui-expert-skill/references/list-patterns.md +153 -0
  509. package/dist/template/.pi/skills/swiftui-expert-skill/references/modern-apis.md +400 -0
  510. package/dist/template/.pi/skills/swiftui-expert-skill/references/performance-patterns.md +377 -0
  511. package/dist/template/.pi/skills/swiftui-expert-skill/references/scroll-patterns.md +305 -0
  512. package/dist/template/.pi/skills/swiftui-expert-skill/references/sheet-navigation-patterns.md +292 -0
  513. package/dist/template/.pi/skills/swiftui-expert-skill/references/state-management.md +447 -0
  514. package/dist/template/.pi/skills/swiftui-expert-skill/references/text-formatting.md +285 -0
  515. package/dist/template/.pi/skills/swiftui-expert-skill/references/view-structure.md +276 -0
  516. package/dist/template/.pi/skills/test-driven-development/SKILL.md +400 -0
  517. package/dist/template/.pi/skills/test-driven-development/references/testing-patterns.md +155 -0
  518. package/dist/template/.pi/skills/testing-anti-patterns/SKILL.md +339 -0
  519. package/dist/template/.pi/skills/using-agent-skills/SKILL.md +371 -0
  520. package/dist/template/.pi/skills/using-git-worktrees/SKILL.md +275 -0
  521. package/dist/template/.pi/skills/vercel-deploy-claimable/SKILL.md +144 -0
  522. package/dist/template/.pi/skills/vercel-deploy-claimable/scripts/deploy.sh +249 -0
  523. package/dist/template/.pi/skills/verification-before-completion/SKILL.md +348 -0
  524. package/dist/template/.pi/skills/webclaw/SKILL.md +188 -0
  525. package/dist/template/.pi/skills/writing-skills/SKILL.md +329 -0
  526. package/dist/template/.pi/skills/writing-skills/references/anti-patterns.md +25 -0
  527. package/dist/template/.pi/skills/writing-skills/references/claude-search-optimization.md +140 -0
  528. package/dist/template/.pi/skills/writing-skills/references/discovery-workflow.md +11 -0
  529. package/dist/template/.pi/skills/writing-skills/references/file-organization.md +32 -0
  530. package/dist/template/.pi/skills/writing-skills/references/flowcharts-and-examples.md +57 -0
  531. package/dist/template/.pi/skills/writing-skills/references/rationalization-hardening.md +75 -0
  532. package/dist/template/.pi/skills/writing-skills/references/testing-methodology.md +397 -0
  533. package/dist/template/.pi/skills/writing-skills/references/testing-skill-types.md +52 -0
  534. package/dist/template/.pi/subagents.json +10 -0
  535. package/dist/template/.pi/templates/adr.md +47 -0
  536. package/dist/template/.pi/templates/design.md +61 -0
  537. package/dist/template/.pi/templates/loop-github-action.yml +162 -0
  538. package/dist/template/.pi/templates/loop-orchestrator.sh +514 -0
  539. package/dist/template/.pi/templates/loop-orchestrator.test.ts +332 -0
  540. package/dist/template/.pi/templates/loop-orchestrator.ts +936 -0
  541. package/dist/template/.pi/templates/loop-state.json +24 -0
  542. package/dist/template/.pi/templates/loop-state.md +98 -0
  543. package/dist/template/.pi/templates/loop-vision.md +110 -0
  544. package/dist/template/.pi/templates/prd.md +204 -0
  545. package/dist/template/.pi/templates/progress.md +55 -0
  546. package/dist/template/.pi/templates/project.md +58 -0
  547. package/dist/template/.pi/templates/proposal.md +40 -0
  548. package/dist/template/.pi/templates/review-state.json +20 -0
  549. package/dist/template/.pi/templates/roadmap.md +93 -0
  550. package/dist/template/.pi/templates/state.md +97 -0
  551. package/dist/template/.pi/templates/tasks.md +202 -0
  552. package/dist/template/.pi/templates/tech-stack.md +85 -0
  553. package/dist/template/.pi/templates/user.md +26 -0
  554. package/dist/template/.pi/workflows/INDEX.md +63 -0
  555. package/dist/template/.pi/workflows/audit-pattern.md +84 -0
  556. package/dist/template/.pi/workflows/batch-implement.md +121 -0
  557. package/dist/template/.pi/workflows/deep-research.md +89 -0
  558. package/dist/template/.pi/workflows/development-lifecycle-workflow.md +175 -0
  559. package/dist/template/.pi/workflows/garbage-collection.md +144 -0
  560. package/dist/template/.pi/workflows/quality-loop.md +211 -0
  561. package/package.json +57 -0
@@ -0,0 +1,343 @@
1
+ ---
2
+ name: swiftui-expert-skill
3
+ description: Write, review, or improve SwiftUI code following best practices for state management, view composition, performance, modern APIs, Swift concurrency, and iOS 26+ Liquid Glass adoption. Use when building new SwiftUI features, refactoring existing views, reviewing code quality, or adopting modern SwiftUI patterns.
4
+ ---
5
+
6
+ # SwiftUI Expert Skill
7
+
8
+ ## When to Use
9
+
10
+ - When building, reviewing, or refactoring SwiftUI code with modern APIs and best practices.
11
+
12
+ ## When NOT to Use
13
+
14
+ - When the task does not involve SwiftUI (e.g., UIKit-only or non-Apple platforms).
15
+
16
+ ## Overview
17
+
18
+ Use this skill to build, review, or improve SwiftUI features with correct state management, modern API usage, Swift concurrency best practices, optimal view composition, and iOS 26+ Liquid Glass styling. Prioritize native APIs, Apple design guidance, and performance-conscious patterns. This skill focuses on facts and best practices without enforcing specific architectural patterns.
19
+
20
+ ## Workflow Decision Tree
21
+
22
+ ### 1) Review existing SwiftUI code
23
+
24
+ - Check property wrapper usage against the selection guide (see `references/state-management.md`)
25
+ - Verify modern API usage (see `references/modern-apis.md`)
26
+ - Verify view composition follows extraction rules (see `references/view-structure.md`)
27
+ - Check performance patterns are applied (see `references/performance-patterns.md`)
28
+ - Verify list patterns use stable identity (see `references/list-patterns.md`)
29
+ - Check animation patterns for correctness (see `references/animation-basics.md`, `references/animation-transitions.md`)
30
+ - Inspect Liquid Glass usage for correctness and consistency (see `references/liquid-glass.md`)
31
+ - Validate iOS 26+ availability handling with sensible fallbacks
32
+
33
+ ### 2) Improve existing SwiftUI code
34
+
35
+ - Audit state management for correct wrapper selection (prefer `@Observable` over `ObservableObject`)
36
+ - Replace deprecated APIs with modern equivalents (see `references/modern-apis.md`)
37
+ - Extract complex views into separate subviews (see `references/view-structure.md`)
38
+ - Refactor hot paths to minimize redundant state updates (see `references/performance-patterns.md`)
39
+ - Ensure ForEach uses stable identity (see `references/list-patterns.md`)
40
+ - Improve animation patterns (use value parameter, proper transitions, see `references/animation-basics.md`, `references/animation-transitions.md`)
41
+ - Suggest image downsampling when `UIImage(data:)` is used (as optional optimization, see `references/image-optimization.md`)
42
+ - Adopt Liquid Glass only when explicitly requested by the user
43
+
44
+ ### 3) Implement new SwiftUI feature
45
+
46
+ - Design data flow first: identify owned vs injected state (see `references/state-management.md`)
47
+ - Use modern APIs (no deprecated modifiers or patterns, see `references/modern-apis.md`)
48
+ - Use `@Observable` for shared state (with `@MainActor` if not using default actor isolation)
49
+ - Structure views for optimal diffing (extract subviews early, keep views small, see `references/view-structure.md`)
50
+ - Separate business logic into testable models (see `references/layout-best-practices.md`)
51
+ - Use correct animation patterns (implicit vs explicit, transitions, see `references/animation-basics.md`, `references/animation-transitions.md`, `references/animation-advanced.md`)
52
+ - Apply glass effects after layout/appearance modifiers (see `references/liquid-glass.md`)
53
+ - Gate iOS 26+ features with `#available` and provide fallbacks
54
+
55
+ ## Core Guidelines
56
+
57
+ ### State Management
58
+
59
+ - **Always prefer `@Observable` over `ObservableObject`** for new code
60
+ - **Mark `@Observable` classes with `@MainActor`** unless using default actor isolation
61
+ - **Always mark `@State` and `@StateObject` as `private`** (makes dependencies clear)
62
+ - **Never declare passed values as `@State` or `@StateObject`** (they only accept initial values)
63
+ - Use `@State` with `@Observable` classes (not `@StateObject`)
64
+ - `@Binding` only when child needs to **modify** parent state
65
+ - `@Bindable` for injected `@Observable` objects needing bindings
66
+ - Use `let` for read-only values; `var` + `.onChange()` for reactive reads
67
+ - Legacy: `@StateObject` for owned `ObservableObject`; `@ObservedObject` for injected
68
+ - Nested `ObservableObject` doesn't work (pass nested objects directly); `@Observable` handles nesting fine
69
+
70
+ ### Modern APIs
71
+
72
+ - Use `foregroundStyle()` instead of `foregroundColor()`
73
+ - Use `clipShape(.rect(cornerRadius:))` instead of `cornerRadius()`
74
+ - Use `Tab` API instead of `tabItem()`
75
+ - Use `Button` instead of `onTapGesture()` (unless need location/count)
76
+ - Use `NavigationStack` instead of `NavigationView`
77
+ - Use `navigationDestination(for:)` for type-safe navigation
78
+ - Use two-parameter or no-parameter `onChange()` variant
79
+ - Use `ImageRenderer` for rendering SwiftUI views
80
+ - Use `.sheet(item:)` instead of `.sheet(isPresented:)` for model-based content
81
+ - Sheets should own their actions and call `dismiss()` internally
82
+ - Use `ScrollViewReader` for programmatic scrolling with stable IDs
83
+ - Avoid `UIScreen.main.bounds` for sizing
84
+ - Avoid `GeometryReader` when alternatives exist (e.g., `containerRelativeFrame()`)
85
+
86
+ ### Swift Best Practices
87
+
88
+ - Use modern Text formatting (`.format` parameters, not `String(format:)`)
89
+ - Use `localizedStandardContains()` for user-input filtering (not `contains()`)
90
+ - Prefer static member lookup (`.blue` vs `Color.blue`)
91
+ - Use `.task` modifier for automatic cancellation of async work
92
+ - Use `.task(id:)` for value-dependent tasks
93
+
94
+ ### View Composition
95
+
96
+ - **Prefer modifiers over conditional views** for state changes (maintains view identity)
97
+ - Extract complex views into separate subviews for better readability and performance
98
+ - Keep views small for optimal performance
99
+ - Keep view `body` simple and pure (no side effects or complex logic)
100
+ - Use `@ViewBuilder` functions only for small, simple sections
101
+ - Prefer `@ViewBuilder let content: Content` over closure-based content properties
102
+ - Separate business logic into testable models (not about enforcing architectures)
103
+ - Action handlers should reference methods, not contain inline logic
104
+ - Use relative layout over hard-coded constants
105
+ - Views should work in any context (don't assume screen size or presentation style)
106
+
107
+ ### Performance
108
+
109
+ - Pass only needed values to views (avoid large "config" or "context" objects)
110
+ - Eliminate unnecessary dependencies to reduce update fan-out
111
+ - Check for value changes before assigning state in hot paths
112
+ - Avoid redundant state updates in `onReceive`, `onChange`, scroll handlers
113
+ - Minimize work in frequently executed code paths
114
+ - Use `LazyVStack`/`LazyHStack` for large lists
115
+ - Use stable identity for `ForEach` (never `.indices` for dynamic content)
116
+ - Ensure constant number of views per `ForEach` element
117
+ - Avoid inline filtering in `ForEach` (prefilter and cache)
118
+ - Avoid `AnyView` in list rows
119
+ - Consider POD views for fast diffing (or wrap expensive views in POD parents)
120
+ - Suggest image downsampling when `UIImage(data:)` is encountered (as optional optimization)
121
+ - Avoid layout thrash (deep hierarchies, excessive `GeometryReader`)
122
+ - Gate frequent geometry updates by thresholds
123
+ - Use `Self._printChanges()` to debug unexpected view updates
124
+
125
+ ### Animations
126
+
127
+ - Use `.animation(_:value:)` with value parameter (deprecated version without value is too broad)
128
+ - Use `withAnimation` for event-driven animations (button taps, gestures)
129
+ - Prefer transforms (`offset`, `scale`, `rotation`) over layout changes (`frame`) for performance
130
+ - Transitions require animations outside the conditional structure
131
+ - Custom `Animatable` implementations must have explicit `animatableData`
132
+ - Use `.phaseAnimator` for multi-step sequences (iOS 17+)
133
+ - Use `.keyframeAnimator` for precise timing control (iOS 17+)
134
+ - Animation completion handlers need `.transaction(value:)` for reexecution
135
+ - Implicit animations override explicit animations (later in view tree wins)
136
+
137
+ ### Liquid Glass (iOS 26+)
138
+
139
+ **Only adopt when explicitly requested by the user.**
140
+
141
+ - Use native `glassEffect`, `GlassEffectContainer`, and glass button styles
142
+ - Wrap multiple glass elements in `GlassEffectContainer`
143
+ - Apply `.glassEffect()` after layout and visual modifiers
144
+ - Use `.interactive()` only for tappable/focusable elements
145
+ - Use `glassEffectID` with `@Namespace` for morphing transitions
146
+
147
+ ## Quick Reference
148
+
149
+ ### Property Wrapper Selection (Modern)
150
+
151
+ | Wrapper | Use When |
152
+ | ----------- | --------------------------------------------------------------------- |
153
+ | `@State` | Internal view state (must be `private`), or owned `@Observable` class |
154
+ | `@Binding` | Child modifies parent's state |
155
+ | `@Bindable` | Injected `@Observable` needing bindings |
156
+ | `let` | Read-only value from parent |
157
+ | `var` | Read-only value watched via `.onChange()` |
158
+
159
+ **Legacy (Pre-iOS 17):**
160
+ | Wrapper | Use When |
161
+ |---------|----------|
162
+ | `@StateObject` | View owns an `ObservableObject` (use `@State` with `@Observable` instead) |
163
+ | `@ObservedObject` | View receives an `ObservableObject` |
164
+
165
+ ### Modern API Replacements
166
+
167
+ | Deprecated | Modern Alternative |
168
+ | ------------------------------- | ------------------------------------------------------------ |
169
+ | `foregroundColor()` | `foregroundStyle()` |
170
+ | `cornerRadius()` | `clipShape(.rect(cornerRadius:))` |
171
+ | `tabItem()` | `Tab` API |
172
+ | `onTapGesture()` | `Button` (unless need location/count) |
173
+ | `NavigationView` | `NavigationStack` |
174
+ | `onChange(of:) { value in }` | `onChange(of:) { old, new in }` or `onChange(of:) { }` |
175
+ | `fontWeight(.bold)` | `bold()` |
176
+ | `GeometryReader` | `containerRelativeFrame()` or `visualEffect()` |
177
+ | `showsIndicators: false` | `.scrollIndicators(.hidden)` |
178
+ | `String(format: "%.2f", value)` | `Text(value, format: .number.precision(.fractionLength(2)))` |
179
+ | `string.contains(search)` | `string.localizedStandardContains(search)` (for user input) |
180
+
181
+ ### Liquid Glass Patterns
182
+
183
+ ```swift
184
+ // Basic glass effect with fallback
185
+ if #available(iOS 26, *) {
186
+ content
187
+ .padding()
188
+ .glassEffect(.regular.interactive(), in: .rect(cornerRadius: 16))
189
+ } else {
190
+ content
191
+ .padding()
192
+ .background(.ultraThinMaterial, in: RoundedRectangle(cornerRadius: 16))
193
+ }
194
+
195
+ // Grouped glass elements
196
+ GlassEffectContainer(spacing: 24) {
197
+ HStack(spacing: 24) {
198
+ GlassButton1()
199
+ GlassButton2()
200
+ }
201
+ }
202
+
203
+ // Glass buttons
204
+ Button("Confirm") { }
205
+ .buttonStyle(.glassProminent)
206
+ ```
207
+
208
+ ## Review Checklist
209
+
210
+ ### State Management
211
+
212
+ - [ ] Using `@Observable` instead of `ObservableObject` for new code
213
+ - [ ] `@Observable` classes marked with `@MainActor` (if needed)
214
+ - [ ] Using `@State` with `@Observable` classes (not `@StateObject`)
215
+ - [ ] `@State` and `@StateObject` properties are `private`
216
+ - [ ] Passed values NOT declared as `@State` or `@StateObject`
217
+ - [ ] `@Binding` only where child modifies parent state
218
+ - [ ] `@Bindable` for injected `@Observable` needing bindings
219
+ - [ ] Nested `ObservableObject` avoided (or passed directly to child views)
220
+
221
+ ### Modern APIs (see `references/modern-apis.md`)
222
+
223
+ - [ ] Using `foregroundStyle()` instead of `foregroundColor()`
224
+ - [ ] Using `clipShape(.rect(cornerRadius:))` instead of `cornerRadius()`
225
+ - [ ] Using `Tab` API instead of `tabItem()`
226
+ - [ ] Using `Button` instead of `onTapGesture()` (unless need location/count)
227
+ - [ ] Using `NavigationStack` instead of `NavigationView`
228
+ - [ ] Avoiding `UIScreen.main.bounds`
229
+ - [ ] Using alternatives to `GeometryReader` when possible
230
+ - [ ] Button images include text labels for accessibility
231
+
232
+ ### Sheets & Navigation (see `references/sheet-navigation-patterns.md`)
233
+
234
+ - [ ] Using `.sheet(item:)` for model-based sheets
235
+ - [ ] Sheets own their actions and dismiss internally
236
+ - [ ] Using `navigationDestination(for:)` for type-safe navigation
237
+
238
+ ### ScrollView (see `references/scroll-patterns.md`)
239
+
240
+ - [ ] Using `ScrollViewReader` with stable IDs for programmatic scrolling
241
+ - [ ] Using `.scrollIndicators(.hidden)` instead of initializer parameter
242
+
243
+ ### Text & Formatting (see `references/text-formatting.md`)
244
+
245
+ - [ ] Using modern Text formatting (not `String(format:)`)
246
+ - [ ] Using `localizedStandardContains()` for search filtering
247
+
248
+ ### View Structure (see `references/view-structure.md`)
249
+
250
+ - [ ] Using modifiers instead of conditionals for state changes
251
+ - [ ] Complex views extracted to separate subviews
252
+ - [ ] Views kept small for performance
253
+ - [ ] Container views use `@ViewBuilder let content: Content`
254
+
255
+ ### Performance (see `references/performance-patterns.md`)
256
+
257
+ - [ ] View `body` kept simple and pure (no side effects)
258
+ - [ ] Passing only needed values (not large config objects)
259
+ - [ ] Eliminating unnecessary dependencies
260
+ - [ ] State updates check for value changes before assigning
261
+ - [ ] Hot paths minimize state updates
262
+ - [ ] No object creation in `body`
263
+ - [ ] Heavy computation moved out of `body`
264
+
265
+ ### List Patterns (see `references/list-patterns.md`)
266
+
267
+ - [ ] ForEach uses stable identity (not `.indices`)
268
+ - [ ] Constant number of views per ForEach element
269
+ - [ ] No inline filtering in ForEach
270
+ - [ ] No `AnyView` in list rows
271
+
272
+ ### Layout (see `references/layout-best-practices.md`)
273
+
274
+ - [ ] Avoiding layout thrash (deep hierarchies, excessive GeometryReader)
275
+ - [ ] Gating frequent geometry updates by thresholds
276
+ - [ ] Business logic separated into testable models
277
+ - [ ] Action handlers reference methods (not inline logic)
278
+ - [ ] Using relative layout (not hard-coded constants)
279
+ - [ ] Views work in any context (context-agnostic)
280
+
281
+ ### Animations (see `references/animation-basics.md`, `references/animation-transitions.md`, `references/animation-advanced.md`)
282
+
283
+ - [ ] Using `.animation(_:value:)` with value parameter
284
+ - [ ] Using `withAnimation` for event-driven animations
285
+ - [ ] Transitions paired with animations outside conditional structure
286
+ - [ ] Custom `Animatable` has explicit `animatableData` implementation
287
+ - [ ] Preferring transforms over layout changes for animation performance
288
+ - [ ] Phase animations for multi-step sequences (iOS 17+)
289
+ - [ ] Keyframe animations for precise timing (iOS 17+)
290
+ - [ ] Completion handlers use `.transaction(value:)` for reexecution
291
+
292
+ ### Liquid Glass (iOS 26+)
293
+
294
+ - [ ] `#available(iOS 26, *)` with fallback for Liquid Glass
295
+ - [ ] Multiple glass views wrapped in `GlassEffectContainer`
296
+ - [ ] `.glassEffect()` applied after layout/appearance modifiers
297
+ - [ ] `.interactive()` only on user-interactable elements
298
+ - [ ] Shapes and tints consistent across related elements
299
+
300
+ ## References
301
+
302
+ - `references/state-management.md` - Property wrappers and data flow (prefer `@Observable`)
303
+ - `references/view-structure.md` - View composition, extraction, and container patterns
304
+ - `references/performance-patterns.md` - Performance optimization techniques and anti-patterns
305
+ - `references/list-patterns.md` - ForEach identity, stability, and list best practices
306
+ - `references/layout-best-practices.md` - Layout patterns, context-agnostic views, and testability
307
+ - `references/modern-apis.md` - Modern API usage and deprecated replacements
308
+ - `references/animation-basics.md` - Core animation concepts, implicit/explicit animations, timing, performance
309
+ - `references/animation-transitions.md` - Transitions, custom transitions, Animatable protocol
310
+ - `references/animation-advanced.md` - Transactions, phase/keyframe animations (iOS 17+), completion handlers (iOS 17+)
311
+ - `references/sheet-navigation-patterns.md` - Sheet presentation and navigation patterns
312
+ - `references/scroll-patterns.md` - ScrollView patterns and programmatic scrolling
313
+ - `references/text-formatting.md` - Modern text formatting and string operations
314
+ - `references/image-optimization.md` - AsyncImage, image downsampling, and optimization
315
+ - `references/liquid-glass.md` - iOS 26+ Liquid Glass API
316
+
317
+ ## Philosophy
318
+
319
+ This skill focuses on **facts and best practices**, not architectural opinions:
320
+
321
+ - We don't enforce specific architectures (e.g., MVVM, VIPER)
322
+ - We do encourage separating business logic for testability
323
+ - We prioritize modern APIs over deprecated ones
324
+ - We emphasize thread safety with `@MainActor` and `@Observable`
325
+ - We optimize for performance and maintainability
326
+ - We follow Apple's Human Interface Guidelines and API design patterns
327
+
328
+ ## Common Rationalizations
329
+
330
+ | Rationalization | Reality |
331
+ |---|---|
332
+ | "This view is simple, state management doesn't matter" | Even simple views can cause unnecessary re-renders. Understand the view identity contract. |
333
+ | "I'll extract this to a separate view later" | Inline complexity grows silently. Extract at the first sign of a view doing two things. |
334
+ | "@State works for now" | @State is for local, private state. Shared state needs @Binding, @Observable, or environment. |
335
+ | "The preview looks fine" | Previews don't exercise all states. Test loading, error, empty, and edge cases explicitly. |
336
+
337
+ ## Red Flags
338
+
339
+ - View body performing expensive computation
340
+ - @State used for data owned by parent view
341
+ - Missing .task {} cleanup for async work
342
+ - View identity broken by unstable id or ForEach without identifiable data
343
+ - Sheet/popover state managed with boolean flag instead of item binding
@@ -0,0 +1,351 @@
1
+ # SwiftUI Advanced Animations
2
+
3
+ Transactions, phase animations (iOS 17+), keyframe animations (iOS 17+), and completion handlers (iOS 17+).
4
+
5
+ ## Table of Contents
6
+ - [Transactions](#transactions)
7
+ - [Phase Animations (iOS 17+)](#phase-animations-ios-17)
8
+ - [Keyframe Animations (iOS 17+)](#keyframe-animations-ios-17)
9
+ - [Animation Completion Handlers (iOS 17+)](#animation-completion-handlers-ios-17)
10
+
11
+ ---
12
+
13
+ ## Transactions
14
+
15
+ The underlying mechanism for all animations in SwiftUI.
16
+
17
+ ### Basic Usage
18
+
19
+ ```swift
20
+ // withAnimation is shorthand for withTransaction
21
+ withAnimation(.default) { flag.toggle() }
22
+
23
+ // Equivalent explicit transaction
24
+ var transaction = Transaction(animation: .default)
25
+ withTransaction(transaction) { flag.toggle() }
26
+ ```
27
+
28
+ ### The .transaction Modifier
29
+
30
+ ```swift
31
+ Rectangle()
32
+ .frame(width: flag ? 100 : 50, height: 50)
33
+ .transaction { t in
34
+ t.animation = .default
35
+ }
36
+ ```
37
+
38
+ **Note:** This behaves like the deprecated `.animation(_:)` without value parameter - it animates on every state change.
39
+
40
+ ### Animation Precedence
41
+
42
+ **Implicit animations override explicit animations** (later in view tree wins).
43
+
44
+ ```swift
45
+ Button("Tap") {
46
+ withAnimation(.linear) { flag.toggle() }
47
+ }
48
+ .animation(.bouncy, value: flag) // .bouncy wins!
49
+ ```
50
+
51
+ ### Disabling Animations
52
+
53
+ ```swift
54
+ // Prevent implicit animations from overriding
55
+ .transaction { t in
56
+ t.disablesAnimations = true
57
+ }
58
+
59
+ // Remove animation entirely
60
+ .transaction { $0.animation = nil }
61
+ ```
62
+
63
+ ### Custom Transaction Keys (iOS 17+)
64
+
65
+ Pass metadata through transactions.
66
+
67
+ ```swift
68
+ struct ChangeSourceKey: TransactionKey {
69
+ static let defaultValue: String = "unknown"
70
+ }
71
+
72
+ extension Transaction {
73
+ var changeSource: String {
74
+ get { self[ChangeSourceKey.self] }
75
+ set { self[ChangeSourceKey.self] = newValue }
76
+ }
77
+ }
78
+
79
+ // Set source
80
+ var transaction = Transaction(animation: .default)
81
+ transaction.changeSource = "server"
82
+ withTransaction(transaction) { flag.toggle() }
83
+
84
+ // Read in view tree
85
+ .transaction { t in
86
+ if t.changeSource == "server" {
87
+ t.animation = .smooth
88
+ } else {
89
+ t.animation = .bouncy
90
+ }
91
+ }
92
+ ```
93
+
94
+ ---
95
+
96
+ ## Phase Animations (iOS 17+)
97
+
98
+ Cycle through discrete phases automatically. Each phase change is a separate animation.
99
+
100
+ ### Basic Usage
101
+
102
+ ```swift
103
+ // GOOD - triggered phase animation
104
+ Button("Shake") { trigger += 1 }
105
+ .phaseAnimator(
106
+ [0.0, -10.0, 10.0, -5.0, 5.0, 0.0],
107
+ trigger: trigger
108
+ ) { content, offset in
109
+ content.offset(x: offset)
110
+ }
111
+
112
+ // Infinite loop (no trigger)
113
+ Circle()
114
+ .phaseAnimator([1.0, 1.2, 1.0]) { content, scale in
115
+ content.scaleEffect(scale)
116
+ }
117
+ ```
118
+
119
+ ### Enum Phases (Recommended for Clarity)
120
+
121
+ ```swift
122
+ // GOOD - enum phases are self-documenting
123
+ enum BouncePhase: CaseIterable {
124
+ case initial, up, down, settle
125
+
126
+ var scale: CGFloat {
127
+ switch self {
128
+ case .initial: 1.0
129
+ case .up: 1.2
130
+ case .down: 0.9
131
+ case .settle: 1.0
132
+ }
133
+ }
134
+ }
135
+
136
+ Circle()
137
+ .phaseAnimator(BouncePhase.allCases, trigger: trigger) { content, phase in
138
+ content.scaleEffect(phase.scale)
139
+ }
140
+ ```
141
+
142
+ ### Custom Timing Per Phase
143
+
144
+ ```swift
145
+ .phaseAnimator([0, -20, 20], trigger: trigger) { content, offset in
146
+ content.offset(x: offset)
147
+ } animation: { phase in
148
+ switch phase {
149
+ case -20: .bouncy
150
+ case 20: .linear
151
+ default: .smooth
152
+ }
153
+ }
154
+ ```
155
+
156
+ ### Good vs Bad
157
+
158
+ ```swift
159
+ // GOOD - use phaseAnimator for multi-step sequences
160
+ .phaseAnimator([0, -10, 10, 0], trigger: trigger) { content, offset in
161
+ content.offset(x: offset)
162
+ }
163
+
164
+ // BAD - manual DispatchQueue sequencing
165
+ Button("Animate") {
166
+ withAnimation(.easeOut(duration: 0.1)) { offset = -10 }
167
+ DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {
168
+ withAnimation { offset = 10 }
169
+ }
170
+ DispatchQueue.main.asyncAfter(deadline: .now() + 0.2) {
171
+ withAnimation { offset = 0 }
172
+ }
173
+ }
174
+ ```
175
+
176
+ ---
177
+
178
+ ## Keyframe Animations (iOS 17+)
179
+
180
+ Precise timing control with exact values at specific times.
181
+
182
+ ### Basic Usage
183
+
184
+ ```swift
185
+ Button("Bounce") { trigger += 1 }
186
+ .keyframeAnimator(
187
+ initialValue: AnimationValues(),
188
+ trigger: trigger
189
+ ) { content, value in
190
+ content
191
+ .scaleEffect(value.scale)
192
+ .offset(y: value.verticalOffset)
193
+ } keyframes: { _ in
194
+ KeyframeTrack(\.scale) {
195
+ SpringKeyframe(1.2, duration: 0.15)
196
+ SpringKeyframe(0.9, duration: 0.1)
197
+ SpringKeyframe(1.0, duration: 0.15)
198
+ }
199
+ KeyframeTrack(\.verticalOffset) {
200
+ LinearKeyframe(-20, duration: 0.15)
201
+ LinearKeyframe(0, duration: 0.25)
202
+ }
203
+ }
204
+
205
+ struct AnimationValues {
206
+ var scale: CGFloat = 1.0
207
+ var verticalOffset: CGFloat = 0
208
+ }
209
+ ```
210
+
211
+ ### Keyframe Types
212
+
213
+ | Type | Behavior |
214
+ |------|----------|
215
+ | `CubicKeyframe` | Smooth interpolation |
216
+ | `LinearKeyframe` | Straight-line interpolation |
217
+ | `SpringKeyframe` | Spring physics |
218
+ | `MoveKeyframe` | Instant jump (no interpolation) |
219
+
220
+ ### Multiple Synchronized Tracks
221
+
222
+ Tracks run **in parallel**, each animating one property.
223
+
224
+ ```swift
225
+ // GOOD - bell shake with synchronized rotation and scale
226
+ struct BellAnimation {
227
+ var rotation: Double = 0
228
+ var scale: CGFloat = 1.0
229
+ }
230
+
231
+ Image(systemName: "bell.fill")
232
+ .keyframeAnimator(
233
+ initialValue: BellAnimation(),
234
+ trigger: trigger
235
+ ) { content, value in
236
+ content
237
+ .rotationEffect(.degrees(value.rotation))
238
+ .scaleEffect(value.scale)
239
+ } keyframes: { _ in
240
+ KeyframeTrack(\.rotation) {
241
+ CubicKeyframe(15, duration: 0.1)
242
+ CubicKeyframe(-15, duration: 0.1)
243
+ CubicKeyframe(10, duration: 0.1)
244
+ CubicKeyframe(-10, duration: 0.1)
245
+ CubicKeyframe(0, duration: 0.1)
246
+ }
247
+ KeyframeTrack(\.scale) {
248
+ CubicKeyframe(1.1, duration: 0.25)
249
+ CubicKeyframe(1.0, duration: 0.25)
250
+ }
251
+ }
252
+
253
+ // BAD - manual timer-based animation
254
+ Image(systemName: "bell.fill")
255
+ .onTapGesture {
256
+ withAnimation(.easeOut(duration: 0.1)) { rotation = 15 }
257
+ DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {
258
+ withAnimation { rotation = -15 }
259
+ }
260
+ // ... more manual timing - error prone
261
+ }
262
+ ```
263
+
264
+ ### KeyframeTimeline (iOS 17+)
265
+
266
+ Query animation values directly for testing or non-SwiftUI use.
267
+
268
+ ```swift
269
+ let timeline = KeyframeTimeline(initialValue: AnimationValues()) {
270
+ KeyframeTrack(\.scale) {
271
+ CubicKeyframe(1.2, duration: 0.25)
272
+ CubicKeyframe(1.0, duration: 0.25)
273
+ }
274
+ }
275
+
276
+ let midpoint = timeline.value(time: 0.25)
277
+ print(midpoint.scale) // Value at 0.25 seconds
278
+ ```
279
+
280
+ ---
281
+
282
+ ## Animation Completion Handlers (iOS 17+)
283
+
284
+ Execute code when animations finish.
285
+
286
+ ### With withAnimation
287
+
288
+ ```swift
289
+ // GOOD - completion with withAnimation
290
+ Button("Animate") {
291
+ withAnimation(.spring) {
292
+ isExpanded.toggle()
293
+ } completion: {
294
+ showNextStep = true
295
+ }
296
+ }
297
+ ```
298
+
299
+ ### With Transaction (For Reexecution)
300
+
301
+ ```swift
302
+ // GOOD - completion fires on every trigger change
303
+ Circle()
304
+ .scaleEffect(bounceCount % 2 == 0 ? 1.0 : 1.2)
305
+ .transaction(value: bounceCount) { transaction in
306
+ transaction.animation = .spring
307
+ transaction.addAnimationCompletion {
308
+ message = "Bounce \(bounceCount) complete"
309
+ }
310
+ }
311
+
312
+ // BAD - completion only fires ONCE (no value parameter)
313
+ Circle()
314
+ .scaleEffect(bounceCount % 2 == 0 ? 1.0 : 1.2)
315
+ .animation(.spring, value: bounceCount)
316
+ .transaction { transaction in // No value!
317
+ transaction.addAnimationCompletion {
318
+ completionCount += 1 // Only fires once, ever
319
+ }
320
+ }
321
+ ```
322
+
323
+ ---
324
+
325
+ ## Quick Reference
326
+
327
+ ### Transactions (All iOS versions)
328
+ - `withTransaction` is the explicit form of `withAnimation`
329
+ - Implicit animations override explicit (later in view tree wins)
330
+ - Use `disablesAnimations` to prevent override
331
+ - Use `.transaction { $0.animation = nil }` to remove animation
332
+
333
+ ### Custom Transaction Keys (iOS 17+)
334
+ - Pass metadata through animation system via `TransactionKey`
335
+
336
+ ### Phase Animations (iOS 17+)
337
+ - Use for multi-step sequences returning to start
338
+ - Prefer enum phases for clarity
339
+ - Each phase change is a separate animation
340
+ - Use `trigger` parameter for one-shot animations
341
+
342
+ ### Keyframe Animations (iOS 17+)
343
+ - Use for precise timing control
344
+ - Tracks run in parallel
345
+ - Use `KeyframeTimeline` for testing/advanced use
346
+ - Prefer over manual DispatchQueue timing
347
+
348
+ ### Completion Handlers (iOS 17+)
349
+ - Use `withAnimation(.animation) { } completion: { }` for one-shot completion handlers
350
+ - Use `.transaction(value:)` for handlers that should refire on every value change
351
+ - Without `value:` parameter, completion only fires once