opencode-skills-collection 3.1.0 → 3.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (291) hide show
  1. package/bundled-skills/.antigravity-install-manifest.json +84 -1
  2. package/bundled-skills/2slides-ppt-generator/SKILL.md +8 -7
  3. package/bundled-skills/android-cli/SKILL.md +19 -7
  4. package/bundled-skills/android-ui-journey-testing/SKILL.md +191 -0
  5. package/bundled-skills/apple-notes-search/SKILL.md +12 -2
  6. package/bundled-skills/ask-matt/SKILL.md +92 -0
  7. package/bundled-skills/atlas-ledger/SKILL.md +8 -0
  8. package/bundled-skills/bugs-are-annoying/SKILL.md +137 -0
  9. package/bundled-skills/codebase-design/DEEPENING.md +37 -0
  10. package/bundled-skills/codebase-design/DESIGN-IT-TWICE.md +44 -0
  11. package/bundled-skills/codebase-design/SKILL.md +145 -0
  12. package/bundled-skills/codex-fable5/SKILL.md +10 -2
  13. package/bundled-skills/competitor-analysis/LICENSE.txt +21 -0
  14. package/bundled-skills/competitor-analysis/SKILL.md +434 -0
  15. package/bundled-skills/competitor-analysis/references/battle-card-subagent.md +127 -0
  16. package/bundled-skills/competitor-analysis/references/battle-card.md +91 -0
  17. package/bundled-skills/competitor-analysis/references/example-research.md +130 -0
  18. package/bundled-skills/competitor-analysis/references/report-template.html +127 -0
  19. package/bundled-skills/competitor-analysis/references/research-patterns.md +217 -0
  20. package/bundled-skills/competitor-analysis/references/workflow.md +434 -0
  21. package/bundled-skills/competitor-analysis/scripts/capture_screenshots.mjs +142 -0
  22. package/bundled-skills/competitor-analysis/scripts/compile_report.mjs +929 -0
  23. package/bundled-skills/competitor-analysis/scripts/extract_vs_names.mjs +140 -0
  24. package/bundled-skills/competitor-analysis/scripts/gate_candidates.mjs +224 -0
  25. package/bundled-skills/competitor-analysis/scripts/list_urls.mjs +90 -0
  26. package/bundled-skills/competitor-analysis/scripts/md_utils.mjs +50 -0
  27. package/bundled-skills/competitor-analysis/scripts/merge_partials.mjs +291 -0
  28. package/bundled-skills/competitor-analysis/scripts/package.json +6 -0
  29. package/bundled-skills/design-it/3d-ui/SKILL.md +259 -0
  30. package/bundled-skills/design-it/SKILL.md +170 -0
  31. package/bundled-skills/design-it/ai-native-ui/SKILL.md +295 -0
  32. package/bundled-skills/design-it/aurora-ui/SKILL.md +307 -0
  33. package/bundled-skills/design-it/bento-ui/SKILL.md +314 -0
  34. package/bundled-skills/design-it/brutalism/SKILL.md +270 -0
  35. package/bundled-skills/design-it/brutalist-typography/SKILL.md +287 -0
  36. package/bundled-skills/design-it/card-based-design/SKILL.md +262 -0
  37. package/bundled-skills/design-it/claymorphism/SKILL.md +287 -0
  38. package/bundled-skills/design-it/color-blocking/SKILL.md +278 -0
  39. package/bundled-skills/design-it/command-center-ui/SKILL.md +345 -0
  40. package/bundled-skills/design-it/cyber-y2k/SKILL.md +312 -0
  41. package/bundled-skills/design-it/cyberpunk-ui/SKILL.md +262 -0
  42. package/bundled-skills/design-it/dark-mode/SKILL.md +289 -0
  43. package/bundled-skills/design-it/dashboard-design/SKILL.md +331 -0
  44. package/bundled-skills/design-it/data-dense-design/SKILL.md +322 -0
  45. package/bundled-skills/design-it/duotone-design/SKILL.md +248 -0
  46. package/bundled-skills/design-it/editorial-design/SKILL.md +328 -0
  47. package/bundled-skills/design-it/flat-design/SKILL.md +221 -0
  48. package/bundled-skills/design-it/flat-design-2/SKILL.md +240 -0
  49. package/bundled-skills/design-it/floating-ui/SKILL.md +299 -0
  50. package/bundled-skills/design-it/frutiger-aero/SKILL.md +274 -0
  51. package/bundled-skills/design-it/glassmorphism/SKILL.md +272 -0
  52. package/bundled-skills/design-it/gradient-design/SKILL.md +309 -0
  53. package/bundled-skills/design-it/high-contrast/SKILL.md +288 -0
  54. package/bundled-skills/design-it/holographic-ui/SKILL.md +310 -0
  55. package/bundled-skills/design-it/isometric-design/SKILL.md +228 -0
  56. package/bundled-skills/design-it/layered-design/SKILL.md +247 -0
  57. package/bundled-skills/design-it/material-design/SKILL.md +275 -0
  58. package/bundled-skills/design-it/maximalism/SKILL.md +297 -0
  59. package/bundled-skills/design-it/minimalism/SKILL.md +267 -0
  60. package/bundled-skills/design-it/monochromatic-ui/SKILL.md +296 -0
  61. package/bundled-skills/design-it/neo-brutalism/SKILL.md +270 -0
  62. package/bundled-skills/design-it/neumorphism/SKILL.md +248 -0
  63. package/bundled-skills/design-it/retro-design/SKILL.md +283 -0
  64. package/bundled-skills/design-it/retro-futurism/SKILL.md +259 -0
  65. package/bundled-skills/design-it/sci-fi-interface/SKILL.md +309 -0
  66. package/bundled-skills/design-it/skeuomorphism/SKILL.md +280 -0
  67. package/bundled-skills/design-it/soft-pastel/SKILL.md +307 -0
  68. package/bundled-skills/design-it/spatial-computing-ui/SKILL.md +300 -0
  69. package/bundled-skills/design-it/spatial-design/SKILL.md +268 -0
  70. package/bundled-skills/design-it/swiss-design/SKILL.md +293 -0
  71. package/bundled-skills/design-it/synthwave/SKILL.md +257 -0
  72. package/bundled-skills/design-it/tile-design/SKILL.md +297 -0
  73. package/bundled-skills/design-it/typography-first/SKILL.md +247 -0
  74. package/bundled-skills/design-it/vaporwave/SKILL.md +331 -0
  75. package/bundled-skills/design-it/vibrant-maximalism/SKILL.md +291 -0
  76. package/bundled-skills/design-it/widget-based-design/SKILL.md +274 -0
  77. package/bundled-skills/design-it/y2k-design/SKILL.md +268 -0
  78. package/bundled-skills/diagnosing-bugs/SKILL.md +165 -0
  79. package/bundled-skills/diagnosing-bugs/scripts/hitl-loop.template.sh +41 -0
  80. package/bundled-skills/docs/contributors/skill-scoring.md +235 -0
  81. package/bundled-skills/docs/integrations/jetski-cortex.md +3 -3
  82. package/bundled-skills/docs/integrations/jetski-gemini-loader/README.md +1 -1
  83. package/bundled-skills/docs/maintainers/repo-growth-seo.md +3 -3
  84. package/bundled-skills/docs/maintainers/skills-update-guide.md +1 -1
  85. package/bundled-skills/docs/users/bundles.md +145 -1
  86. package/bundled-skills/docs/users/claude-code-skills.md +1 -1
  87. package/bundled-skills/docs/users/gemini-cli-skills.md +1 -1
  88. package/bundled-skills/docs/users/getting-started.md +1 -1
  89. package/bundled-skills/docs/users/kiro-integration.md +1 -1
  90. package/bundled-skills/docs/users/specialized-plugin-roadmap.md +11 -4
  91. package/bundled-skills/docs/users/usage.md +4 -4
  92. package/bundled-skills/docs/users/visual-guide.md +4 -4
  93. package/bundled-skills/domain-modeling/ADR-FORMAT.md +47 -0
  94. package/bundled-skills/domain-modeling/CONTEXT-FORMAT.md +60 -0
  95. package/bundled-skills/domain-modeling/SKILL.md +105 -0
  96. package/bundled-skills/dos-verify-done-claims/SKILL.md +16 -4
  97. package/bundled-skills/ecl-harness-engineer/agents/creator-config.md +1 -1
  98. package/bundled-skills/ecl-harness-engineer/references/environment-config-guide.md +2 -2
  99. package/bundled-skills/ecl-harness-engineer/references/environment-detection-guide.md +4 -4
  100. package/bundled-skills/event-staffing-ordering/SKILL.md +4 -0
  101. package/bundled-skills/grill-me/SKILL.md +36 -0
  102. package/bundled-skills/grill-with-docs/SKILL.md +36 -0
  103. package/bundled-skills/grilling/SKILL.md +39 -0
  104. package/bundled-skills/handoff/SKILL.md +45 -0
  105. package/bundled-skills/image-generator/.env.example +7 -0
  106. package/bundled-skills/image-generator/SKILL.md +509 -0
  107. package/bundled-skills/improve-codebase-architecture/HTML-REPORT.md +123 -0
  108. package/bundled-skills/improve-codebase-architecture/SKILL.md +97 -0
  109. package/bundled-skills/learn/SKILL.md +156 -0
  110. package/bundled-skills/lesson-generator/SKILL.md +90 -0
  111. package/bundled-skills/llm-council/.env.example +7 -0
  112. package/bundled-skills/llm-council/SKILL.md +602 -0
  113. package/bundled-skills/loop-library/SKILL.md +208 -0
  114. package/bundled-skills/loop-library/agents/openai.yaml +4 -0
  115. package/bundled-skills/loop-library/references/catalog.md +270 -0
  116. package/bundled-skills/lovable-cleanup/SKILL.md +9 -7
  117. package/bundled-skills/macos-screen-recorder/SKILL.md +9 -1
  118. package/bundled-skills/mailtrap-managing-contacts/SKILL.md +112 -0
  119. package/bundled-skills/mailtrap-sending-emails/SKILL.md +167 -0
  120. package/bundled-skills/mailtrap-setting-up-sending-domain/SKILL.md +77 -0
  121. package/bundled-skills/mailtrap-testing-with-sandbox/SKILL.md +110 -0
  122. package/bundled-skills/prototype/LOGIC.md +79 -0
  123. package/bundled-skills/prototype/SKILL.md +62 -0
  124. package/bundled-skills/prototype/UI.md +112 -0
  125. package/bundled-skills/screenstudio-alt/SKILL.md +9 -1
  126. package/bundled-skills/setup-matt-pocock-skills/SKILL.md +158 -0
  127. package/bundled-skills/setup-matt-pocock-skills/domain.md +51 -0
  128. package/bundled-skills/setup-matt-pocock-skills/issue-tracker-github.md +34 -0
  129. package/bundled-skills/setup-matt-pocock-skills/issue-tracker-gitlab.md +35 -0
  130. package/bundled-skills/setup-matt-pocock-skills/issue-tracker-local.md +19 -0
  131. package/bundled-skills/setup-matt-pocock-skills/triage-labels.md +15 -0
  132. package/bundled-skills/survey-generator/LICENSE +21 -0
  133. package/bundled-skills/survey-generator/SKILL.md +143 -0
  134. package/bundled-skills/survey-generator/build_artifact.py +208 -0
  135. package/bundled-skills/survey-generator/examples/agentic-engineering/research_bundle.json +1196 -0
  136. package/bundled-skills/survey-generator/examples/agentic-engineering/survey.html +706 -0
  137. package/bundled-skills/survey-generator/style_spec.json +85 -0
  138. package/bundled-skills/survey-generator/templates/research_bundle_template.json +69 -0
  139. package/bundled-skills/tdd/SKILL.md +139 -0
  140. package/bundled-skills/tdd/mocking.md +59 -0
  141. package/bundled-skills/tdd/refactoring.md +10 -0
  142. package/bundled-skills/tdd/tests.md +61 -0
  143. package/bundled-skills/teach/GLOSSARY-FORMAT.md +35 -0
  144. package/bundled-skills/teach/LEARNING-RECORD-FORMAT.md +46 -0
  145. package/bundled-skills/teach/MISSION-FORMAT.md +31 -0
  146. package/bundled-skills/teach/RESOURCES-FORMAT.md +32 -0
  147. package/bundled-skills/teach/SKILL.md +169 -0
  148. package/bundled-skills/to-issues/SKILL.md +115 -0
  149. package/bundled-skills/to-prd/SKILL.md +104 -0
  150. package/bundled-skills/tools-page-seo-optimizer/SKILL.md +616 -0
  151. package/bundled-skills/triage/AGENT-BRIEF.md +207 -0
  152. package/bundled-skills/triage/OUT-OF-SCOPE.md +105 -0
  153. package/bundled-skills/triage/SKILL.md +143 -0
  154. package/bundled-skills/vibecode-production-qa-validator/SKILL.md +371 -141
  155. package/bundled-skills/wiki-builder/SKILL.md +157 -0
  156. package/bundled-skills/wiki-builder/agents/openai.yaml +5 -0
  157. package/bundled-skills/wiki-builder/references/wiki-flavors.md +98 -0
  158. package/bundled-skills/wiki-builder/scripts/init_wiki.sh +105 -0
  159. package/bundled-skills/wiki-builder/templates/index.md +20 -0
  160. package/bundled-skills/wiki-builder/templates/maintenance-log.md +7 -0
  161. package/bundled-skills/wiki-builder/templates/prompts/compile-concept-page.md +12 -0
  162. package/bundled-skills/wiki-builder/templates/prompts/compile-index.md +11 -0
  163. package/bundled-skills/wiki-builder/templates/prompts/compile-source-page.md +12 -0
  164. package/bundled-skills/wiki-builder/templates/prompts/lint-wiki.md +10 -0
  165. package/bundled-skills/wiki-builder/templates/prompts/query-and-file.md +11 -0
  166. package/bundled-skills/wiki-builder/templates/sources.md +9 -0
  167. package/bundled-skills/wiki-builder/templates/wiki.config.md +53 -0
  168. package/bundled-skills/writing-great-skills/GLOSSARY.md +181 -0
  169. package/bundled-skills/writing-great-skills/SKILL.md +111 -0
  170. package/bundled-skills/yao-meta-skill/SKILL.md +86 -0
  171. package/bundled-skills/yao-meta-skill/agents/interface.yaml +26 -0
  172. package/bundled-skills/yao-meta-skill/manifest.json +24 -0
  173. package/bundled-skills/yao-meta-skill/references/artifact-design-doctrine.md +49 -0
  174. package/bundled-skills/yao-meta-skill/references/authoring-discipline.md +78 -0
  175. package/bundled-skills/yao-meta-skill/references/autonomous-adaptation.md +65 -0
  176. package/bundled-skills/yao-meta-skill/references/distribution-registry-method.md +60 -0
  177. package/bundled-skills/yao-meta-skill/references/eval-playbook.md +69 -0
  178. package/bundled-skills/yao-meta-skill/references/gate-selection.md +68 -0
  179. package/bundled-skills/yao-meta-skill/references/governance.md +134 -0
  180. package/bundled-skills/yao-meta-skill/references/human-review-template.md +54 -0
  181. package/bundled-skills/yao-meta-skill/references/intent-dialogue.md +138 -0
  182. package/bundled-skills/yao-meta-skill/references/iteration-philosophy.md +30 -0
  183. package/bundled-skills/yao-meta-skill/references/non-skill-decision-tree.md +39 -0
  184. package/bundled-skills/yao-meta-skill/references/operating-modes.md +107 -0
  185. package/bundled-skills/yao-meta-skill/references/output-eval-method.md +113 -0
  186. package/bundled-skills/yao-meta-skill/references/output-quality-risk.md +41 -0
  187. package/bundled-skills/yao-meta-skill/references/output-visual-quality.md +53 -0
  188. package/bundled-skills/yao-meta-skill/references/packaging-contracts.md +70 -0
  189. package/bundled-skills/yao-meta-skill/references/pattern-extraction-doctrine.md +76 -0
  190. package/bundled-skills/yao-meta-skill/references/platform-capability-matrix.md +49 -0
  191. package/bundled-skills/yao-meta-skill/references/prompt-engineering-doctrine.md +76 -0
  192. package/bundled-skills/yao-meta-skill/references/qa-ladder.md +57 -0
  193. package/bundled-skills/yao-meta-skill/references/reference-scan.md +126 -0
  194. package/bundled-skills/yao-meta-skill/references/regression-cause-taxonomy.md +80 -0
  195. package/bundled-skills/yao-meta-skill/references/resource-boundaries.md +120 -0
  196. package/bundled-skills/yao-meta-skill/references/review-studio-method.md +87 -0
  197. package/bundled-skills/yao-meta-skill/references/review-waiver-method.md +76 -0
  198. package/bundled-skills/yao-meta-skill/references/runtime-conformance-method.md +21 -0
  199. package/bundled-skills/yao-meta-skill/references/skill-archetypes.md +86 -0
  200. package/bundled-skills/yao-meta-skill/references/skill-atlas-method.md +35 -0
  201. package/bundled-skills/yao-meta-skill/references/skill-engineering-method.md +210 -0
  202. package/bundled-skills/yao-meta-skill/references/skill-ir-method.md +41 -0
  203. package/bundled-skills/yao-meta-skill/references/skillops-decision-policy.md +53 -0
  204. package/bundled-skills/yao-meta-skill/references/systems-thinking-doctrine.md +75 -0
  205. package/bundled-skills/yao-meta-skill/references/telemetry-drift-method.md +182 -0
  206. package/bundled-skills/yao-meta-skill/references/trust-security-method.md +79 -0
  207. package/bundled-skills/yao-meta-skill/references/user-memory-policy.md +35 -0
  208. package/bundled-skills/youtube-notetaker/SKILL.md +209 -0
  209. package/bundled-skills/youtube-notetaker/reference/artifact.html +269 -0
  210. package/bundled-skills/youtube-notetaker/scripts/contact_sheet.py +53 -0
  211. package/bundled-skills/youtube-notetaker/scripts/detect_slides.sh +19 -0
  212. package/bundled-skills/youtube-notetaker/scripts/download.sh +24 -0
  213. package/bundled-skills/youtube-notetaker/scripts/extract_slides.py +43 -0
  214. package/bundled-skills/youtube-notetaker/scripts/serve.py +222 -0
  215. package/bundled-skills/youtube-notetaker/scripts/setup.sh +27 -0
  216. package/bundled-skills/youtube-notetaker/scripts/verify.sh +31 -0
  217. package/bundled-skills/youtube-notetaker/scripts/vtt_to_transcript.py +59 -0
  218. package/bundled-skills/youtube-notetaker/scripts/write_library_item.py +69 -0
  219. package/package.json +1 -1
  220. package/skills_index.json +2013 -330
  221. package/bundled-skills/ai-md/SKILL.md +0 -523
  222. package/bundled-skills/atlas-contract/SKILL.md +0 -650
  223. package/bundled-skills/busybox-on-windows/SKILL.md +0 -40
  224. package/bundled-skills/monte-carlo-prevent/SKILL.md +0 -257
  225. package/bundled-skills/monte-carlo-prevent/references/TROUBLESHOOTING.md +0 -23
  226. package/bundled-skills/monte-carlo-prevent/references/parameters.md +0 -32
  227. package/bundled-skills/monte-carlo-prevent/references/workflows.md +0 -478
  228. package/bundled-skills/monte-carlo-push-ingestion/SKILL.md +0 -372
  229. package/bundled-skills/monte-carlo-push-ingestion/references/anomaly-detection.md +0 -87
  230. package/bundled-skills/monte-carlo-push-ingestion/references/custom-lineage.md +0 -203
  231. package/bundled-skills/monte-carlo-push-ingestion/references/direct-http-api.md +0 -207
  232. package/bundled-skills/monte-carlo-push-ingestion/references/prerequisites.md +0 -150
  233. package/bundled-skills/monte-carlo-push-ingestion/references/push-lineage.md +0 -160
  234. package/bundled-skills/monte-carlo-push-ingestion/references/push-metadata.md +0 -158
  235. package/bundled-skills/monte-carlo-push-ingestion/references/push-query-logs.md +0 -219
  236. package/bundled-skills/monte-carlo-push-ingestion/references/validation.md +0 -257
  237. package/bundled-skills/monte-carlo-push-ingestion/scripts/sample_verify.py +0 -357
  238. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/bigquery/collect_and_push_lineage.py +0 -70
  239. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/bigquery/collect_and_push_metadata.py +0 -65
  240. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/bigquery/collect_and_push_query_logs.py +0 -70
  241. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/bigquery/collect_lineage.py +0 -214
  242. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/bigquery/collect_metadata.py +0 -160
  243. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/bigquery/collect_query_logs.py +0 -164
  244. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/bigquery/push_lineage.py +0 -198
  245. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/bigquery/push_metadata.py +0 -193
  246. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/bigquery/push_query_logs.py +0 -207
  247. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/bigquery-iceberg/collect_and_push_metadata.py +0 -71
  248. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/bigquery-iceberg/collect_and_push_query_logs.py +0 -64
  249. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/bigquery-iceberg/collect_metadata.py +0 -253
  250. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/bigquery-iceberg/collect_query_logs.py +0 -149
  251. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/bigquery-iceberg/push_metadata.py +0 -190
  252. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/bigquery-iceberg/push_query_logs.py +0 -208
  253. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/databricks/collect_and_push_lineage.py +0 -83
  254. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/databricks/collect_and_push_metadata.py +0 -77
  255. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/databricks/collect_and_push_query_logs.py +0 -83
  256. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/databricks/collect_lineage.py +0 -240
  257. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/databricks/collect_metadata.py +0 -212
  258. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/databricks/collect_query_logs.py +0 -204
  259. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/databricks/push_lineage.py +0 -192
  260. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/databricks/push_metadata.py +0 -178
  261. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/databricks/push_query_logs.py +0 -200
  262. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/hive/collect_and_push_lineage.py +0 -119
  263. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/hive/collect_and_push_metadata.py +0 -119
  264. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/hive/collect_and_push_query_logs.py +0 -117
  265. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/hive/collect_lineage.py +0 -265
  266. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/hive/collect_metadata.py +0 -313
  267. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/hive/collect_query_logs.py +0 -284
  268. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/hive/push_lineage.py +0 -309
  269. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/hive/push_metadata.py +0 -245
  270. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/hive/push_query_logs.py +0 -255
  271. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/redshift/collect_and_push_lineage.py +0 -78
  272. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/redshift/collect_and_push_metadata.py +0 -80
  273. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/redshift/collect_and_push_query_logs.py +0 -88
  274. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/redshift/collect_lineage.py +0 -235
  275. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/redshift/collect_metadata.py +0 -219
  276. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/redshift/collect_query_logs.py +0 -239
  277. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/redshift/push_lineage.py +0 -178
  278. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/redshift/push_metadata.py +0 -178
  279. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/redshift/push_query_logs.py +0 -196
  280. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/snowflake/collect_and_push_lineage.py +0 -154
  281. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/snowflake/collect_and_push_metadata.py +0 -137
  282. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/snowflake/collect_and_push_query_logs.py +0 -137
  283. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/snowflake/collect_lineage.py +0 -349
  284. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/snowflake/collect_metadata.py +0 -329
  285. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/snowflake/collect_query_logs.py +0 -254
  286. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/snowflake/push_lineage.py +0 -307
  287. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/snowflake/push_metadata.py +0 -228
  288. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/snowflake/push_query_logs.py +0 -248
  289. package/bundled-skills/monte-carlo-push-ingestion/scripts/test_template_sdk_usage.py +0 -340
  290. package/bundled-skills/skill-optimizer/SKILL.md +0 -271
  291. package/bundled-skills/using-superpowers/SKILL.md +0 -98
@@ -0,0 +1,434 @@
1
+ # Competitor Analysis — Workflow Reference
2
+
3
+ ## Contents
4
+ - [Discovery Batch JSON Schema](#discovery-batch-json-schema) — browse cloud search output format
5
+ - [Competitor Research Markdown Format](#competitor-research-markdown-format) — frontmatter + body section spec
6
+ - [Extracting Page Text](#extracting-page-text) — browse cloud fetch (markdown default; --format raw for HTML)
7
+ - [Discovery — parallel Bash, not subagents](#discovery--parallel-bash-not-subagents) — Wave A/B/C recipes
8
+ - [Enrichment fan-out — 5 subagents PER competitor](#enrichment-fan-out--5-subagents-per-competitor-deepdeeper-modes)
9
+ - [Legacy: Single-subagent template](#legacy-single-subagent-template-quick-mode-only) — quick mode only
10
+ - [Wave Management](#wave-management) — parallelism rule, gate phase, sizing formula
11
+ - [Report Compilation](#report-compilation) — compile_report.mjs invocation
12
+
13
+ ## Discovery Batch JSON Schema
14
+
15
+ File: `/tmp/competitor_discovery_batch_{N}.json`
16
+
17
+ `browse cloud search --output` writes a JSON object:
18
+
19
+ ```json
20
+ {
21
+ "requestId": "abc123",
22
+ "query": "alternatives to acme",
23
+ "results": [
24
+ { "id": "...", "url": "https://example.com", "title": "Example Corp", "image": null, "favicon": null }
25
+ ]
26
+ }
27
+ ```
28
+
29
+ The `list_urls.mjs` script (run with `--prefix competitor`) deduplicates across batches.
30
+
31
+ ## Competitor Research Markdown Format
32
+
33
+ File: `{OUTPUT_DIR}/{competitor-slug}.md` — see `references/example-research.md` for the full template.
34
+
35
+ **YAML frontmatter fields** (used by `compile_report.mjs`):
36
+ - `competitor_name` (required)
37
+ - `website` (required)
38
+ - `tagline`
39
+ - `positioning`
40
+ - `product_description`
41
+ - `target_customer`
42
+ - `pricing_model`
43
+ - `pricing_tiers` (pipe-separated: `Free | Pro $99 | Enterprise Contact`)
44
+ - `key_features` (pipe-separated)
45
+ - `integrations` (pipe-separated)
46
+ - `headquarters`
47
+ - `founded`
48
+ - `employee_estimate`
49
+ - `funding_info`
50
+ - `strategic_diff` (one-line for overview table; deeper mode only)
51
+
52
+ **Body sections** (in this order — `compile_report.mjs` parses by heading):
53
+ - `## Product`
54
+ - `## Pricing`
55
+ - `## Features`
56
+ - `## Positioning`
57
+ - `## Comparison vs {user_company}` (deeper only)
58
+ - `## Mentions`
59
+ - `## Benchmarks` (deeper only)
60
+ - `## Research Findings`
61
+
62
+ **Mentions line format** (parsed into the mentions feed):
63
+ ```
64
+ - **[SourceType]** Title | Snippet (source: URL, YYYY-MM-DD)
65
+ ```
66
+ `SourceType` ∈ `Benchmark | Comparison | News | Reddit | HN | LinkedIn | YouTube | Review | Podcast | X`. Date is optional but preferred.
67
+
68
+ ## Extracting Page Text
69
+
70
+ `browse cloud fetch --allow-redirects` returns clean **markdown by default** — no HTML stripping needed. Just cap the length:
71
+
72
+ ```bash
73
+ browse cloud fetch --allow-redirects "https://rivalco.com/pricing" | head -c 3000
74
+ ```
75
+
76
+ If you need the original HTML (e.g. to read the `<title>` tag or parse markup), add `--format raw` and strip tags:
77
+
78
+ ```bash
79
+ browse cloud fetch --allow-redirects --format raw "https://rivalco.com/pricing" | sed 's/<script[^>]*>.*<\/script>//g; s/<style[^>]*>.*<\/style>//g; s/<[^>]*>//g; s/&amp;/\&/g; s/&lt;/</g; s/&gt;/>/g; s/&nbsp;/ /g; s/&#[0-9]*;//g' | tr -s ' \n' | head -c 3000
80
+ ```
81
+
82
+ Limit to ~3000 chars per page to keep subagent context manageable. For JS-heavy pages (client-rendered pricing tables) where the Fetch API returns thin content, open the page in a browser session and read it: `browse open "{url}" --remote` then `browse get markdown`.
83
+
84
+ ## Discovery — parallel Bash, not subagents
85
+
86
+ The main agent runs discovery as **3 parallel `browse cloud search` Bash calls** (one per wave) in a SINGLE message. No subagent layer. Each wave chains its 2-4 queries with `&&` and writes results to `/tmp/competitor_discovery_batch_{wave}{N}.json`.
87
+
88
+ Example — main agent issues these three Bash tool calls in parallel in one message:
89
+
90
+ ```bash
91
+ # Wave A — alternatives
92
+ browse cloud search "alternatives to {user_company}" --num-results 12 --output /tmp/competitor_discovery_batch_A1.json && \
93
+ browse cloud search "{user_company} competitors" --num-results 12 --output /tmp/competitor_discovery_batch_A2.json && \
94
+ echo "A done"
95
+ ```
96
+
97
+ ```bash
98
+ # Wave B — precise category
99
+ browse cloud search "{precise_category}" --num-results 12 --output /tmp/competitor_discovery_batch_B1.json && \
100
+ browse cloud search "{compose 3 distinctive tokens}" --num-results 12 --output /tmp/competitor_discovery_batch_B2.json && \
101
+ browse cloud search "{primary_noun} for ai agents" --num-results 12 --output /tmp/competitor_discovery_batch_B3.json && \
102
+ echo "B done"
103
+ ```
104
+
105
+ ```bash
106
+ # Wave C — comparison-page graph
107
+ browse cloud search "{user_company} vs" --num-results 12 --output /tmp/competitor_discovery_batch_C1.json && \
108
+ browse cloud search "{seed1} vs" --num-results 12 --output /tmp/competitor_discovery_batch_C2.json && \
109
+ browse cloud search "{seed2} vs" --num-results 12 --output /tmp/competitor_discovery_batch_C3.json && \
110
+ echo "C done"
111
+ ```
112
+
113
+ Why direct Bash and not subagents: each wave is 2-4 `browse cloud search` calls — agent cold-start + tool-reasoning overhead is bigger than the actual work. Using parallel Bash saves ~1-2 min per run with no quality loss.
114
+
115
+ ### Discovery query patterns
116
+
117
+ Discovery uses **three parallel waves** (evaluated — all three are additive):
118
+
119
+ **Wave A — Generic alternatives** (broad net, lots of noise):
120
+ - `"alternatives to {user_company}"`
121
+ - `"{user_company} competitors"`
122
+
123
+ **Wave B — Precise category queries** (uses `precise_category` from self-research):
124
+ - `"{precise_category}"` verbatim
125
+ - `"{precise_category_2_3_keywords}"` — pick the 3 most distinctive tokens
126
+ - Compose with "API", "cloud", "for agents": `"cloud {primary_noun} for ai agents"`, `"{primary_noun} infrastructure API"`
127
+
128
+ **Wave C — Comparison-page graph** (highest-precision single wave):
129
+ - `"{user_company} vs"`
130
+ - For each seed competitor from the user's profile, also run `"{seed} vs"`
131
+ - After the searches, `scripts/extract_vs_names.mjs` parses `"X vs Y"` titles across all Wave C results to surface candidate names that don't appear as URLs.
132
+
133
+ **Evaluation result** (tested on a search-API run): Wave A returns ~10% real competitors (mostly AI-tool-listicle aggregators). Wave B returns ~35%. Wave C uniquely surfaces named brands via title parsing that neither A nor B finds. Use all three.
134
+
135
+ ## Enrichment fan-out — 5 subagents PER competitor (deep/deeper modes)
136
+
137
+ For each gated-PASS competitor, launch **five parallel subagents**, one per lane. Each subagent writes a *partial* to `{OUTPUT_DIR}/partials/{slug}.{lane}.md`. After all subagents complete, `scripts/merge_partials.mjs` unions the partials into one canonical `{OUTPUT_DIR}/{slug}.md` per competitor (dedup mentions by URL, sort by date desc).
138
+
139
+ The 5 lanes:
140
+
141
+ | Lane | Slug | Scope |
142
+ |------|------|-------|
143
+ | **A. Marketing** | `marketing` | Owns canonical frontmatter. Pricing, features, positioning, integrations, customers, target, team, funding, HQ. Homepage + sitemap-driven page discovery. |
144
+ | **B. Discussion** | `discussion` | Reddit, HN, forums, dev.to, hashnode. Broader queries beyond `site:` restrictions — also `"{competitor}" discussion`, `"{competitor}" review 2026`, `"{competitor}" issues OR problems`. Writes Mentions bullets with dates. |
145
+ | **C. Social** | `social` | LinkedIn posts, YouTube videos, Twitter/X threads. Search snippets only — do NOT fetch (auth walls). |
146
+ | **D. News & Comparisons** | `news` | Comparison pages ("X vs Y"), TechCrunch / Verge / Forbes / VentureBeat / Businesswire, independent blog reviews, Substack. Every mention MUST include a date. |
147
+ | **E. Technical & Benchmarks** | `technical` | GitHub benchmark repos/PRs, performance blog posts, independent tests. Writes Benchmarks bullets AND Findings on technical specifics (retrieval modes, latency, rate limits, SDKs). |
148
+
149
+ **Wave management — launch ALL subagents in ONE message**: for N competitors × 5 lanes = 5N subagents, fit them all in a single Agent-tool message. Wall clock then equals the slowest single subagent (~3-5 min) instead of `batches × slowest_per_batch`. On a real 10-competitor run we measured 25 minutes wasted by self-throttling to 10-per-message — the Agent tool happily runs 50+ in parallel; do not split into batches for "politeness". The only cap is that each subagent still batches its own Bash operations into a single call.
150
+
151
+ **Merge step** (once all partials exist):
152
+ ```bash
153
+ node {SKILL_DIR}/scripts/merge_partials.mjs {OUTPUT_DIR}
154
+ ```
155
+ Produces one `{OUTPUT_DIR}/{slug}.md` per competitor with dedup'd Mentions (sorted date desc), Benchmarks, and Findings.
156
+
157
+ ## Legacy: Single-subagent template (quick mode only)
158
+
159
+ In `quick` mode, keep a single subagent per batch of competitors (no fan-out — Lane 1 only, budget 2-3 calls each).
160
+
161
+ ```
162
+ You are a competitor enrichment subagent. For each competitor URL, run the 4-lane research
163
+ pattern and write a single markdown file per competitor.
164
+
165
+ CONTEXT:
166
+ - User's company: {user_company}
167
+ - User's product: {user_product}
168
+ - User's key features: {user_key_features}
169
+ - Depth mode: {depth_mode} (quick | deep | deeper)
170
+ - Output directory: {OUTPUT_DIR} ← write files HERE, as a full literal path
171
+
172
+ COMPETITOR URLS TO PROCESS:
173
+ {url_list}
174
+
175
+ TOOL RULES — CRITICAL, FOLLOW EXACTLY:
176
+ 1. You may ONLY use the Bash tool. No exceptions.
177
+ 2. All searches: Bash → browse cloud search "..." --num-results 10
178
+ 3. All page fetches: Bash → browse cloud fetch --allow-redirects "..."
179
+ browse cloud fetch returns clean markdown by default — just `| head -c 3000`, no HTML stripping.
180
+ If you need the raw HTML, add --format raw and pipe through:
181
+ sed 's/<script[^>]*>.*<\/script>//g; s/<style[^>]*>.*<\/style>//g; s/<[^>]*>//g' | tr -s ' \n' | head -c 3000
182
+ If a page returns thin content or "enable JavaScript", use `browse open "{url}" --remote` then `browse get markdown`.
183
+ 4. BATCH all file writes: Write ALL markdown files in a SINGLE Bash call using chained heredocs.
184
+ 5. BANNED TOOLS: WebFetch, WebSearch, Write, Read, Glob, Grep — ALL BANNED.
185
+ 6. NEVER use ~ or $HOME in paths — use full literal paths.
186
+
187
+ RESEARCH PATTERN (per competitor — lanes are depth-gated):
188
+
189
+ LANE 1 — Marketing Surface (always run):
190
+ a. Fetch competitor homepage
191
+ b. Discover via sitemap: /sitemap.xml — find /pricing, /features, /integrations, /customers
192
+ c. Fetch 2-4 most relevant pages
193
+ d. Extract: tagline, positioning, product_description, target_customer,
194
+ pricing_model, pricing_tiers, key_features, integrations
195
+
196
+ LANE 2 — External Signal (deep + deeper):
197
+ Run these searches:
198
+ browse cloud search "{competitor} vs"
199
+ browse cloud search "{competitor} alternatives review"
200
+ browse cloud search "site:reddit.com {competitor}"
201
+ browse cloud search "site:news.ycombinator.com {competitor}"
202
+ browse cloud search "site:linkedin.com/posts {competitor}"
203
+ browse cloud search "site:youtube.com {competitor}"
204
+ browse cloud search "{competitor} G2 OR Capterra"
205
+ browse cloud search "{competitor} launch OR funding 2025 OR 2026"
206
+
207
+ For each search result, classify source type from URL:
208
+ reddit.com → Reddit
209
+ news.ycombinator.com → HN
210
+ linkedin.com → LinkedIn
211
+ youtube.com/youtu.be → YouTube
212
+ twitter.com/x.com → X (or Twitter — either works)
213
+ dev.to → DevTo
214
+ hashnode.dev, hashnode.com → Hashnode
215
+ *.substack.com → Substack
216
+ spotify.com/episode, transistor.fm, simplecast.com → Podcast
217
+ g2.com/capterra.com/trustradius.com → Review
218
+ url or title contains "vs" → Comparison
219
+ techcrunch/theverge/venturebeat/forbes/businesswire/wired/fortune → News
220
+ other blog domain → Blog
221
+
222
+ Record each as a Mentions line with title + one-line snippet + URL + **date**. Always include
223
+ the date when available. If a `browse cloud search` result carries a date field, prefer it.
224
+ If absent, parse the year from title/URL (e.g. "2026" or `/2025/11/` in a news URL).
225
+ For LinkedIn and YouTube — use search snippet only, do NOT fetch the page.
226
+
227
+ LANE 3 — Public Benchmarks (deeper only):
228
+ Run these searches:
229
+ browse cloud search "{competitor} benchmark"
230
+ browse cloud search "site:github.com {competitor} benchmark"
231
+ browse cloud search "{category} benchmark {competitor}"
232
+
233
+ Record each hit in ## Benchmarks with: title, source, URL, one-line key finding.
234
+ Also append to ## Mentions with type Benchmark.
235
+
236
+ LANE 4 — Strategic Diff vs {user_company} (deeper only):
237
+ Using Lane 1-3 findings + the user's company profile, write:
238
+ ## Comparison vs {user_company}
239
+ - Overlaps: ...
240
+ - Gaps: ...
241
+ - Where they win: ...
242
+ - Where you win: ...
243
+ Also fill the `strategic_diff` frontmatter field with a one-line summary.
244
+
245
+ HARD TOOL-CALL CAP — count your browse cloud calls and STOP at the cap. Partial output beats blocking the pipeline.
246
+ quick mode: 3 browse cloud calls max per competitor
247
+ deep mode: 8 browse cloud calls max per competitor
248
+ deeper mode: 12 browse cloud calls max per competitor
249
+
250
+ ENFORCEMENT — at the start of every Bash call, prepend a comment like
251
+ # browse call N/8 (deep mode)
252
+ After hitting the cap, write the output file with WHAT YOU HAVE — even if a section is thin.
253
+ NEVER do a 9th call in deep mode "to be thorough". The pipeline budgets time on this assumption.
254
+
255
+ Observed cost of overshoot (Apr 25 search-API run): two lanes hit 29-30 calls each, drove
256
+ wall-clock for the whole 30-agent fan-out from 5 min → 12 min. Don't do this.
257
+
258
+ OUTPUT — write ALL competitor files in a SINGLE Bash call using chained heredocs directly to {OUTPUT_DIR}:
259
+
260
+ cat << 'COMPETITOR_MD' > {OUTPUT_DIR}/{slug1}.md
261
+ ---
262
+ competitor_name: {name}
263
+ website: {url}
264
+ tagline: {tagline}
265
+ positioning: {positioning}
266
+ product_description: {description}
267
+ target_customer: {audience}
268
+ pricing_model: {model}
269
+ pricing_tiers: {tier1} | {tier2} | {tier3}
270
+ key_features: {f1} | {f2} | {f3}
271
+ integrations: {i1} | {i2}
272
+ headquarters: {hq}
273
+ founded: {year}
274
+ employee_estimate: {estimate}
275
+ funding_info: {funding}
276
+ strategic_diff: {one line — deeper only}
277
+ ---
278
+
279
+ ## Product
280
+ {paragraph}
281
+
282
+ ## Pricing
283
+ {bullets per tier}
284
+
285
+ ## Features
286
+ {bullets}
287
+
288
+ ## Positioning
289
+ {paragraph}
290
+
291
+ ## Comparison vs {user_company} ← deeper only
292
+ - Overlaps: ...
293
+ - Gaps: ...
294
+ - Where they win: ...
295
+ - Where you win: ...
296
+
297
+ ## Mentions
298
+ - **[SourceType]** Title | Snippet (source: URL, YYYY-MM-DD)
299
+
300
+ ## Benchmarks ← deeper only
301
+ - Title | Source | URL | Key finding
302
+
303
+ ## Research Findings
304
+ - **[confidence]** Fact (source: URL)
305
+ COMPETITOR_MD
306
+ cat << 'COMPETITOR_MD' > {OUTPUT_DIR}/{slug2}.md
307
+ ...
308
+ COMPETITOR_MD
309
+
310
+ Use 'COMPETITOR_MD' (quoted) as the heredoc delimiter to prevent shell variable expansion.
311
+
312
+ Report back ONLY: "Batch {batch_id}: {succeeded}/{total} competitors researched, {mentions_count} mentions, {benchmarks_count} benchmarks."
313
+ Do NOT return raw data to the main conversation.
314
+ ```
315
+
316
+ ## Wave Management
317
+
318
+ ### Key Principle: Maximize Parallelism, Minimize Prompts
319
+ **Launch ALL subagents needed for a phase in ONE message.** No "up to 6 per message" cap — the Agent tool runs them in parallel, so wall clock = slowest single agent regardless of count. On a 10-competitor × 5-lane = 50-subagent enrichment, splitting into 5 batches of 10 cost an extra 20 minutes of wall clock vs one batch of 50 (measured Apr 2026). Each subagent still MUST batch its own Bash operations into a single call.
320
+
321
+ ### Discovery Phase
322
+ - **Run discovery as parallel `browse cloud search` Bash calls, not subagents.** Subagent overhead (cold start + tool reasoning) is bigger than the work. Three Bash tool calls in one message — one per wave (A/B/C) — chain each wave's searches with `&&`.
323
+ - Each wave's bash call writes its outputs as `/tmp/competitor_discovery_batch_{wave}{N}.json`
324
+ - After all waves complete, run the following in sequence:
325
+ ```bash
326
+ # 1. Dedup URLs from all batches
327
+ node {SKILL_DIR}/scripts/list_urls.mjs /tmp --prefix competitor > /tmp/competitor_urls.txt
328
+
329
+ # 2. Extract candidate names from "X vs Y" titles (Wave C output)
330
+ node {SKILL_DIR}/scripts/extract_vs_names.mjs /tmp --prefix competitor \
331
+ --seed "{user_company},{seed1},{seed2},{seed3}" \
332
+ > /tmp/competitor_vs_names.jsonl
333
+ ```
334
+ - **Filter URLs**: Remove blog posts, news articles, AI-tool directories (seektool.ai, respan.ai, agentsindex.ai, toolradar.com, aitoolsatlas.ai, aidirectory.com, vibecodedthis.com, aichief.com, openalternative.co, cbinsights.com, saasworthy.com, softwareworld.com), review aggregators (g2.com, capterra.com, trustradius.com), databases (crunchbase.com, tracxn.com), and the user's own domain. Keep only candidate company homepages.
335
+ - For names from `extract_vs_names.mjs` that didn't resolve to a domain, optionally run `browse cloud search "{name}" --num-results 3` to resolve the top domain; skip if ambiguous.
336
+ - **Merge**: filtered-URL list ∪ resolved `vs_names` domains ∪ user-provided seed URLs. Dedup by hostname into `/tmp/competitor_candidates.txt`.
337
+
338
+ ### User-confirm phase (between gate and enrichment — mandatory)
339
+
340
+ After the gate writes `/tmp/competitor_gated.jsonl`, the main agent MUST ask the user to confirm the enrichment set before launching subagents. Enrichment is 25 subagents × depth budget per competitor — too expensive to run on guesses.
341
+
342
+ Present three buckets to the user:
343
+ 1. **PASS** — status=PASS rows with title
344
+ 2. **UNKNOWN** — status=UNKNOWN (fetch failed; always a silent miss risk — JS-heavy homepages, Cloudflare challenges)
345
+ 3. **Rejected-brand matches** — top ~10 REJECT rows whose title contains a seed token or that showed up repeatedly in the Wave C "X vs Y" graph
346
+
347
+ Then `AskUserQuestion` with a checkbox list + free-text "add more". Write the confirmed set to `/tmp/competitor_enrichment_set.txt` (one URL per line). That file — not `/tmp/competitor_passed.txt` — is the input to the enrichment subagents.
348
+
349
+ Known gate blind spots to surface aggressively:
350
+ - JS-heavy landing pages return near-empty hero text → gate's keyword matcher has nothing to bite on
351
+ - Cloudflare challenge titles ("Just a moment...") → obvious false negative
352
+ - "Search foundation" / "retrieval backbone" / "agent runtime" — semantic variants of the category don't lexically match
353
+ - Apex domain vs product subdomain (e.g. `brave.com` the browser vs `api-dashboard.search.brave.com` the actual API product)
354
+
355
+ ### Gate Phase (between discovery and enrichment)
356
+
357
+ Drop wrong-category candidates BEFORE enrichment burns tool calls on them.
358
+
359
+ ```bash
360
+ cat /tmp/competitor_candidates.txt \
361
+ | node {SKILL_DIR}/scripts/gate_candidates.mjs \
362
+ --include "{category_include_keywords_csv}" \
363
+ --exclude "{exclusion_list_csv}" \
364
+ --concurrency 6 \
365
+ > /tmp/competitor_gated.jsonl
366
+
367
+ # Extract PASS-only URLs for enrichment
368
+ grep '"status":"PASS"' /tmp/competitor_gated.jsonl \
369
+ | node -e 'require("fs").readFileSync(0,"utf-8").split("\n").filter(Boolean).forEach(l => { try { console.log(JSON.parse(l).url); } catch {} })' \
370
+ > /tmp/competitor_passed.txt
371
+ ```
372
+
373
+ **Keyword sources**:
374
+ - `--include` ← profile's `category_include_keywords` (comma-joined).
375
+ - `--exclude` ← profile's `exclusion_list`.
376
+
377
+ **Gate logic** (position-aware): REJECT if exclude term in `<title>`; PASS if include term in `<title>`; for hybrid titles with both (e.g. "Browser Automation & Web Scraping API"), tiebreak by first 200 chars of hero text; otherwise fall through to hero-wide check. Conservative by default.
378
+
379
+ **Review the output** — the main agent SHOULD spot-check both lists and MAY manually re-include a REJECT if it recognizes a known direct competitor whose own marketing is category-ambiguous.
380
+
381
+ **Evaluation on a search-API run** (12 candidates): 7/7 real competitors PASSED; 4/4 wrong-category (vector database, scraping/ETL platform, analytics tool, internal-KB search) REJECTED. One split-identity edge (a search vendor that also sells a scraping suite) rejected — acceptable.
382
+
383
+ ### Enrichment Phase
384
+ Two modes:
385
+
386
+ - **`quick` mode** — single subagent per batch of competitors. Lane A (marketing) only. ~8 competitors per subagent, 2-3 tool calls each. Writes directly to `{OUTPUT_DIR}/{slug}.md`.
387
+ - **`deep` / `deeper` modes** — 5-subagent fan-out PER competitor. Each subagent owns ONE lane (marketing / discussion / social / news / technical). Writes to `{OUTPUT_DIR}/partials/{slug}.{lane}.md`. Budget: 5-8 calls per subagent (deep), 10-15 (deeper). After all lanes complete, run `scripts/merge_partials.mjs` to consolidate.
388
+ - **Launch ALL competitor × lane subagents in a SINGLE Agent tool message.** For 10 competitors × 5 lanes = 50 parallel agents in one message. Do NOT split into batches — wall clock becomes the slowest single agent (~3-5 min) instead of batches-times-batch-max (~25 min on 10 competitors split into 5 rounds of 10).
389
+
390
+ ### Screenshots Phase (after merge, before compile)
391
+
392
+ Capture homepage hero screenshot for each competitor:
393
+ ```bash
394
+ node {SKILL_DIR}/scripts/capture_screenshots.mjs {OUTPUT_DIR} --mode remote --concurrency 1
395
+ ```
396
+ Requires the `browse` CLI (`npm install -g browse`). `--mode remote` drives a Browserbase session (the script passes `--remote` on each `browse` command); use `--mode local` for local Chrome. Writes one PNG per competitor to `{OUTPUT_DIR}/screenshots/{slug}-hero.png`. `compile_report.mjs` auto-embeds the hero in the per-competitor HTML page when present.
397
+
398
+ Cost: ~10-20s per competitor (serial). Total for 5 competitors ≈ 60s.
399
+
400
+ ### Sizing Formula
401
+ ```
402
+ search_queries = ceil(requested_competitors / 20) # discovery is narrower than lead gen
403
+ discovery_subagents = ceil(search_queries / 3)
404
+ expected_urls = search_queries * 15
405
+
406
+ quick: research_subagents = ceil(expected_urls / 8)
407
+ deep: research_subagents = ceil(expected_urls / 4)
408
+ deeper: research_subagents = ceil(expected_urls / 2)
409
+ ```
410
+
411
+ ### Error Handling
412
+ - If a subagent fails, log and continue with remaining batches
413
+ - If >50% of subagents fail in a wave, pause and inform the user
414
+ - If `browse cloud fetch --allow-redirects` fails, try `browse open "{url}" --remote` + `browse get markdown` as fallback, or skip that page
415
+
416
+ ## Report Compilation
417
+
418
+ After all enrichment subagents complete, compile all HTML views in one command:
419
+
420
+ ```bash
421
+ node {SKILL_DIR}/scripts/compile_report.mjs {OUTPUT_DIR} --user-company "{user_company}" --open
422
+ ```
423
+
424
+ The script:
425
+ - Reads all `.md` files in `{OUTPUT_DIR}`
426
+ - Parses YAML frontmatter + body sections
427
+ - Deduplicates by normalized competitor name
428
+ - Generates `{OUTPUT_DIR}/index.html` — overview table (name, tagline, pricing, key features, strategic diff)
429
+ - Generates `{OUTPUT_DIR}/competitors/{slug}.html` — per-competitor deep dive
430
+ - Generates `{OUTPUT_DIR}/matrix.html` — side-by-side feature/pricing grid across competitors
431
+ - Generates `{OUTPUT_DIR}/mentions.html` — chronological feed with source-type pills + client-side filter
432
+ - Generates `{OUTPUT_DIR}/results.csv` — flat spreadsheet
433
+ - Opens `index.html` in the default browser (`--open` flag)
434
+ - Prints a JSON summary to stderr
@@ -0,0 +1,142 @@
1
+ #!/usr/bin/env node
2
+
3
+ // Capture homepage hero screenshot for each competitor in the research directory.
4
+ // Reads per-competitor markdown files, extracts `website` from frontmatter, navigates
5
+ // via `browse`, and writes one PNG per competitor to `{OUTPUT_DIR}/screenshots/`.
6
+ //
7
+ // Requires: `browse` CLI (`npm install -g browse`), either local Chrome (--mode local)
8
+ // or a Browserbase remote session (--mode remote, the default).
9
+ //
10
+ // The browser mode is selected per `browse` command via the --remote / --local flag,
11
+ // so there is no separate environment-config step — see SKILL.md Step 6 for setup notes.
12
+ //
13
+ // Usage: node capture_screenshots.mjs <research-dir> [--mode remote|local] [--concurrency 2]
14
+
15
+ import { readdirSync, readFileSync, mkdirSync, existsSync } from 'fs';
16
+ import { join } from 'path';
17
+ import { spawnSync } from 'child_process';
18
+ import { parseFrontmatter } from './md_utils.mjs';
19
+
20
+ const args = process.argv.slice(2);
21
+
22
+ if (args.includes('--help') || args.includes('-h') || args.length === 0) {
23
+ console.error(`Usage: node capture_screenshots.mjs <research-dir> [options]
24
+
25
+ Reads all .md files in <research-dir>, extracts the "website" field from each
26
+ competitor's YAML frontmatter, and captures a 1280x800 viewport screenshot of the
27
+ homepage. Writes one PNG per competitor as {slug}-hero.png.
28
+
29
+ Output goes to <research-dir>/screenshots/.
30
+
31
+ Options:
32
+ --mode <remote|local> Which browse session to use (default: remote).
33
+ Passed as --remote / --local on each browse command.
34
+ --concurrency <n> How many competitors to capture in parallel (default: 1)
35
+ (screenshot takes ~3s; serial is usually fine)
36
+ --skip-existing Skip competitors that already have screenshots
37
+ --help, -h Show this help message`);
38
+ process.exit(args.includes('--help') || args.includes('-h') ? 0 : 1);
39
+ }
40
+
41
+ const dir = args[0];
42
+ const modeIdx = args.indexOf('--mode');
43
+ const browseMode = modeIdx !== -1 ? args[modeIdx + 1] : 'remote';
44
+ const modeFlag = browseMode === 'local' ? '--local' : '--remote';
45
+ // Drive a dedicated named session so we never collide with whatever `browse` session
46
+ // the user already has open (the default session is bound to one mode — opening it
47
+ // --remote while a --local session is live errors out). Stopped at the end of the run.
48
+ const SESSION = 'competitor-analysis-shots';
49
+ const browseFlags = [modeFlag, '-s', SESSION];
50
+ const concurrencyIdx = args.indexOf('--concurrency');
51
+ let concurrency = concurrencyIdx !== -1 ? parseInt(args[concurrencyIdx + 1], 10) : 1;
52
+ // Floor at 1: `--concurrency 0` would spawn zero workers (no screenshots captured, yet the
53
+ // script exits "successfully"), and a non-numeric value (NaN) would throw on Array(NaN).
54
+ // Normalize before the >1 clamp below.
55
+ if (!Number.isFinite(concurrency) || concurrency < 1) concurrency = 1;
56
+ const skipExisting = args.includes('--skip-existing');
57
+
58
+ // All captures share one named `browse` session; parallel `browse open/screenshot` calls would
59
+ // race on the same tab. Clamp concurrency to 1 and warn rather than silently corrupt output.
60
+ // (Each capture is fast — ~3-4s — so serial is acceptable.)
61
+ if (concurrency > 1) {
62
+ console.error(`Note: clamping --concurrency ${concurrency} to 1 — \`browse\` shares a single session across calls, so parallel screenshots would race on the same tab.`);
63
+ concurrency = 1;
64
+ }
65
+
66
+ const shotsDir = join(dir, 'screenshots');
67
+ mkdirSync(shotsDir, { recursive: true });
68
+
69
+ function run(cmd, args, { timeout = 30000 } = {}) {
70
+ return spawnSync(cmd, args, { encoding: 'utf-8', timeout, maxBuffer: 4 * 1024 * 1024 });
71
+ }
72
+
73
+ async function captureOne(slug, website) {
74
+ const heroPath = join(shotsDir, `${slug}-hero.png`);
75
+ const result = { slug, hero: null, errors: [] };
76
+
77
+ if (skipExisting && existsSync(heroPath)) {
78
+ return { ...result, hero: heroPath, skipped: true };
79
+ }
80
+
81
+ // Hero: viewport 1280x800, single-screen shot. The mode + session flags are passed on
82
+ // each command so every call resolves to the same dedicated browser session.
83
+ try {
84
+ const openRes = run('browse', ['open', website, ...browseFlags], { timeout: 30000 });
85
+ // `browse open` exits 0 even when navigation fails — it just lands the tab on
86
+ // `chrome-error://chromewebdata/`. Detect failure from the resulting URL, not the exit
87
+ // code, so we never screenshot a Chrome error page (and, since the session is reused
88
+ // across competitors, never save one competitor's page under another's slug).
89
+ let landedUrl = '';
90
+ try { landedUrl = (JSON.parse(openRes.stdout || '{}').url) || ''; } catch { /* non-JSON stdout */ }
91
+ if (openRes.status !== 0 || !landedUrl || /^chrome-error:\/\//.test(landedUrl) || landedUrl === 'about:blank') {
92
+ result.errors.push(`open failed (landed: ${landedUrl || 'unknown'}): ${openRes.stderr || openRes.stdout || `exit ${openRes.status}`}`.slice(0, 200));
93
+ return result;
94
+ }
95
+ run('browse', ['viewport', '1280', '800', ...browseFlags]);
96
+ run('browse', ['wait', 'timeout', '1500', ...browseFlags]); // let the hero settle
97
+ const r = run('browse', ['screenshot', '--path', heroPath, '--animations', 'disabled', ...browseFlags]);
98
+ if (r.status === 0 && existsSync(heroPath)) result.hero = heroPath;
99
+ else result.errors.push(`hero: ${r.stderr || r.stdout}`);
100
+ } catch (err) { result.errors.push(`hero exception: ${err.message}`); }
101
+
102
+ return result;
103
+ }
104
+
105
+ // Load competitor records
106
+ const files = readdirSync(dir).filter(f => f.endsWith('.md')).sort();
107
+ const jobs = [];
108
+ for (const f of files) {
109
+ const content = readFileSync(join(dir, f), 'utf-8');
110
+ const fm = parseFrontmatter(content);
111
+ if (!fm || !fm.website) continue;
112
+ const slug = f.replace('.md', '');
113
+ jobs.push({ slug, website: fm.website });
114
+ }
115
+
116
+ console.error(`Capturing hero screenshots for ${jobs.length} competitors → ${shotsDir}`);
117
+
118
+ const results = [];
119
+ const queue = [...jobs];
120
+ async function worker() {
121
+ while (queue.length > 0) {
122
+ const job = queue.shift();
123
+ const started = Date.now();
124
+ const r = await captureOne(job.slug, job.website);
125
+ results.push(r);
126
+ const elapsed = ((Date.now() - started) / 1000).toFixed(1);
127
+ const mark = r.hero ? 'H' : '-';
128
+ console.error(` [${mark}] ${job.slug.padEnd(24)} ${elapsed}s ${r.skipped ? '(skipped)' : ''}`);
129
+ if (r.errors.length) for (const e of r.errors) console.error(` ! ${e.slice(0, 120)}`);
130
+ }
131
+ }
132
+ await Promise.all(Array(Math.min(concurrency, jobs.length || 1)).fill(0).map(worker));
133
+
134
+ // Tear down the dedicated session so we don't leak a running browser (or remote
135
+ // Browserbase session) after the run. `browse stop` takes only `-s <session>` — it does NOT
136
+ // accept --remote/--local (passing them errors out), and `stop -s <session>` reliably stops
137
+ // a remote Browserbase session (verified against browse v0.8.5). Best-effort — ignore failures.
138
+ run('browse', ['stop', '-s', SESSION]);
139
+
140
+ const okHero = results.filter(r => r.hero).length;
141
+ console.error(`\nDone: ${okHero}/${jobs.length} hero`);
142
+ console.log(JSON.stringify({ total: jobs.length, hero: okHero, outputDir: shotsDir }));