compound-engineering-pi 0.2.3

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 (332) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +124 -0
  3. package/bin/compound-engineering-pi +12 -0
  4. package/bin/compound-plugin +12 -0
  5. package/compound-engineering-pi +12 -0
  6. package/compound-plugin +5 -0
  7. package/docs/pi.md +152 -0
  8. package/extensions/compound-engineering-compat.ts +452 -0
  9. package/package.json +84 -0
  10. package/pi-resources/compound-engineering/mcporter.json +7 -0
  11. package/plugins/coding-tutor/.claude-plugin/plugin.json +9 -0
  12. package/plugins/coding-tutor/README.md +37 -0
  13. package/plugins/coding-tutor/commands/quiz-me.md +1 -0
  14. package/plugins/coding-tutor/commands/sync-tutorials.md +25 -0
  15. package/plugins/coding-tutor/commands/teach-me.md +1 -0
  16. package/plugins/coding-tutor/skills/coding-tutor/SKILL.md +214 -0
  17. package/plugins/coding-tutor/skills/coding-tutor/scripts/create_tutorial.py +207 -0
  18. package/plugins/coding-tutor/skills/coding-tutor/scripts/index_tutorials.py +193 -0
  19. package/plugins/coding-tutor/skills/coding-tutor/scripts/quiz_priority.py +190 -0
  20. package/plugins/coding-tutor/skills/coding-tutor/scripts/setup_tutorials.py +118 -0
  21. package/plugins/compound-engineering/.claude-plugin/plugin.json +33 -0
  22. package/plugins/compound-engineering/CHANGELOG.md +457 -0
  23. package/plugins/compound-engineering/CLAUDE.md +89 -0
  24. package/plugins/compound-engineering/LICENSE +21 -0
  25. package/plugins/compound-engineering/README.md +232 -0
  26. package/plugins/compound-engineering/agents/design/design-implementation-reviewer.md +109 -0
  27. package/plugins/compound-engineering/agents/design/design-iterator.md +224 -0
  28. package/plugins/compound-engineering/agents/design/figma-design-sync.md +190 -0
  29. package/plugins/compound-engineering/agents/docs/ankane-readme-writer.md +65 -0
  30. package/plugins/compound-engineering/agents/research/best-practices-researcher.md +126 -0
  31. package/plugins/compound-engineering/agents/research/framework-docs-researcher.md +106 -0
  32. package/plugins/compound-engineering/agents/research/git-history-analyzer.md +59 -0
  33. package/plugins/compound-engineering/agents/research/learnings-researcher.md +264 -0
  34. package/plugins/compound-engineering/agents/research/repo-research-analyst.md +135 -0
  35. package/plugins/compound-engineering/agents/review/agent-native-reviewer.md +261 -0
  36. package/plugins/compound-engineering/agents/review/architecture-strategist.md +67 -0
  37. package/plugins/compound-engineering/agents/review/code-simplicity-reviewer.md +101 -0
  38. package/plugins/compound-engineering/agents/review/data-integrity-guardian.md +85 -0
  39. package/plugins/compound-engineering/agents/review/data-migration-expert.md +112 -0
  40. package/plugins/compound-engineering/agents/review/deployment-verification-agent.md +174 -0
  41. package/plugins/compound-engineering/agents/review/dhh-rails-reviewer.md +66 -0
  42. package/plugins/compound-engineering/agents/review/julik-frontend-races-reviewer.md +221 -0
  43. package/plugins/compound-engineering/agents/review/kieran-python-reviewer.md +133 -0
  44. package/plugins/compound-engineering/agents/review/kieran-rails-reviewer.md +115 -0
  45. package/plugins/compound-engineering/agents/review/kieran-typescript-reviewer.md +124 -0
  46. package/plugins/compound-engineering/agents/review/pattern-recognition-specialist.md +72 -0
  47. package/plugins/compound-engineering/agents/review/performance-oracle.md +137 -0
  48. package/plugins/compound-engineering/agents/review/schema-drift-detector.md +154 -0
  49. package/plugins/compound-engineering/agents/review/security-sentinel.md +114 -0
  50. package/plugins/compound-engineering/agents/workflow/bug-reproduction-validator.md +82 -0
  51. package/plugins/compound-engineering/agents/workflow/every-style-editor.md +64 -0
  52. package/plugins/compound-engineering/agents/workflow/lint.md +16 -0
  53. package/plugins/compound-engineering/agents/workflow/pr-comment-resolver.md +84 -0
  54. package/plugins/compound-engineering/agents/workflow/spec-flow-analyzer.md +134 -0
  55. package/plugins/compound-engineering/commands/agent-native-audit.md +278 -0
  56. package/plugins/compound-engineering/commands/changelog.md +138 -0
  57. package/plugins/compound-engineering/commands/create-agent-skill.md +9 -0
  58. package/plugins/compound-engineering/commands/deepen-plan.md +546 -0
  59. package/plugins/compound-engineering/commands/deploy-docs.md +113 -0
  60. package/plugins/compound-engineering/commands/feature-video.md +342 -0
  61. package/plugins/compound-engineering/commands/generate_command.md +163 -0
  62. package/plugins/compound-engineering/commands/heal-skill.md +143 -0
  63. package/plugins/compound-engineering/commands/lfg.md +20 -0
  64. package/plugins/compound-engineering/commands/release-docs.md +212 -0
  65. package/plugins/compound-engineering/commands/report-bug.md +151 -0
  66. package/plugins/compound-engineering/commands/reproduce-bug.md +100 -0
  67. package/plugins/compound-engineering/commands/resolve_parallel.md +35 -0
  68. package/plugins/compound-engineering/commands/resolve_todo_parallel.md +37 -0
  69. package/plugins/compound-engineering/commands/slfg.md +32 -0
  70. package/plugins/compound-engineering/commands/technical_review.md +8 -0
  71. package/plugins/compound-engineering/commands/test-browser.md +339 -0
  72. package/plugins/compound-engineering/commands/test-xcode.md +332 -0
  73. package/plugins/compound-engineering/commands/triage.md +311 -0
  74. package/plugins/compound-engineering/commands/workflows/brainstorm.md +124 -0
  75. package/plugins/compound-engineering/commands/workflows/compound.md +239 -0
  76. package/plugins/compound-engineering/commands/workflows/plan.md +551 -0
  77. package/plugins/compound-engineering/commands/workflows/review.md +526 -0
  78. package/plugins/compound-engineering/commands/workflows/work.md +433 -0
  79. package/plugins/compound-engineering/skills/agent-browser/SKILL.md +223 -0
  80. package/plugins/compound-engineering/skills/agent-native-architecture/SKILL.md +435 -0
  81. package/plugins/compound-engineering/skills/agent-native-architecture/references/action-parity-discipline.md +409 -0
  82. package/plugins/compound-engineering/skills/agent-native-architecture/references/agent-execution-patterns.md +467 -0
  83. package/plugins/compound-engineering/skills/agent-native-architecture/references/agent-native-testing.md +582 -0
  84. package/plugins/compound-engineering/skills/agent-native-architecture/references/architecture-patterns.md +478 -0
  85. package/plugins/compound-engineering/skills/agent-native-architecture/references/dynamic-context-injection.md +338 -0
  86. package/plugins/compound-engineering/skills/agent-native-architecture/references/files-universal-interface.md +301 -0
  87. package/plugins/compound-engineering/skills/agent-native-architecture/references/from-primitives-to-domain-tools.md +359 -0
  88. package/plugins/compound-engineering/skills/agent-native-architecture/references/mcp-tool-design.md +506 -0
  89. package/plugins/compound-engineering/skills/agent-native-architecture/references/mobile-patterns.md +871 -0
  90. package/plugins/compound-engineering/skills/agent-native-architecture/references/product-implications.md +443 -0
  91. package/plugins/compound-engineering/skills/agent-native-architecture/references/refactoring-to-prompt-native.md +317 -0
  92. package/plugins/compound-engineering/skills/agent-native-architecture/references/self-modification.md +269 -0
  93. package/plugins/compound-engineering/skills/agent-native-architecture/references/shared-workspace-architecture.md +680 -0
  94. package/plugins/compound-engineering/skills/agent-native-architecture/references/system-prompt-design.md +250 -0
  95. package/plugins/compound-engineering/skills/andrew-kane-gem-writer/SKILL.md +184 -0
  96. package/plugins/compound-engineering/skills/andrew-kane-gem-writer/references/database-adapters.md +231 -0
  97. package/plugins/compound-engineering/skills/andrew-kane-gem-writer/references/module-organization.md +121 -0
  98. package/plugins/compound-engineering/skills/andrew-kane-gem-writer/references/rails-integration.md +183 -0
  99. package/plugins/compound-engineering/skills/andrew-kane-gem-writer/references/resources.md +119 -0
  100. package/plugins/compound-engineering/skills/andrew-kane-gem-writer/references/testing-patterns.md +261 -0
  101. package/plugins/compound-engineering/skills/brainstorming/SKILL.md +190 -0
  102. package/plugins/compound-engineering/skills/compound-docs/SKILL.md +511 -0
  103. package/plugins/compound-engineering/skills/compound-docs/assets/critical-pattern-template.md +34 -0
  104. package/plugins/compound-engineering/skills/compound-docs/assets/resolution-template.md +93 -0
  105. package/plugins/compound-engineering/skills/compound-docs/references/yaml-schema.md +65 -0
  106. package/plugins/compound-engineering/skills/compound-docs/schema.yaml +176 -0
  107. package/plugins/compound-engineering/skills/create-agent-skills/SKILL.md +275 -0
  108. package/plugins/compound-engineering/skills/create-agent-skills/references/api-security.md +226 -0
  109. package/plugins/compound-engineering/skills/create-agent-skills/references/be-clear-and-direct.md +531 -0
  110. package/plugins/compound-engineering/skills/create-agent-skills/references/best-practices.md +404 -0
  111. package/plugins/compound-engineering/skills/create-agent-skills/references/common-patterns.md +595 -0
  112. package/plugins/compound-engineering/skills/create-agent-skills/references/core-principles.md +437 -0
  113. package/plugins/compound-engineering/skills/create-agent-skills/references/executable-code.md +175 -0
  114. package/plugins/compound-engineering/skills/create-agent-skills/references/iteration-and-testing.md +474 -0
  115. package/plugins/compound-engineering/skills/create-agent-skills/references/official-spec.md +134 -0
  116. package/plugins/compound-engineering/skills/create-agent-skills/references/recommended-structure.md +168 -0
  117. package/plugins/compound-engineering/skills/create-agent-skills/references/skill-structure.md +152 -0
  118. package/plugins/compound-engineering/skills/create-agent-skills/references/using-scripts.md +113 -0
  119. package/plugins/compound-engineering/skills/create-agent-skills/references/using-templates.md +112 -0
  120. package/plugins/compound-engineering/skills/create-agent-skills/references/workflows-and-validation.md +510 -0
  121. package/plugins/compound-engineering/skills/create-agent-skills/templates/router-skill.md +73 -0
  122. package/plugins/compound-engineering/skills/create-agent-skills/templates/simple-skill.md +33 -0
  123. package/plugins/compound-engineering/skills/create-agent-skills/workflows/add-reference.md +96 -0
  124. package/plugins/compound-engineering/skills/create-agent-skills/workflows/add-script.md +93 -0
  125. package/plugins/compound-engineering/skills/create-agent-skills/workflows/add-template.md +74 -0
  126. package/plugins/compound-engineering/skills/create-agent-skills/workflows/add-workflow.md +120 -0
  127. package/plugins/compound-engineering/skills/create-agent-skills/workflows/audit-skill.md +138 -0
  128. package/plugins/compound-engineering/skills/create-agent-skills/workflows/create-domain-expertise-skill.md +605 -0
  129. package/plugins/compound-engineering/skills/create-agent-skills/workflows/create-new-skill.md +191 -0
  130. package/plugins/compound-engineering/skills/create-agent-skills/workflows/get-guidance.md +121 -0
  131. package/plugins/compound-engineering/skills/create-agent-skills/workflows/upgrade-to-router.md +161 -0
  132. package/plugins/compound-engineering/skills/create-agent-skills/workflows/verify-skill.md +204 -0
  133. package/plugins/compound-engineering/skills/dhh-rails-style/SKILL.md +185 -0
  134. package/plugins/compound-engineering/skills/dhh-rails-style/references/architecture.md +653 -0
  135. package/plugins/compound-engineering/skills/dhh-rails-style/references/controllers.md +303 -0
  136. package/plugins/compound-engineering/skills/dhh-rails-style/references/frontend.md +510 -0
  137. package/plugins/compound-engineering/skills/dhh-rails-style/references/gems.md +266 -0
  138. package/plugins/compound-engineering/skills/dhh-rails-style/references/models.md +359 -0
  139. package/plugins/compound-engineering/skills/dhh-rails-style/references/testing.md +338 -0
  140. package/plugins/compound-engineering/skills/document-review/SKILL.md +87 -0
  141. package/plugins/compound-engineering/skills/dspy-ruby/SKILL.md +737 -0
  142. package/plugins/compound-engineering/skills/dspy-ruby/assets/config-template.rb +187 -0
  143. package/plugins/compound-engineering/skills/dspy-ruby/assets/module-template.rb +300 -0
  144. package/plugins/compound-engineering/skills/dspy-ruby/assets/signature-template.rb +221 -0
  145. package/plugins/compound-engineering/skills/dspy-ruby/references/core-concepts.md +674 -0
  146. package/plugins/compound-engineering/skills/dspy-ruby/references/observability.md +366 -0
  147. package/plugins/compound-engineering/skills/dspy-ruby/references/optimization.md +603 -0
  148. package/plugins/compound-engineering/skills/dspy-ruby/references/providers.md +418 -0
  149. package/plugins/compound-engineering/skills/dspy-ruby/references/toolsets.md +502 -0
  150. package/plugins/compound-engineering/skills/every-style-editor/SKILL.md +134 -0
  151. package/plugins/compound-engineering/skills/every-style-editor/references/EVERY_WRITE_STYLE.md +529 -0
  152. package/plugins/compound-engineering/skills/file-todos/SKILL.md +252 -0
  153. package/plugins/compound-engineering/skills/file-todos/assets/todo-template.md +155 -0
  154. package/plugins/compound-engineering/skills/frontend-design/SKILL.md +42 -0
  155. package/plugins/compound-engineering/skills/gemini-imagegen/SKILL.md +237 -0
  156. package/plugins/compound-engineering/skills/gemini-imagegen/requirements.txt +2 -0
  157. package/plugins/compound-engineering/skills/gemini-imagegen/scripts/compose_images.py +157 -0
  158. package/plugins/compound-engineering/skills/gemini-imagegen/scripts/edit_image.py +144 -0
  159. package/plugins/compound-engineering/skills/gemini-imagegen/scripts/gemini_images.py +263 -0
  160. package/plugins/compound-engineering/skills/gemini-imagegen/scripts/generate_image.py +133 -0
  161. package/plugins/compound-engineering/skills/gemini-imagegen/scripts/multi_turn_chat.py +216 -0
  162. package/plugins/compound-engineering/skills/git-worktree/SKILL.md +302 -0
  163. package/plugins/compound-engineering/skills/git-worktree/scripts/worktree-manager.sh +337 -0
  164. package/plugins/compound-engineering/skills/orchestrating-swarms/SKILL.md +1718 -0
  165. package/plugins/compound-engineering/skills/rclone/SKILL.md +150 -0
  166. package/plugins/compound-engineering/skills/rclone/scripts/check_setup.sh +60 -0
  167. package/plugins/compound-engineering/skills/resolve-pr-parallel/SKILL.md +89 -0
  168. package/plugins/compound-engineering/skills/resolve-pr-parallel/scripts/get-pr-comments +68 -0
  169. package/plugins/compound-engineering/skills/resolve-pr-parallel/scripts/resolve-pr-thread +23 -0
  170. package/plugins/compound-engineering/skills/skill-creator/SKILL.md +210 -0
  171. package/plugins/compound-engineering/skills/skill-creator/scripts/init_skill.py +303 -0
  172. package/plugins/compound-engineering/skills/skill-creator/scripts/package_skill.py +110 -0
  173. package/plugins/compound-engineering/skills/skill-creator/scripts/quick_validate.py +65 -0
  174. package/prompts/deepen-plan.md +549 -0
  175. package/prompts/feature-video.md +341 -0
  176. package/prompts/resolve_todo_parallel.md +36 -0
  177. package/prompts/test-browser.md +342 -0
  178. package/prompts/workflows-brainstorm.md +123 -0
  179. package/prompts/workflows-compound.md +238 -0
  180. package/prompts/workflows-plan.md +550 -0
  181. package/prompts/workflows-review.md +529 -0
  182. package/prompts/workflows-work.md +432 -0
  183. package/skills/agent-browser/SKILL.md +223 -0
  184. package/skills/agent-native-architecture/SKILL.md +435 -0
  185. package/skills/agent-native-architecture/references/action-parity-discipline.md +409 -0
  186. package/skills/agent-native-architecture/references/agent-execution-patterns.md +467 -0
  187. package/skills/agent-native-architecture/references/agent-native-testing.md +582 -0
  188. package/skills/agent-native-architecture/references/architecture-patterns.md +478 -0
  189. package/skills/agent-native-architecture/references/dynamic-context-injection.md +338 -0
  190. package/skills/agent-native-architecture/references/files-universal-interface.md +301 -0
  191. package/skills/agent-native-architecture/references/from-primitives-to-domain-tools.md +359 -0
  192. package/skills/agent-native-architecture/references/mcp-tool-design.md +506 -0
  193. package/skills/agent-native-architecture/references/mobile-patterns.md +871 -0
  194. package/skills/agent-native-architecture/references/product-implications.md +443 -0
  195. package/skills/agent-native-architecture/references/refactoring-to-prompt-native.md +317 -0
  196. package/skills/agent-native-architecture/references/self-modification.md +269 -0
  197. package/skills/agent-native-architecture/references/shared-workspace-architecture.md +680 -0
  198. package/skills/agent-native-architecture/references/system-prompt-design.md +250 -0
  199. package/skills/agent-native-reviewer/SKILL.md +260 -0
  200. package/skills/andrew-kane-gem-writer/SKILL.md +184 -0
  201. package/skills/andrew-kane-gem-writer/references/database-adapters.md +231 -0
  202. package/skills/andrew-kane-gem-writer/references/module-organization.md +121 -0
  203. package/skills/andrew-kane-gem-writer/references/rails-integration.md +183 -0
  204. package/skills/andrew-kane-gem-writer/references/resources.md +119 -0
  205. package/skills/andrew-kane-gem-writer/references/testing-patterns.md +261 -0
  206. package/skills/ankane-readme-writer/SKILL.md +63 -0
  207. package/skills/architecture-strategist/SKILL.md +66 -0
  208. package/skills/best-practices-researcher/SKILL.md +125 -0
  209. package/skills/brainstorming/SKILL.md +190 -0
  210. package/skills/bug-reproduction-validator/SKILL.md +81 -0
  211. package/skills/code-simplicity-reviewer/SKILL.md +100 -0
  212. package/skills/compound-docs/SKILL.md +511 -0
  213. package/skills/compound-docs/assets/critical-pattern-template.md +34 -0
  214. package/skills/compound-docs/assets/resolution-template.md +93 -0
  215. package/skills/compound-docs/references/yaml-schema.md +65 -0
  216. package/skills/compound-docs/schema.yaml +176 -0
  217. package/skills/create-agent-skills/SKILL.md +275 -0
  218. package/skills/create-agent-skills/references/api-security.md +226 -0
  219. package/skills/create-agent-skills/references/be-clear-and-direct.md +531 -0
  220. package/skills/create-agent-skills/references/best-practices.md +404 -0
  221. package/skills/create-agent-skills/references/common-patterns.md +595 -0
  222. package/skills/create-agent-skills/references/core-principles.md +437 -0
  223. package/skills/create-agent-skills/references/executable-code.md +175 -0
  224. package/skills/create-agent-skills/references/iteration-and-testing.md +474 -0
  225. package/skills/create-agent-skills/references/official-spec.md +134 -0
  226. package/skills/create-agent-skills/references/recommended-structure.md +168 -0
  227. package/skills/create-agent-skills/references/skill-structure.md +152 -0
  228. package/skills/create-agent-skills/references/using-scripts.md +113 -0
  229. package/skills/create-agent-skills/references/using-templates.md +112 -0
  230. package/skills/create-agent-skills/references/workflows-and-validation.md +510 -0
  231. package/skills/create-agent-skills/templates/router-skill.md +73 -0
  232. package/skills/create-agent-skills/templates/simple-skill.md +33 -0
  233. package/skills/create-agent-skills/workflows/add-reference.md +96 -0
  234. package/skills/create-agent-skills/workflows/add-script.md +93 -0
  235. package/skills/create-agent-skills/workflows/add-template.md +74 -0
  236. package/skills/create-agent-skills/workflows/add-workflow.md +120 -0
  237. package/skills/create-agent-skills/workflows/audit-skill.md +138 -0
  238. package/skills/create-agent-skills/workflows/create-domain-expertise-skill.md +605 -0
  239. package/skills/create-agent-skills/workflows/create-new-skill.md +191 -0
  240. package/skills/create-agent-skills/workflows/get-guidance.md +121 -0
  241. package/skills/create-agent-skills/workflows/upgrade-to-router.md +161 -0
  242. package/skills/create-agent-skills/workflows/verify-skill.md +204 -0
  243. package/skills/data-integrity-guardian/SKILL.md +84 -0
  244. package/skills/data-migration-expert/SKILL.md +111 -0
  245. package/skills/deployment-verification-agent/SKILL.md +173 -0
  246. package/skills/design-implementation-reviewer/SKILL.md +107 -0
  247. package/skills/design-iterator/SKILL.md +222 -0
  248. package/skills/dhh-rails-reviewer/SKILL.md +65 -0
  249. package/skills/dhh-rails-style/SKILL.md +185 -0
  250. package/skills/dhh-rails-style/references/architecture.md +653 -0
  251. package/skills/dhh-rails-style/references/controllers.md +303 -0
  252. package/skills/dhh-rails-style/references/frontend.md +510 -0
  253. package/skills/dhh-rails-style/references/gems.md +266 -0
  254. package/skills/dhh-rails-style/references/models.md +359 -0
  255. package/skills/dhh-rails-style/references/testing.md +338 -0
  256. package/skills/document-review/SKILL.md +87 -0
  257. package/skills/dspy-ruby/SKILL.md +737 -0
  258. package/skills/dspy-ruby/assets/config-template.rb +187 -0
  259. package/skills/dspy-ruby/assets/module-template.rb +300 -0
  260. package/skills/dspy-ruby/assets/signature-template.rb +221 -0
  261. package/skills/dspy-ruby/references/core-concepts.md +674 -0
  262. package/skills/dspy-ruby/references/observability.md +366 -0
  263. package/skills/dspy-ruby/references/optimization.md +603 -0
  264. package/skills/dspy-ruby/references/providers.md +418 -0
  265. package/skills/dspy-ruby/references/toolsets.md +502 -0
  266. package/skills/every-style-editor/SKILL.md +134 -0
  267. package/skills/every-style-editor/references/EVERY_WRITE_STYLE.md +529 -0
  268. package/skills/every-style-editor-2/SKILL.md +62 -0
  269. package/skills/figma-design-sync/SKILL.md +188 -0
  270. package/skills/file-todos/SKILL.md +252 -0
  271. package/skills/file-todos/assets/todo-template.md +155 -0
  272. package/skills/framework-docs-researcher/SKILL.md +105 -0
  273. package/skills/frontend-design/SKILL.md +42 -0
  274. package/skills/gemini-imagegen/SKILL.md +237 -0
  275. package/skills/gemini-imagegen/requirements.txt +2 -0
  276. package/skills/gemini-imagegen/scripts/compose_images.py +157 -0
  277. package/skills/gemini-imagegen/scripts/edit_image.py +144 -0
  278. package/skills/gemini-imagegen/scripts/gemini_images.py +263 -0
  279. package/skills/gemini-imagegen/scripts/generate_image.py +133 -0
  280. package/skills/gemini-imagegen/scripts/multi_turn_chat.py +216 -0
  281. package/skills/git-history-analyzer/SKILL.md +58 -0
  282. package/skills/git-worktree/SKILL.md +302 -0
  283. package/skills/git-worktree/scripts/worktree-manager.sh +337 -0
  284. package/skills/julik-frontend-races-reviewer/SKILL.md +220 -0
  285. package/skills/kieran-python-reviewer/SKILL.md +132 -0
  286. package/skills/kieran-rails-reviewer/SKILL.md +114 -0
  287. package/skills/kieran-typescript-reviewer/SKILL.md +123 -0
  288. package/skills/learnings-researcher/SKILL.md +263 -0
  289. package/skills/lint/SKILL.md +14 -0
  290. package/skills/orchestrating-swarms/SKILL.md +1718 -0
  291. package/skills/pattern-recognition-specialist/SKILL.md +71 -0
  292. package/skills/performance-oracle/SKILL.md +136 -0
  293. package/skills/pr-comment-resolver/SKILL.md +82 -0
  294. package/skills/rclone/SKILL.md +150 -0
  295. package/skills/rclone/scripts/check_setup.sh +60 -0
  296. package/skills/repo-research-analyst/SKILL.md +134 -0
  297. package/skills/resolve_pr_parallel/SKILL.md +89 -0
  298. package/skills/resolve_pr_parallel/scripts/get-pr-comments +68 -0
  299. package/skills/resolve_pr_parallel/scripts/resolve-pr-thread +23 -0
  300. package/skills/schema-drift-detector/SKILL.md +153 -0
  301. package/skills/security-sentinel/SKILL.md +113 -0
  302. package/skills/skill-creator/SKILL.md +210 -0
  303. package/skills/skill-creator/scripts/init_skill.py +303 -0
  304. package/skills/skill-creator/scripts/package_skill.py +110 -0
  305. package/skills/skill-creator/scripts/quick_validate.py +65 -0
  306. package/skills/spec-flow-analyzer/SKILL.md +133 -0
  307. package/src/commands/convert.ts +183 -0
  308. package/src/commands/install.ts +273 -0
  309. package/src/commands/list.ts +37 -0
  310. package/src/commands/sync.ts +89 -0
  311. package/src/converters/claude-to-codex.ts +182 -0
  312. package/src/converters/claude-to-opencode.ts +395 -0
  313. package/src/converters/claude-to-pi.ts +205 -0
  314. package/src/index.ts +22 -0
  315. package/src/parsers/claude-home.ts +65 -0
  316. package/src/parsers/claude.ts +252 -0
  317. package/src/sync/codex.ts +92 -0
  318. package/src/sync/opencode.ts +75 -0
  319. package/src/sync/pi.ts +88 -0
  320. package/src/targets/codex.ts +96 -0
  321. package/src/targets/index.ts +38 -0
  322. package/src/targets/opencode.ts +57 -0
  323. package/src/targets/pi.ts +131 -0
  324. package/src/templates/pi/compat-extension.ts +452 -0
  325. package/src/types/claude.ts +90 -0
  326. package/src/types/codex.ts +23 -0
  327. package/src/types/opencode.ts +54 -0
  328. package/src/types/pi.ts +40 -0
  329. package/src/utils/codex-agents.ts +64 -0
  330. package/src/utils/files.ts +77 -0
  331. package/src/utils/frontmatter.ts +65 -0
  332. package/src/utils/symlink.ts +43 -0
@@ -0,0 +1,252 @@
1
+ ---
2
+ name: file-todos
3
+ description: This skill should be used when managing the file-based todo tracking system in the todos/ directory. It provides workflows for creating todos, managing status and dependencies, conducting triage, and integrating with slash commands and code review processes.
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ # File-Based Todo Tracking Skill
8
+
9
+ ## Overview
10
+
11
+ The `todos/` directory contains a file-based tracking system for managing code review feedback, technical debt, feature requests, and work items. Each todo is a markdown file with YAML frontmatter and structured sections.
12
+
13
+ This skill should be used when:
14
+ - Creating new todos from findings or feedback
15
+ - Managing todo lifecycle (pending → ready → complete)
16
+ - Triaging pending items for approval
17
+ - Checking or managing dependencies
18
+ - Converting PR comments or code findings into tracked work
19
+ - Updating work logs during todo execution
20
+
21
+ ## File Naming Convention
22
+
23
+ Todo files follow this naming pattern:
24
+
25
+ ```
26
+ {issue_id}-{status}-{priority}-{description}.md
27
+ ```
28
+
29
+ **Components:**
30
+ - **issue_id**: Sequential number (001, 002, 003...) - never reused
31
+ - **status**: `pending` (needs triage), `ready` (approved), `complete` (done)
32
+ - **priority**: `p1` (critical), `p2` (important), `p3` (nice-to-have)
33
+ - **description**: kebab-case, brief description
34
+
35
+ **Examples:**
36
+ ```
37
+ 001-pending-p1-mailer-test.md
38
+ 002-ready-p1-fix-n-plus-1.md
39
+ 005-complete-p2-refactor-csv.md
40
+ ```
41
+
42
+ ## File Structure
43
+
44
+ Each todo is a markdown file with YAML frontmatter and structured sections. Use the template at [todo-template.md](./assets/todo-template.md) as a starting point when creating new todos.
45
+
46
+ **Required sections:**
47
+ - **Problem Statement** - What is broken, missing, or needs improvement?
48
+ - **Findings** - Investigation results, root cause, key discoveries
49
+ - **Proposed Solutions** - Multiple options with pros/cons, effort, risk
50
+ - **Recommended Action** - Clear plan (filled during triage)
51
+ - **Acceptance Criteria** - Testable checklist items
52
+ - **Work Log** - Chronological record with date, actions, learnings
53
+
54
+ **Optional sections:**
55
+ - **Technical Details** - Affected files, related components, DB changes
56
+ - **Resources** - Links to errors, tests, PRs, documentation
57
+ - **Notes** - Additional context or decisions
58
+
59
+ **YAML frontmatter fields:**
60
+ ```yaml
61
+ ---
62
+ status: ready # pending | ready | complete
63
+ priority: p1 # p1 | p2 | p3
64
+ issue_id: "002"
65
+ tags: [rails, performance, database]
66
+ dependencies: ["001"] # Issue IDs this is blocked by
67
+ ---
68
+ ```
69
+
70
+ ## Common Workflows
71
+
72
+ ### Creating a New Todo
73
+
74
+ **To create a new todo from findings or feedback:**
75
+
76
+ 1. Determine next issue ID: `ls todos/ | grep -o '^[0-9]\+' | sort -n | tail -1`
77
+ 2. Copy template: `cp assets/todo-template.md todos/{NEXT_ID}-pending-{priority}-{description}.md`
78
+ 3. Edit and fill required sections:
79
+ - Problem Statement
80
+ - Findings (if from investigation)
81
+ - Proposed Solutions (multiple options)
82
+ - Acceptance Criteria
83
+ - Add initial Work Log entry
84
+ 4. Determine status: `pending` (needs triage) or `ready` (pre-approved)
85
+ 5. Add relevant tags for filtering
86
+
87
+ **When to create a todo:**
88
+ - Requires more than 15-20 minutes of work
89
+ - Needs research, planning, or multiple approaches considered
90
+ - Has dependencies on other work
91
+ - Requires manager approval or prioritization
92
+ - Part of larger feature or refactor
93
+ - Technical debt needing documentation
94
+
95
+ **When to act immediately instead:**
96
+ - Issue is trivial (< 15 minutes)
97
+ - Complete context available now
98
+ - No planning needed
99
+ - User explicitly requests immediate action
100
+ - Simple bug fix with obvious solution
101
+
102
+ ### Triaging Pending Items
103
+
104
+ **To triage pending todos:**
105
+
106
+ 1. List pending items: `ls todos/*-pending-*.md`
107
+ 2. For each todo:
108
+ - Read Problem Statement and Findings
109
+ - Review Proposed Solutions
110
+ - Make decision: approve, defer, or modify priority
111
+ 3. Update approved todos:
112
+ - Rename file: `mv {file}-pending-{pri}-{desc}.md {file}-ready-{pri}-{desc}.md`
113
+ - Update frontmatter: `status: pending` → `status: ready`
114
+ - Fill "Recommended Action" section with clear plan
115
+ - Adjust priority if different from initial assessment
116
+ 4. Deferred todos stay in `pending` status
117
+
118
+ **Use slash command:** `/triage` for interactive approval workflow
119
+
120
+ ### Managing Dependencies
121
+
122
+ **To track dependencies:**
123
+
124
+ ```yaml
125
+ dependencies: ["002", "005"] # This todo blocked by issues 002 and 005
126
+ dependencies: [] # No blockers - can work immediately
127
+ ```
128
+
129
+ **To check what blocks a todo:**
130
+ ```bash
131
+ grep "^dependencies:" todos/003-*.md
132
+ ```
133
+
134
+ **To find what a todo blocks:**
135
+ ```bash
136
+ grep -l 'dependencies:.*"002"' todos/*.md
137
+ ```
138
+
139
+ **To verify blockers are complete before starting:**
140
+ ```bash
141
+ for dep in 001 002 003; do
142
+ [ -f "todos/${dep}-complete-*.md" ] || echo "Issue $dep not complete"
143
+ done
144
+ ```
145
+
146
+ ### Updating Work Logs
147
+
148
+ **When working on a todo, always add a work log entry:**
149
+
150
+ ```markdown
151
+ ### YYYY-MM-DD - Session Title
152
+
153
+ **By:** Claude Code / Developer Name
154
+
155
+ **Actions:**
156
+ - Specific changes made (include file:line references)
157
+ - Commands executed
158
+ - Tests run
159
+ - Results of investigation
160
+
161
+ **Learnings:**
162
+ - What worked / what didn't
163
+ - Patterns discovered
164
+ - Key insights for future work
165
+ ```
166
+
167
+ Work logs serve as:
168
+ - Historical record of investigation
169
+ - Documentation of approaches attempted
170
+ - Knowledge sharing for team
171
+ - Context for future similar work
172
+
173
+ ### Completing a Todo
174
+
175
+ **To mark a todo as complete:**
176
+
177
+ 1. Verify all acceptance criteria checked off
178
+ 2. Update Work Log with final session and results
179
+ 3. Rename file: `mv {file}-ready-{pri}-{desc}.md {file}-complete-{pri}-{desc}.md`
180
+ 4. Update frontmatter: `status: ready` → `status: complete`
181
+ 5. Check for unblocked work: `grep -l 'dependencies:.*"002"' todos/*-ready-*.md`
182
+ 6. Commit with issue reference: `feat: resolve issue 002`
183
+
184
+ ## Integration with Development Workflows
185
+
186
+ | Trigger | Flow | Tool |
187
+ |---------|------|------|
188
+ | Code review | `/workflows:review` → Findings → `/triage` → Todos | Review agent + skill |
189
+ | PR comments | `/resolve_pr_parallel` → Individual fixes → Todos | gh CLI + skill |
190
+ | Code TODOs | `/resolve_todo_parallel` → Fixes + Complex todos | Agent + skill |
191
+ | Planning | Brainstorm → Create todo → Work → Complete | Skill |
192
+ | Feedback | Discussion → Create todo → Triage → Work | Skill + slash |
193
+
194
+ ## Quick Reference Commands
195
+
196
+ **Finding work:**
197
+ ```bash
198
+ # List highest priority unblocked work
199
+ grep -l 'dependencies: \[\]' todos/*-ready-p1-*.md
200
+
201
+ # List all pending items needing triage
202
+ ls todos/*-pending-*.md
203
+
204
+ # Find next issue ID
205
+ ls todos/ | grep -o '^[0-9]\+' | sort -n | tail -1 | awk '{printf "%03d", $1+1}'
206
+
207
+ # Count by status
208
+ for status in pending ready complete; do
209
+ echo "$status: $(ls -1 todos/*-$status-*.md 2>/dev/null | wc -l)"
210
+ done
211
+ ```
212
+
213
+ **Dependency management:**
214
+ ```bash
215
+ # What blocks this todo?
216
+ grep "^dependencies:" todos/003-*.md
217
+
218
+ # What does this todo block?
219
+ grep -l 'dependencies:.*"002"' todos/*.md
220
+ ```
221
+
222
+ **Searching:**
223
+ ```bash
224
+ # Search by tag
225
+ grep -l "tags:.*rails" todos/*.md
226
+
227
+ # Search by priority
228
+ ls todos/*-p1-*.md
229
+
230
+ # Full-text search
231
+ grep -r "payment" todos/
232
+ ```
233
+
234
+ ## Key Distinctions
235
+
236
+ **File-todos system (this skill):**
237
+ - Markdown files in `todos/` directory
238
+ - Development/project tracking
239
+ - Standalone markdown files with YAML frontmatter
240
+ - Used by humans and agents
241
+
242
+ **Rails Todo model:**
243
+ - Database model in `app/models/todo.rb`
244
+ - User-facing feature in the application
245
+ - Active Record CRUD operations
246
+ - Different from this file-based system
247
+
248
+ **TodoWrite tool:**
249
+ - In-memory task tracking during agent sessions
250
+ - Temporary tracking for single conversation
251
+ - Not persisted to disk
252
+ - Different from both systems above
@@ -0,0 +1,155 @@
1
+ ---
2
+ status: pending
3
+ priority: p2
4
+ issue_id: "XXX"
5
+ tags: []
6
+ dependencies: []
7
+ ---
8
+
9
+ # Brief Task Title
10
+
11
+ Replace with a concise title describing what needs to be done.
12
+
13
+ ## Problem Statement
14
+
15
+ What is broken, missing, or needs improvement? Provide clear context about why this matters.
16
+
17
+ **Example:**
18
+ - Template system lacks comprehensive test coverage for edge cases discovered during PR review
19
+ - Email service is missing proper error handling for rate-limit scenarios
20
+ - Documentation doesn't cover the new authentication flow
21
+
22
+ ## Findings
23
+
24
+ Investigation results, root cause analysis, and key discoveries.
25
+
26
+ - Finding 1 (with specifics: file, line number if applicable)
27
+ - Finding 2
28
+ - Key discovery with impact assessment
29
+ - Related issues or patterns discovered
30
+
31
+ **Example format:**
32
+ - Identified 12 missing test scenarios in `app/models/user_test.rb`
33
+ - Current coverage: 60% of code paths
34
+ - Missing: empty inputs, special characters, large payloads
35
+ - Similar issues exist in `app/models/post_test.rb` (~8 scenarios)
36
+
37
+ ## Proposed Solutions
38
+
39
+ Present multiple options with pros, cons, effort estimates, and risk assessment.
40
+
41
+ ### Option 1: [Solution Name]
42
+
43
+ **Approach:** Describe the solution clearly.
44
+
45
+ **Pros:**
46
+ - Benefit 1
47
+ - Benefit 2
48
+
49
+ **Cons:**
50
+ - Drawback 1
51
+ - Drawback 2
52
+
53
+ **Effort:** 2-3 hours
54
+
55
+ **Risk:** Low / Medium / High
56
+
57
+ ---
58
+
59
+ ### Option 2: [Solution Name]
60
+
61
+ **Approach:** Describe the solution clearly.
62
+
63
+ **Pros:**
64
+ - Benefit 1
65
+ - Benefit 2
66
+
67
+ **Cons:**
68
+ - Drawback 1
69
+ - Drawback 2
70
+
71
+ **Effort:** 4-6 hours
72
+
73
+ **Risk:** Low / Medium / High
74
+
75
+ ---
76
+
77
+ ### Option 3: [Solution Name]
78
+
79
+ (Include if you have alternatives)
80
+
81
+ ## Recommended Action
82
+
83
+ **To be filled during triage.** Clear, actionable plan for resolving this todo.
84
+
85
+ **Example:**
86
+ "Implement both unit tests (covering each scenario) and integration tests (full pipeline) before merging. Estimated 4 hours total effort. Target coverage > 85% for this module."
87
+
88
+ ## Technical Details
89
+
90
+ Affected files, related components, database changes, or architectural considerations.
91
+
92
+ **Affected files:**
93
+ - `app/models/user.rb:45` - full_name method
94
+ - `app/services/user_service.rb:12` - validation logic
95
+ - `test/models/user_test.rb` - existing tests
96
+
97
+ **Related components:**
98
+ - UserMailer (depends on user validation)
99
+ - AccountPolicy (authorization checks)
100
+
101
+ **Database changes (if any):**
102
+ - Migration needed? Yes / No
103
+ - New columns/tables? Describe here
104
+
105
+ ## Resources
106
+
107
+ Links to errors, tests, PRs, documentation, similar issues.
108
+
109
+ - **PR:** #1287
110
+ - **Related issue:** #456
111
+ - **Error log:** [link to AppSignal incident]
112
+ - **Documentation:** [relevant docs]
113
+ - **Similar patterns:** Issue #200 (completed, ref for approach)
114
+
115
+ ## Acceptance Criteria
116
+
117
+ Testable checklist items for verifying completion.
118
+
119
+ - [ ] All acceptance criteria checked
120
+ - [ ] Tests pass (unit + integration if applicable)
121
+ - [ ] Code reviewed and approved
122
+ - [ ] (Example) Test coverage > 85%
123
+ - [ ] (Example) Performance metrics acceptable
124
+ - [ ] (Example) Documentation updated
125
+
126
+ ## Work Log
127
+
128
+ Chronological record of work sessions, actions taken, and learnings.
129
+
130
+ ### 2025-11-12 - Initial Discovery
131
+
132
+ **By:** Claude Code
133
+
134
+ **Actions:**
135
+ - Identified 12 missing test scenarios
136
+ - Analyzed existing test coverage (file:line references)
137
+ - Reviewed similar patterns in codebase
138
+ - Drafted 3 solution approaches
139
+
140
+ **Learnings:**
141
+ - Similar issues exist in related modules
142
+ - Current test setup supports both unit and integration tests
143
+ - Performance testing would be valuable addition
144
+
145
+ ---
146
+
147
+ (Add more entries as work progresses)
148
+
149
+ ## Notes
150
+
151
+ Additional context, decisions, or reminders.
152
+
153
+ - Decision: Include both unit and integration tests for comprehensive coverage
154
+ - Blocker: Depends on completion of issue #001
155
+ - Timeline: Priority for sprint due to blocking other work
@@ -0,0 +1,42 @@
1
+ ---
2
+ name: frontend-design
3
+ description: This skill should be used when creating distinctive, production-grade frontend interfaces with high design quality. It applies when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
4
+ license: Complete terms in LICENSE.txt
5
+ ---
6
+
7
+ This skill guides creation of distinctive, production-grade frontend interfaces that avoid generic "AI slop" aesthetics. Implement real working code with exceptional attention to aesthetic details and creative choices.
8
+
9
+ The user provides frontend requirements: a component, page, application, or interface to build. They may include context about the purpose, audience, or technical constraints.
10
+
11
+ ## Design Thinking
12
+
13
+ Before coding, understand the context and commit to a BOLD aesthetic direction:
14
+ - **Purpose**: What problem does this interface solve? Who uses it?
15
+ - **Tone**: Pick an extreme: brutally minimal, maximalist chaos, retro-futuristic, organic/natural, luxury/refined, playful/toy-like, editorial/magazine, brutalist/raw, art deco/geometric, soft/pastel, industrial/utilitarian, etc. There are so many flavors to choose from. Use these for inspiration but design one that is true to the aesthetic direction.
16
+ - **Constraints**: Technical requirements (framework, performance, accessibility).
17
+ - **Differentiation**: What makes this UNFORGETTABLE? What's the one thing someone will remember?
18
+
19
+ **CRITICAL**: Choose a clear conceptual direction and execute it with precision. Bold maximalism and refined minimalism both work - the key is intentionality, not intensity.
20
+
21
+ Then implement working code (HTML/CSS/JS, React, Vue, etc.) that is:
22
+ - Production-grade and functional
23
+ - Visually striking and memorable
24
+ - Cohesive with a clear aesthetic point-of-view
25
+ - Meticulously refined in every detail
26
+
27
+ ## Frontend Aesthetics Guidelines
28
+
29
+ Focus on:
30
+ - **Typography**: Choose fonts that are beautiful, unique, and interesting. Avoid generic fonts like Arial and Inter; opt instead for distinctive choices that elevate the frontend's aesthetics; unexpected, characterful font choices. Pair a distinctive display font with a refined body font.
31
+ - **Color & Theme**: Commit to a cohesive aesthetic. Use CSS variables for consistency. Dominant colors with sharp accents outperform timid, evenly-distributed palettes.
32
+ - **Motion**: Use animations for effects and micro-interactions. Prioritize CSS-only solutions for HTML. Use Motion library for React when available. Focus on high-impact moments: one well-orchestrated page load with staggered reveals (animation-delay) creates more delight than scattered micro-interactions. Use scroll-triggering and hover states that surprise.
33
+ - **Spatial Composition**: Unexpected layouts. Asymmetry. Overlap. Diagonal flow. Grid-breaking elements. Generous negative space OR controlled density.
34
+ - **Backgrounds & Visual Details**: Create atmosphere and depth rather than defaulting to solid colors. Add contextual effects and textures that match the overall aesthetic. Apply creative forms like gradient meshes, noise textures, geometric patterns, layered transparencies, dramatic shadows, decorative borders, custom cursors, and grain overlays.
35
+
36
+ NEVER use generic AI-generated aesthetics like overused font families (Inter, Roboto, Arial, system fonts), cliched color schemes (particularly purple gradients on white backgrounds), predictable layouts and component patterns, and cookie-cutter design that lacks context-specific character.
37
+
38
+ Interpret creatively and make unexpected choices that feel genuinely designed for the context. No design should be the same. Vary between light and dark themes, different fonts, different aesthetics. NEVER converge on common choices (Space Grotesk, for example) across generations.
39
+
40
+ **IMPORTANT**: Match implementation complexity to the aesthetic vision. Maximalist designs need elaborate code with extensive animations and effects. Minimalist or refined designs need restraint, precision, and careful attention to spacing, typography, and subtle details. Elegance comes from executing the vision well.
41
+
42
+ Remember: Claude is capable of extraordinary creative work. Don't hold back, show what can truly be created when thinking outside the box and committing fully to a distinctive vision.
@@ -0,0 +1,237 @@
1
+ ---
2
+ name: gemini-imagegen
3
+ description: This skill should be used when generating and editing images using the Gemini API (Nano Banana Pro). It applies when creating images from text prompts, editing existing images, applying style transfers, generating logos with text, creating stickers, product mockups, or any image generation/manipulation task. Supports text-to-image, image editing, multi-turn refinement, and composition from multiple reference images.
4
+ ---
5
+
6
+ # Gemini Image Generation (Nano Banana Pro)
7
+
8
+ Generate and edit images using Google's Gemini API. The environment variable `GEMINI_API_KEY` must be set.
9
+
10
+ ## Default Model
11
+
12
+ | Model | Resolution | Best For |
13
+ |-------|------------|----------|
14
+ | `gemini-3-pro-image-preview` | 1K-4K | All image generation (default) |
15
+
16
+ **Note:** Always use this Pro model. Only use a different model if explicitly requested.
17
+
18
+ ## Quick Reference
19
+
20
+ ### Default Settings
21
+ - **Model:** `gemini-3-pro-image-preview`
22
+ - **Resolution:** 1K (default, options: 1K, 2K, 4K)
23
+ - **Aspect Ratio:** 1:1 (default)
24
+
25
+ ### Available Aspect Ratios
26
+ `1:1`, `2:3`, `3:2`, `3:4`, `4:3`, `4:5`, `5:4`, `9:16`, `16:9`, `21:9`
27
+
28
+ ### Available Resolutions
29
+ `1K` (default), `2K`, `4K`
30
+
31
+ ## Core API Pattern
32
+
33
+ ```python
34
+ import os
35
+ from google import genai
36
+ from google.genai import types
37
+
38
+ client = genai.Client(api_key=os.environ["GEMINI_API_KEY"])
39
+
40
+ # Basic generation (1K, 1:1 - defaults)
41
+ response = client.models.generate_content(
42
+ model="gemini-3-pro-image-preview",
43
+ contents=["Your prompt here"],
44
+ config=types.GenerateContentConfig(
45
+ response_modalities=['TEXT', 'IMAGE'],
46
+ ),
47
+ )
48
+
49
+ for part in response.parts:
50
+ if part.text:
51
+ print(part.text)
52
+ elif part.inline_data:
53
+ image = part.as_image()
54
+ image.save("output.png")
55
+ ```
56
+
57
+ ## Custom Resolution & Aspect Ratio
58
+
59
+ ```python
60
+ from google.genai import types
61
+
62
+ response = client.models.generate_content(
63
+ model="gemini-3-pro-image-preview",
64
+ contents=[prompt],
65
+ config=types.GenerateContentConfig(
66
+ response_modalities=['TEXT', 'IMAGE'],
67
+ image_config=types.ImageConfig(
68
+ aspect_ratio="16:9", # Wide format
69
+ image_size="2K" # Higher resolution
70
+ ),
71
+ )
72
+ )
73
+ ```
74
+
75
+ ### Resolution Examples
76
+
77
+ ```python
78
+ # 1K (default) - Fast, good for previews
79
+ image_config=types.ImageConfig(image_size="1K")
80
+
81
+ # 2K - Balanced quality/speed
82
+ image_config=types.ImageConfig(image_size="2K")
83
+
84
+ # 4K - Maximum quality, slower
85
+ image_config=types.ImageConfig(image_size="4K")
86
+ ```
87
+
88
+ ### Aspect Ratio Examples
89
+
90
+ ```python
91
+ # Square (default)
92
+ image_config=types.ImageConfig(aspect_ratio="1:1")
93
+
94
+ # Landscape wide
95
+ image_config=types.ImageConfig(aspect_ratio="16:9")
96
+
97
+ # Ultra-wide panoramic
98
+ image_config=types.ImageConfig(aspect_ratio="21:9")
99
+
100
+ # Portrait
101
+ image_config=types.ImageConfig(aspect_ratio="9:16")
102
+
103
+ # Photo standard
104
+ image_config=types.ImageConfig(aspect_ratio="4:3")
105
+ ```
106
+
107
+ ## Editing Images
108
+
109
+ Pass existing images with text prompts:
110
+
111
+ ```python
112
+ from PIL import Image
113
+
114
+ img = Image.open("input.png")
115
+ response = client.models.generate_content(
116
+ model="gemini-3-pro-image-preview",
117
+ contents=["Add a sunset to this scene", img],
118
+ config=types.GenerateContentConfig(
119
+ response_modalities=['TEXT', 'IMAGE'],
120
+ ),
121
+ )
122
+ ```
123
+
124
+ ## Multi-Turn Refinement
125
+
126
+ Use chat for iterative editing:
127
+
128
+ ```python
129
+ from google.genai import types
130
+
131
+ chat = client.chats.create(
132
+ model="gemini-3-pro-image-preview",
133
+ config=types.GenerateContentConfig(response_modalities=['TEXT', 'IMAGE'])
134
+ )
135
+
136
+ response = chat.send_message("Create a logo for 'Acme Corp'")
137
+ # Save first image...
138
+
139
+ response = chat.send_message("Make the text bolder and add a blue gradient")
140
+ # Save refined image...
141
+ ```
142
+
143
+ ## Prompting Best Practices
144
+
145
+ ### Photorealistic Scenes
146
+ Include camera details: lens type, lighting, angle, mood.
147
+ > "A photorealistic close-up portrait, 85mm lens, soft golden hour light, shallow depth of field"
148
+
149
+ ### Stylized Art
150
+ Specify style explicitly:
151
+ > "A kawaii-style sticker of a happy red panda, bold outlines, cel-shading, white background"
152
+
153
+ ### Text in Images
154
+ Be explicit about font style and placement:
155
+ > "Create a logo with text 'Daily Grind' in clean sans-serif, black and white, coffee bean motif"
156
+
157
+ ### Product Mockups
158
+ Describe lighting setup and surface:
159
+ > "Studio-lit product photo on polished concrete, three-point softbox setup, 45-degree angle"
160
+
161
+ ## Advanced Features
162
+
163
+ ### Google Search Grounding
164
+ Generate images based on real-time data:
165
+
166
+ ```python
167
+ response = client.models.generate_content(
168
+ model="gemini-3-pro-image-preview",
169
+ contents=["Visualize today's weather in Tokyo as an infographic"],
170
+ config=types.GenerateContentConfig(
171
+ response_modalities=['TEXT', 'IMAGE'],
172
+ tools=[{"google_search": {}}]
173
+ )
174
+ )
175
+ ```
176
+
177
+ ### Multiple Reference Images (Up to 14)
178
+ Combine elements from multiple sources:
179
+
180
+ ```python
181
+ response = client.models.generate_content(
182
+ model="gemini-3-pro-image-preview",
183
+ contents=[
184
+ "Create a group photo of these people in an office",
185
+ Image.open("person1.png"),
186
+ Image.open("person2.png"),
187
+ Image.open("person3.png"),
188
+ ],
189
+ config=types.GenerateContentConfig(
190
+ response_modalities=['TEXT', 'IMAGE'],
191
+ ),
192
+ )
193
+ ```
194
+
195
+ ## Important: File Format & Media Type
196
+
197
+ **CRITICAL:** The Gemini API returns images in JPEG format by default. When saving, always use `.jpg` extension to avoid media type mismatches.
198
+
199
+ ```python
200
+ # CORRECT - Use .jpg extension (Gemini returns JPEG)
201
+ image.save("output.jpg")
202
+
203
+ # WRONG - Will cause "Image does not match media type" errors
204
+ image.save("output.png") # Creates JPEG with PNG extension!
205
+ ```
206
+
207
+ ### Converting to PNG (if needed)
208
+
209
+ If you specifically need PNG format:
210
+
211
+ ```python
212
+ from PIL import Image
213
+
214
+ # Generate with Gemini
215
+ for part in response.parts:
216
+ if part.inline_data:
217
+ img = part.as_image()
218
+ # Convert to PNG by saving with explicit format
219
+ img.save("output.png", format="PNG")
220
+ ```
221
+
222
+ ### Verifying Image Format
223
+
224
+ Check actual format vs extension with the `file` command:
225
+
226
+ ```bash
227
+ file image.png
228
+ # If output shows "JPEG image data" - rename to .jpg!
229
+ ```
230
+
231
+ ## Notes
232
+
233
+ - All generated images include SynthID watermarks
234
+ - Gemini returns **JPEG format by default** - always use `.jpg` extension
235
+ - Image-only mode (`responseModalities: ["IMAGE"]`) won't work with Google Search grounding
236
+ - For editing, describe changes conversationally—the model understands semantic masking
237
+ - Default to 1K resolution for speed; use 2K/4K when quality is critical
@@ -0,0 +1,2 @@
1
+ google-genai>=1.0.0
2
+ Pillow>=10.0.0