arkaos 4.26.0 → 4.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (394) hide show
  1. package/README.md +7 -5
  2. package/THE-ARKAOS-GUIDE.md +7 -7
  3. package/VERSION +1 -1
  4. package/arka/SKILL.md +1 -1
  5. package/arka/skills/human-writing/SKILL.md +68 -0
  6. package/arka/skills/human-writing/references/checklist.md +66 -0
  7. package/arka/skills/human-writing/references/content-refresh.md +38 -0
  8. package/arka/skills/human-writing/references/plain-english-alternatives.md +394 -0
  9. package/config/claude-agents/lifecycle-marketer.md +50 -0
  10. package/config/claude-agents/pr-partnerships.md +50 -0
  11. package/config/claude-agents/product-marketer.md +50 -0
  12. package/config/evals/community.yaml +137 -0
  13. package/config/evals/content.yaml +298 -0
  14. package/config/evals/landing.yaml +927 -0
  15. package/config/evals/marketing.yaml +3762 -0
  16. package/config/evals/saas.yaml +616 -0
  17. package/config/evals/sales.yaml +437 -0
  18. package/config/skills-curated.yaml +2 -2
  19. package/config/skills-provenance.yaml +194 -21
  20. package/core/registry/generator.py +7 -0
  21. package/departments/community/SKILL.md +1 -0
  22. package/departments/community/skills/community-marketing/SKILL.md +200 -0
  23. package/departments/content/SKILL.md +1 -0
  24. package/departments/content/skills/image-create/SKILL.md +375 -0
  25. package/departments/content/skills/image-create/references/ai-image-prompting.md +229 -0
  26. package/departments/content/skills/video-produce/SKILL.md +220 -0
  27. package/departments/content/skills/video-produce/references/ai-video-prompting.md +175 -0
  28. package/departments/content/skills/video-produce/references/edit-anatomy.md +84 -0
  29. package/departments/landing/SKILL.md +3 -0
  30. package/departments/landing/skills/affiliate-bridge/SKILL.md +291 -5
  31. package/departments/landing/skills/affiliate-bridge/references/affiliate-programs.md +167 -0
  32. package/departments/landing/skills/affiliate-bridge/references/program-examples.md +143 -0
  33. package/departments/landing/skills/copy-framework/SKILL.md +241 -0
  34. package/departments/landing/skills/copy-framework/references/copy-frameworks.md +344 -0
  35. package/departments/landing/skills/copy-framework/references/natural-transitions.md +272 -0
  36. package/departments/landing/skills/lead-magnet/SKILL.md +337 -0
  37. package/departments/landing/skills/lead-magnet/references/benchmarks.md +129 -0
  38. package/departments/landing/skills/lead-magnet/references/format-guide.md +196 -0
  39. package/departments/landing/skills/offer-create/SKILL.md +105 -8
  40. package/departments/landing/skills/offer-create/references/bonus-stacking.md +150 -0
  41. package/departments/landing/skills/offer-create/references/examples.md +215 -0
  42. package/departments/landing/skills/offer-create/references/guarantee-design.md +172 -0
  43. package/departments/landing/skills/offer-create/references/offer-anatomy.md +203 -0
  44. package/departments/landing/skills/offer-create/references/offer-formats.md +240 -0
  45. package/departments/landing/skills/offer-create/references/scarcity-urgency.md +175 -0
  46. package/departments/landing/skills/offer-create/references/value-equation.md +134 -0
  47. package/departments/landing/skills/optimize-page/SKILL.md +185 -4
  48. package/departments/landing/skills/optimize-page/references/experiments.md +248 -0
  49. package/departments/landing/skills/optimize-page/references/form.md +422 -0
  50. package/departments/landing/skills/page-architect/SKILL.md +373 -5
  51. package/departments/landing/skills/page-architect/references/mermaid-templates.md +216 -0
  52. package/departments/landing/skills/page-architect/references/navigation-patterns.md +305 -0
  53. package/departments/landing/skills/page-architect/references/site-type-templates.md +293 -0
  54. package/departments/landing/skills/popup-design/SKILL.md +481 -0
  55. package/departments/landing/skills/signup-optimize/SKILL.md +385 -0
  56. package/departments/marketing/SKILL.md +22 -1
  57. package/departments/marketing/agents/growth-marketing/lifecycle-marketer.yaml +74 -0
  58. package/departments/marketing/agents/growth-marketing/pr-partnerships.yaml +74 -0
  59. package/departments/marketing/agents/growth-marketing/product-marketer.yaml +78 -0
  60. package/departments/marketing/agents/marketing-director.yaml +1 -0
  61. package/departments/marketing/skills/ab-test/SKILL.md +322 -3
  62. package/departments/marketing/skills/ab-test/references/sample-size-guide.md +263 -0
  63. package/departments/marketing/skills/ab-test/references/test-templates.md +277 -0
  64. package/departments/marketing/skills/ad-creative/SKILL.md +451 -0
  65. package/departments/marketing/skills/ad-creative/references/creative-review-page.md +106 -0
  66. package/departments/marketing/skills/ad-creative/references/creative-roadmap.md +118 -0
  67. package/departments/marketing/skills/ad-creative/references/generative-tools.md +637 -0
  68. package/departments/marketing/skills/ad-creative/references/hook-system.md +115 -0
  69. package/departments/marketing/skills/ad-creative/references/imessage-video-ads.md +201 -0
  70. package/departments/marketing/skills/ad-creative/references/motion-video-ads.md +126 -0
  71. package/departments/marketing/skills/ad-creative/references/platform-specs.md +213 -0
  72. package/departments/marketing/skills/ad-creative/references/static-ad-templates.md +200 -0
  73. package/departments/marketing/skills/ai-seo/SKILL.md +520 -0
  74. package/departments/marketing/skills/ai-seo/references/citations-vs-recommendations.md +85 -0
  75. package/departments/marketing/skills/ai-seo/references/content-patterns.md +287 -0
  76. package/departments/marketing/skills/ai-seo/references/content-types.md +71 -0
  77. package/departments/marketing/skills/ai-seo/references/okf.md +104 -0
  78. package/departments/marketing/skills/ai-seo/references/platform-ranking-factors.md +154 -0
  79. package/departments/marketing/skills/analytics-report/SKILL.md +310 -1
  80. package/departments/marketing/skills/analytics-report/references/event-library.md +260 -0
  81. package/departments/marketing/skills/analytics-report/references/ga4-implementation.md +300 -0
  82. package/departments/marketing/skills/analytics-report/references/gtm-implementation.md +390 -0
  83. package/departments/marketing/skills/aso/SKILL.md +336 -0
  84. package/departments/marketing/skills/aso/references/apple-specs.md +107 -0
  85. package/departments/marketing/skills/aso/references/benchmarks.md +129 -0
  86. package/departments/marketing/skills/aso/references/google-play-specs.md +131 -0
  87. package/departments/marketing/skills/aso/references/report-template.md +213 -0
  88. package/departments/marketing/skills/aso/references/scoring-criteria.md +213 -0
  89. package/departments/marketing/skills/co-marketing/SKILL.md +316 -0
  90. package/departments/marketing/skills/cold-email/SKILL.md +80 -0
  91. package/departments/marketing/skills/cold-email/references/benchmarks.md +83 -0
  92. package/departments/marketing/skills/cold-email/references/follow-up-sequences.md +81 -0
  93. package/departments/marketing/skills/cold-email/references/frameworks.md +90 -0
  94. package/departments/marketing/skills/cold-email/references/personalization.md +79 -0
  95. package/departments/marketing/skills/cold-email/references/subject-lines.md +53 -0
  96. package/departments/marketing/skills/competitor-analysis/SKILL.md +262 -5
  97. package/departments/marketing/skills/competitor-analysis/references/content-architecture.md +271 -0
  98. package/departments/marketing/skills/competitor-analysis/references/templates.md +223 -0
  99. package/departments/marketing/skills/competitor-profile/SKILL.md +447 -0
  100. package/departments/marketing/skills/competitor-profile/references/templates.md +167 -0
  101. package/departments/marketing/skills/competitor-profile/references/tool-reference.md +179 -0
  102. package/departments/marketing/skills/content-strategy/SKILL.md +398 -0
  103. package/departments/marketing/skills/content-strategy/references/headless-cms.md +194 -0
  104. package/departments/marketing/skills/council/SKILL.md +185 -0
  105. package/departments/marketing/skills/council/references/advisor-template.md +51 -0
  106. package/departments/marketing/skills/council/references/advisors/alex-hormozi.md +43 -0
  107. package/departments/marketing/skills/council/references/advisors/ann-handley.md +43 -0
  108. package/departments/marketing/skills/council/references/advisors/april-dunford.md +41 -0
  109. package/departments/marketing/skills/council/references/advisors/byron-sharp.md +43 -0
  110. package/departments/marketing/skills/council/references/advisors/claude-hopkins.md +42 -0
  111. package/departments/marketing/skills/council/references/advisors/david-ogilvy.md +42 -0
  112. package/departments/marketing/skills/council/references/advisors/eugene-schwartz.md +42 -0
  113. package/departments/marketing/skills/council/references/advisors/gary-halbert.md +43 -0
  114. package/departments/marketing/skills/council/references/advisors/gary-vaynerchuk.md +43 -0
  115. package/departments/marketing/skills/council/references/advisors/rory-sutherland.md +42 -0
  116. package/departments/marketing/skills/council/references/advisors/russell-brunson.md +43 -0
  117. package/departments/marketing/skills/council/references/advisors/seth-godin.md +43 -0
  118. package/departments/marketing/skills/customer-research/SKILL.md +318 -0
  119. package/departments/marketing/skills/customer-research/references/source-guides.md +401 -0
  120. package/departments/marketing/skills/directory-submit/SKILL.md +409 -0
  121. package/departments/marketing/skills/directory-submit/references/directory-list.md +477 -0
  122. package/departments/marketing/skills/directory-submit/references/positioning-variations.md +232 -0
  123. package/departments/marketing/skills/directory-submit/references/submission-tracker-template.csv +266 -0
  124. package/departments/marketing/skills/email-sequence/SKILL.md +309 -2
  125. package/departments/marketing/skills/email-sequence/references/copy-guidelines.md +113 -0
  126. package/departments/marketing/skills/email-sequence/references/email-types.md +515 -0
  127. package/departments/marketing/skills/email-sequence/references/sequence-templates.md +168 -0
  128. package/departments/marketing/skills/free-tools/SKILL.md +203 -0
  129. package/departments/marketing/skills/free-tools/references/tool-types.md +217 -0
  130. package/departments/marketing/skills/marketing-ideas/SKILL.md +191 -0
  131. package/departments/marketing/skills/marketing-ideas/references/ideas-by-category.md +366 -0
  132. package/departments/marketing/skills/marketing-loops/SKILL.md +136 -0
  133. package/departments/marketing/skills/marketing-loops/references/loop-catalog.md +687 -0
  134. package/departments/marketing/skills/marketing-loops/references/loop-guardrails.md +73 -0
  135. package/departments/marketing/skills/marketing-loops/references/loop-orchestration.md +69 -0
  136. package/departments/marketing/skills/marketing-loops/references/loop-state.md +67 -0
  137. package/departments/marketing/skills/marketing-loops/references/loop-template.md +79 -0
  138. package/departments/marketing/skills/marketing-plan/SKILL.md +302 -0
  139. package/departments/marketing/skills/marketing-plan/references/aarrr-framework.md +180 -0
  140. package/departments/marketing/skills/marketing-plan/references/budget-planning.md +168 -0
  141. package/departments/marketing/skills/marketing-plan/references/client-types.md +373 -0
  142. package/departments/marketing/skills/marketing-plan/references/current-state-rubric.md +255 -0
  143. package/departments/marketing/skills/marketing-plan/references/example-quietude.md +972 -0
  144. package/departments/marketing/skills/marketing-plan/references/funding-stage-unlocks.md +230 -0
  145. package/departments/marketing/skills/marketing-plan/references/growth-patterns.md +148 -0
  146. package/departments/marketing/skills/marketing-plan/references/idea-cross-reference.md +265 -0
  147. package/departments/marketing/skills/marketing-plan/references/measurement-framework.md +213 -0
  148. package/departments/marketing/skills/marketing-plan/references/methodology.md +363 -0
  149. package/departments/marketing/skills/marketing-plan/references/ops-stack-mapping.md +197 -0
  150. package/departments/marketing/skills/marketing-plan/references/plan-template.md +494 -0
  151. package/departments/marketing/skills/marketing-plan/references/team-and-agency-model.md +278 -0
  152. package/departments/marketing/skills/marketing-psychology/SKILL.md +479 -0
  153. package/departments/marketing/skills/paid-campaign/SKILL.md +452 -3
  154. package/departments/marketing/skills/paid-campaign/references/abm-playbook.md +93 -0
  155. package/departments/marketing/skills/paid-campaign/references/ad-copy-templates.md +207 -0
  156. package/departments/marketing/skills/paid-campaign/references/audience-targeting.md +243 -0
  157. package/departments/marketing/skills/paid-campaign/references/b2b-paid-playbook.md +115 -0
  158. package/departments/marketing/skills/paid-campaign/references/conversion-tracking.md +361 -0
  159. package/departments/marketing/skills/paid-campaign/references/google-search-playbook.md +120 -0
  160. package/departments/marketing/skills/paid-campaign/references/linkedin-b2b-playbook.md +107 -0
  161. package/departments/marketing/skills/paid-campaign/references/meta-decision-system.md +143 -0
  162. package/departments/marketing/skills/paid-campaign/references/platform-setup-checklists.md +277 -0
  163. package/departments/marketing/skills/paid-campaign/references/rsa-output-spec.md +88 -0
  164. package/departments/marketing/skills/product-marketing/SKILL.md +141 -0
  165. package/departments/marketing/skills/programmatic-seo/SKILL.md +74 -3
  166. package/departments/marketing/skills/programmatic-seo/references/playbooks.md +308 -0
  167. package/departments/marketing/skills/public-relations/SKILL.md +167 -0
  168. package/departments/marketing/skills/public-relations/references/journalist-pitching.md +368 -0
  169. package/departments/marketing/skills/public-relations/references/media-outlets.md +207 -0
  170. package/departments/marketing/skills/public-relations/references/newsjacking.md +218 -0
  171. package/departments/marketing/skills/public-relations/references/press-platforms.md +188 -0
  172. package/departments/marketing/skills/schema-markup/SKILL.md +203 -0
  173. package/departments/marketing/skills/schema-markup/references/schema-examples.md +398 -0
  174. package/departments/marketing/skills/seo-audit/SKILL.md +470 -1
  175. package/departments/marketing/skills/seo-audit/references/ai-writing-detection.md +200 -0
  176. package/departments/marketing/skills/seo-audit/references/international-seo.md +230 -0
  177. package/departments/marketing/skills/sms-campaign/SKILL.md +363 -0
  178. package/departments/marketing/skills/sms-campaign/references/compliance.md +202 -0
  179. package/departments/marketing/skills/sms-campaign/references/platforms.md +318 -0
  180. package/departments/marketing/skills/sms-campaign/references/sequence-templates.md +282 -0
  181. package/departments/marketing/skills/social-strategy/SKILL.md +414 -3
  182. package/departments/marketing/skills/social-strategy/references/carousel-frameworks.md +141 -0
  183. package/departments/marketing/skills/social-strategy/references/listening-sources-template.md +123 -0
  184. package/departments/marketing/skills/social-strategy/references/listening.md +283 -0
  185. package/departments/marketing/skills/social-strategy/references/platform-limits.md +110 -0
  186. package/departments/marketing/skills/social-strategy/references/platforms.md +170 -0
  187. package/departments/marketing/skills/social-strategy/references/post-templates.md +179 -0
  188. package/departments/marketing/skills/social-strategy/references/reverse-engineering.md +195 -0
  189. package/departments/marketing/skills/social-strategy/references/short-form-video.md +237 -0
  190. package/departments/marketing/squad.yaml +10 -1
  191. package/departments/marketing/tools/LICENSE +21 -0
  192. package/departments/marketing/tools/REGISTRY.md +590 -0
  193. package/departments/marketing/tools/clis/README.md +198 -0
  194. package/departments/marketing/tools/clis/activecampaign.js +435 -0
  195. package/departments/marketing/tools/clis/adobe-analytics.js +161 -0
  196. package/departments/marketing/tools/clis/ahrefs.js +192 -0
  197. package/departments/marketing/tools/clis/airops.js +163 -0
  198. package/departments/marketing/tools/clis/amplitude.js +182 -0
  199. package/departments/marketing/tools/clis/apollo.js +142 -0
  200. package/departments/marketing/tools/clis/beehiiv.js +245 -0
  201. package/departments/marketing/tools/clis/brevo.js +368 -0
  202. package/departments/marketing/tools/clis/buffer.js +260 -0
  203. package/departments/marketing/tools/clis/calendly.js +253 -0
  204. package/departments/marketing/tools/clis/clay.js +159 -0
  205. package/departments/marketing/tools/clis/clearbit.js +163 -0
  206. package/departments/marketing/tools/clis/close.js +232 -0
  207. package/departments/marketing/tools/clis/coupler.js +173 -0
  208. package/departments/marketing/tools/clis/crossbeam.js +193 -0
  209. package/departments/marketing/tools/clis/customer-io.js +205 -0
  210. package/departments/marketing/tools/clis/dataforseo.js +257 -0
  211. package/departments/marketing/tools/clis/demio.js +149 -0
  212. package/departments/marketing/tools/clis/dub.js +158 -0
  213. package/departments/marketing/tools/clis/exa.js +147 -0
  214. package/departments/marketing/tools/clis/g2.js +186 -0
  215. package/departments/marketing/tools/clis/ga4.js +194 -0
  216. package/departments/marketing/tools/clis/github-prospects.js +257 -0
  217. package/departments/marketing/tools/clis/google-ads.js +189 -0
  218. package/departments/marketing/tools/clis/google-search-console.js +166 -0
  219. package/departments/marketing/tools/clis/hotjar.js +167 -0
  220. package/departments/marketing/tools/clis/hunter.js +249 -0
  221. package/departments/marketing/tools/clis/instantly.js +270 -0
  222. package/departments/marketing/tools/clis/intercom.js +399 -0
  223. package/departments/marketing/tools/clis/keywords-everywhere.js +185 -0
  224. package/departments/marketing/tools/clis/kit.js +232 -0
  225. package/departments/marketing/tools/clis/klaviyo.js +348 -0
  226. package/departments/marketing/tools/clis/lemlist.js +221 -0
  227. package/departments/marketing/tools/clis/linkedin-ads.js +185 -0
  228. package/departments/marketing/tools/clis/livestorm.js +292 -0
  229. package/departments/marketing/tools/clis/mailchimp.js +220 -0
  230. package/departments/marketing/tools/clis/mention-me.js +161 -0
  231. package/departments/marketing/tools/clis/meta-ads.js +181 -0
  232. package/departments/marketing/tools/clis/mixpanel.js +248 -0
  233. package/departments/marketing/tools/clis/onesignal.js +241 -0
  234. package/departments/marketing/tools/clis/optimizely.js +233 -0
  235. package/departments/marketing/tools/clis/outreach.js +213 -0
  236. package/departments/marketing/tools/clis/paddle.js +385 -0
  237. package/departments/marketing/tools/clis/partnerstack.js +382 -0
  238. package/departments/marketing/tools/clis/pendo.js +221 -0
  239. package/departments/marketing/tools/clis/plausible.js +249 -0
  240. package/departments/marketing/tools/clis/postmark.js +375 -0
  241. package/departments/marketing/tools/clis/rankparse.js +196 -0
  242. package/departments/marketing/tools/clis/resend.js +370 -0
  243. package/departments/marketing/tools/clis/rewardful.js +160 -0
  244. package/departments/marketing/tools/clis/savvycal.js +223 -0
  245. package/departments/marketing/tools/clis/segment.js +192 -0
  246. package/departments/marketing/tools/clis/semrush.js +207 -0
  247. package/departments/marketing/tools/clis/sendgrid.js +211 -0
  248. package/departments/marketing/tools/clis/similarweb.js +214 -0
  249. package/departments/marketing/tools/clis/snov.js +237 -0
  250. package/departments/marketing/tools/clis/supermetrics.js +169 -0
  251. package/departments/marketing/tools/clis/tiktok-ads.js +190 -0
  252. package/departments/marketing/tools/clis/tolt.js +153 -0
  253. package/departments/marketing/tools/clis/trustpilot.js +276 -0
  254. package/departments/marketing/tools/clis/typeform.js +269 -0
  255. package/departments/marketing/tools/clis/wistia.js +301 -0
  256. package/departments/marketing/tools/clis/zapier.js +165 -0
  257. package/departments/marketing/tools/clis/zoominfo.js +223 -0
  258. package/departments/marketing/tools/composio/README.md +105 -0
  259. package/departments/marketing/tools/composio/marketing-tools.md +91 -0
  260. package/departments/marketing/tools/integrations/activecampaign.md +337 -0
  261. package/departments/marketing/tools/integrations/adobe-analytics.md +156 -0
  262. package/departments/marketing/tools/integrations/ahrefs.md +142 -0
  263. package/departments/marketing/tools/integrations/airops.md +128 -0
  264. package/departments/marketing/tools/integrations/amplitude.md +135 -0
  265. package/departments/marketing/tools/integrations/apollo.md +148 -0
  266. package/departments/marketing/tools/integrations/attentive.md +152 -0
  267. package/departments/marketing/tools/integrations/audiencetap.md +125 -0
  268. package/departments/marketing/tools/integrations/beehiiv.md +157 -0
  269. package/departments/marketing/tools/integrations/brevo.md +268 -0
  270. package/departments/marketing/tools/integrations/browserbase.md +111 -0
  271. package/departments/marketing/tools/integrations/buffer.md +138 -0
  272. package/departments/marketing/tools/integrations/calendly.md +161 -0
  273. package/departments/marketing/tools/integrations/clay.md +149 -0
  274. package/departments/marketing/tools/integrations/clearbit.md +142 -0
  275. package/departments/marketing/tools/integrations/close.md +191 -0
  276. package/departments/marketing/tools/integrations/cogny.md +153 -0
  277. package/departments/marketing/tools/integrations/composio.md +190 -0
  278. package/departments/marketing/tools/integrations/contentful.md +160 -0
  279. package/departments/marketing/tools/integrations/coupler.md +142 -0
  280. package/departments/marketing/tools/integrations/crossbeam.md +137 -0
  281. package/departments/marketing/tools/integrations/customer-io.md +187 -0
  282. package/departments/marketing/tools/integrations/dataforseo.md +165 -0
  283. package/departments/marketing/tools/integrations/demio.md +182 -0
  284. package/departments/marketing/tools/integrations/dub-co.md +160 -0
  285. package/departments/marketing/tools/integrations/exa.md +145 -0
  286. package/departments/marketing/tools/integrations/firecrawl.md +144 -0
  287. package/departments/marketing/tools/integrations/firehose.md +159 -0
  288. package/departments/marketing/tools/integrations/g2.md +179 -0
  289. package/departments/marketing/tools/integrations/ga4.md +126 -0
  290. package/departments/marketing/tools/integrations/github.md +182 -0
  291. package/departments/marketing/tools/integrations/gong.md +144 -0
  292. package/departments/marketing/tools/integrations/google-ads.md +159 -0
  293. package/departments/marketing/tools/integrations/google-search-console.md +147 -0
  294. package/departments/marketing/tools/integrations/heygen.md +126 -0
  295. package/departments/marketing/tools/integrations/hotjar.md +147 -0
  296. package/departments/marketing/tools/integrations/hubspot.md +178 -0
  297. package/departments/marketing/tools/integrations/hunter.md +90 -0
  298. package/departments/marketing/tools/integrations/hyperframes.md +180 -0
  299. package/departments/marketing/tools/integrations/instantly.md +104 -0
  300. package/departments/marketing/tools/integrations/intercom.md +292 -0
  301. package/departments/marketing/tools/integrations/introw.md +182 -0
  302. package/departments/marketing/tools/integrations/keywords-everywhere.md +207 -0
  303. package/departments/marketing/tools/integrations/kit.md +167 -0
  304. package/departments/marketing/tools/integrations/klaviyo.md +228 -0
  305. package/departments/marketing/tools/integrations/lemlist.md +110 -0
  306. package/departments/marketing/tools/integrations/linkedin-ads.md +164 -0
  307. package/departments/marketing/tools/integrations/livestorm.md +313 -0
  308. package/departments/marketing/tools/integrations/mailchimp.md +150 -0
  309. package/departments/marketing/tools/integrations/mention-me.md +160 -0
  310. package/departments/marketing/tools/integrations/meta-ads.md +147 -0
  311. package/departments/marketing/tools/integrations/mixpanel.md +137 -0
  312. package/departments/marketing/tools/integrations/nitrosend.md +113 -0
  313. package/departments/marketing/tools/integrations/onesignal.md +229 -0
  314. package/departments/marketing/tools/integrations/optimizely.md +171 -0
  315. package/departments/marketing/tools/integrations/outreach.md +172 -0
  316. package/departments/marketing/tools/integrations/paddle.md +212 -0
  317. package/departments/marketing/tools/integrations/partnerstack.md +222 -0
  318. package/departments/marketing/tools/integrations/pendo.md +208 -0
  319. package/departments/marketing/tools/integrations/plausible.md +177 -0
  320. package/departments/marketing/tools/integrations/plivo.md +140 -0
  321. package/departments/marketing/tools/integrations/posthog.md +151 -0
  322. package/departments/marketing/tools/integrations/postmark.md +234 -0
  323. package/departments/marketing/tools/integrations/postscript.md +126 -0
  324. package/departments/marketing/tools/integrations/rankparse.md +257 -0
  325. package/departments/marketing/tools/integrations/rb2b.md +110 -0
  326. package/departments/marketing/tools/integrations/resend.md +212 -0
  327. package/departments/marketing/tools/integrations/rewardful.md +147 -0
  328. package/departments/marketing/tools/integrations/salesforce.md +150 -0
  329. package/departments/marketing/tools/integrations/sanity.md +148 -0
  330. package/departments/marketing/tools/integrations/savvycal.md +181 -0
  331. package/departments/marketing/tools/integrations/segment.md +159 -0
  332. package/departments/marketing/tools/integrations/semrush.md +121 -0
  333. package/departments/marketing/tools/integrations/sendgrid.md +161 -0
  334. package/departments/marketing/tools/integrations/sequenzy.md +306 -0
  335. package/departments/marketing/tools/integrations/shopify.md +176 -0
  336. package/departments/marketing/tools/integrations/similarweb.md +150 -0
  337. package/departments/marketing/tools/integrations/snov.md +94 -0
  338. package/departments/marketing/tools/integrations/sparktoro.md +127 -0
  339. package/departments/marketing/tools/integrations/strapi.md +167 -0
  340. package/departments/marketing/tools/integrations/stripe.md +148 -0
  341. package/departments/marketing/tools/integrations/supermetrics.md +145 -0
  342. package/departments/marketing/tools/integrations/tiktok-ads.md +161 -0
  343. package/departments/marketing/tools/integrations/tolt.md +144 -0
  344. package/departments/marketing/tools/integrations/truelist.md +184 -0
  345. package/departments/marketing/tools/integrations/trustpilot.md +191 -0
  346. package/departments/marketing/tools/integrations/twilio.md +152 -0
  347. package/departments/marketing/tools/integrations/typeform.md +190 -0
  348. package/departments/marketing/tools/integrations/webflow.md +198 -0
  349. package/departments/marketing/tools/integrations/wistia.md +164 -0
  350. package/departments/marketing/tools/integrations/wordpress.md +175 -0
  351. package/departments/marketing/tools/integrations/zapier.md +244 -0
  352. package/departments/marketing/tools/integrations/zoominfo.md +191 -0
  353. package/departments/saas/SKILL.md +1 -0
  354. package/departments/saas/skills/churn-analysis/SKILL.md +421 -4
  355. package/departments/saas/skills/churn-analysis/references/cancel-flow-patterns.md +316 -0
  356. package/departments/saas/skills/churn-analysis/references/dunning-playbook.md +408 -0
  357. package/departments/saas/skills/launch-execute/SKILL.md +346 -4
  358. package/departments/saas/skills/onboarding-optimize/SKILL.md +218 -4
  359. package/departments/saas/skills/onboarding-optimize/references/experiments.md +258 -0
  360. package/departments/saas/skills/paywall-design/SKILL.md +256 -0
  361. package/departments/saas/skills/paywall-design/references/experiments.md +164 -0
  362. package/departments/saas/skills/pricing-strategy/SKILL.md +224 -0
  363. package/departments/saas/skills/pricing-strategy/references/research-methods.md +152 -0
  364. package/departments/saas/skills/pricing-strategy/references/tier-structure.md +232 -0
  365. package/departments/sales/SKILL.md +3 -0
  366. package/departments/sales/skills/prospecting/SKILL.md +297 -0
  367. package/departments/sales/skills/prospecting/references/b2b-prospecting.md +106 -0
  368. package/departments/sales/skills/prospecting/references/compliance.md +123 -0
  369. package/departments/sales/skills/prospecting/references/data-sources.md +287 -0
  370. package/departments/sales/skills/prospecting/references/demand-signals.md +129 -0
  371. package/departments/sales/skills/prospecting/references/local-prospecting.md +165 -0
  372. package/departments/sales/skills/prospecting/references/saas-prospecting.md +123 -0
  373. package/departments/sales/skills/revops/SKILL.md +379 -0
  374. package/departments/sales/skills/revops/references/automation-playbooks.md +290 -0
  375. package/departments/sales/skills/revops/references/lifecycle-definitions.md +278 -0
  376. package/departments/sales/skills/revops/references/routing-rules.md +203 -0
  377. package/departments/sales/skills/revops/references/scoring-models.md +247 -0
  378. package/departments/sales/skills/sales-enablement/SKILL.md +396 -0
  379. package/departments/sales/skills/sales-enablement/references/deck-frameworks.md +263 -0
  380. package/departments/sales/skills/sales-enablement/references/demo-scripts.md +355 -0
  381. package/departments/sales/skills/sales-enablement/references/objection-library.md +270 -0
  382. package/departments/sales/skills/sales-enablement/references/one-pager-templates.md +208 -0
  383. package/harness/codex/AGENTS.md +8 -8
  384. package/harness/copilot/copilot-instructions.md +8 -8
  385. package/harness/cursor/rules/arkaos.mdc +9 -9
  386. package/harness/gemini/GEMINI.md +8 -8
  387. package/harness/opencode/AGENTS.md +8 -8
  388. package/harness/zed/.rules +8 -8
  389. package/knowledge/agents-registry-v2.json +161 -8
  390. package/knowledge/commands-registry.json +693 -99
  391. package/knowledge/skills-manifest.json +459 -20
  392. package/package.json +1 -1
  393. package/pyproject.toml +1 -1
  394. package/scripts/tools/evals_import.py +183 -0
@@ -0,0 +1,158 @@
1
+ #!/usr/bin/env node
2
+
3
+ const API_KEY = process.env.DUB_API_KEY
4
+ const BASE_URL = 'https://api.dub.co'
5
+
6
+ if (!API_KEY) {
7
+ console.error(JSON.stringify({ error: 'DUB_API_KEY environment variable required' }))
8
+ process.exit(1)
9
+ }
10
+
11
+ async function api(method, path, body) {
12
+ if (args['dry-run']) {
13
+ return { _dry_run: true, method, url: `${BASE_URL}${path}`, headers: { Authorization: '***', 'Content-Type': 'application/json' }, body: body || undefined }
14
+ }
15
+ const res = await fetch(`${BASE_URL}${path}`, {
16
+ method,
17
+ headers: {
18
+ 'Authorization': `Bearer ${API_KEY}`,
19
+ 'Content-Type': 'application/json',
20
+ },
21
+ body: body ? JSON.stringify(body) : undefined,
22
+ })
23
+ const text = await res.text()
24
+ try {
25
+ return JSON.parse(text)
26
+ } catch {
27
+ return { status: res.status, body: text }
28
+ }
29
+ }
30
+
31
+ function parseArgs(args) {
32
+ const result = { _: [] }
33
+ for (let i = 0; i < args.length; i++) {
34
+ const arg = args[i]
35
+ if (arg.startsWith('--')) {
36
+ const key = arg.slice(2)
37
+ const next = args[i + 1]
38
+ if (next && !next.startsWith('--')) {
39
+ result[key] = next
40
+ i++
41
+ } else {
42
+ result[key] = true
43
+ }
44
+ } else {
45
+ result._.push(arg)
46
+ }
47
+ }
48
+ return result
49
+ }
50
+
51
+ const args = parseArgs(process.argv.slice(2))
52
+ const [cmd, sub, ...rest] = args._
53
+
54
+ async function main() {
55
+ let result
56
+
57
+ switch (cmd) {
58
+ case 'links':
59
+ switch (sub) {
60
+ case 'create': {
61
+ if (!args.url) { result = { error: '--url required' }; break }
62
+ const body = {}
63
+ if (args.url) body.url = args.url
64
+ if (args.domain) body.domain = args.domain
65
+ if (args.key) body.key = args.key
66
+ if (args.tags) body.tags = args.tags.split(',')
67
+ result = await api('POST', '/links', body)
68
+ break
69
+ }
70
+ case 'list': {
71
+ const params = new URLSearchParams()
72
+ if (args.domain) params.set('domain', args.domain)
73
+ if (args.page) params.set('page', args.page)
74
+ result = await api('GET', `/links?${params}`)
75
+ break
76
+ }
77
+ case 'get': {
78
+ const params = new URLSearchParams()
79
+ if (args.domain) params.set('domain', args.domain)
80
+ if (args.key) params.set('key', args.key)
81
+ if (args['link-id']) params.set('linkId', args['link-id'])
82
+ if (args['external-id']) params.set('externalId', args['external-id'])
83
+ result = await api('GET', `/links/info?${params}`)
84
+ break
85
+ }
86
+ case 'update': {
87
+ if (!args.id) { result = { error: '--id required (link ID)' }; break }
88
+ const body = {}
89
+ if (args.url) body.url = args.url
90
+ if (args.tags) body.tags = args.tags.split(',')
91
+ result = await api('PATCH', `/links/${args.id}`, body)
92
+ break
93
+ }
94
+ case 'delete':
95
+ if (!args.id) { result = { error: '--id required (link ID)' }; break }
96
+ result = await api('DELETE', `/links/${args.id}`)
97
+ break
98
+ case 'bulk-create': {
99
+ let links
100
+ try {
101
+ links = JSON.parse(args.links || '[]')
102
+ } catch {
103
+ result = { error: 'Invalid JSON in --links' }; break
104
+ }
105
+ result = await api('POST', '/links/bulk', links)
106
+ break
107
+ }
108
+ default:
109
+ result = { error: 'Unknown links subcommand. Use: create, list, get, update, delete, bulk-create' }
110
+ }
111
+ break
112
+
113
+ case 'analytics':
114
+ switch (sub) {
115
+ case 'get': {
116
+ const params = new URLSearchParams()
117
+ if (args.domain) params.set('domain', args.domain)
118
+ if (args.key) params.set('key', args.key)
119
+ if (args.interval) params.set('interval', args.interval)
120
+ result = await api('GET', `/analytics?${params}`)
121
+ break
122
+ }
123
+ case 'country': {
124
+ const params = new URLSearchParams()
125
+ if (args.domain) params.set('domain', args.domain)
126
+ if (args.key) params.set('key', args.key)
127
+ result = await api('GET', `/analytics/country?${params}`)
128
+ break
129
+ }
130
+ case 'device': {
131
+ const params = new URLSearchParams()
132
+ if (args.domain) params.set('domain', args.domain)
133
+ if (args.key) params.set('key', args.key)
134
+ result = await api('GET', `/analytics/device?${params}`)
135
+ break
136
+ }
137
+ default:
138
+ result = { error: 'Unknown analytics subcommand. Use: get, country, device' }
139
+ }
140
+ break
141
+
142
+ default:
143
+ result = {
144
+ error: 'Unknown command',
145
+ usage: {
146
+ links: 'links [create|list|get|update|delete|bulk-create] [--url <url>] [--domain <domain>] [--key <key>] [--tags <tags>] [--id <id>] [--page <page>] [--links <json>]',
147
+ analytics: 'analytics [get|country|device] [--domain <domain>] [--key <key>] [--interval <interval>]',
148
+ }
149
+ }
150
+ }
151
+
152
+ console.log(JSON.stringify(result, null, 2))
153
+ }
154
+
155
+ main().catch(err => {
156
+ console.error(JSON.stringify({ error: err.message }))
157
+ process.exit(1)
158
+ })
@@ -0,0 +1,147 @@
1
+ #!/usr/bin/env node
2
+
3
+ const API_KEY = process.env.EXA_API_KEY
4
+ const BASE_URL = 'https://api.exa.ai'
5
+
6
+ if (!API_KEY) {
7
+ console.error(JSON.stringify({ error: 'EXA_API_KEY environment variable required' }))
8
+ process.exit(1)
9
+ }
10
+
11
+ async function api(method, path, body) {
12
+ if (args['dry-run']) {
13
+ return { _dry_run: true, method, url: `${BASE_URL}${path}`, headers: { 'x-api-key': '***', 'Content-Type': 'application/json', 'x-exa-integration': 'marketingskills' }, body: body || undefined }
14
+ }
15
+ const res = await fetch(`${BASE_URL}${path}`, {
16
+ method,
17
+ headers: {
18
+ 'x-api-key': API_KEY,
19
+ 'Content-Type': 'application/json',
20
+ 'x-exa-integration': 'marketingskills',
21
+ },
22
+ body: body ? JSON.stringify(body) : undefined,
23
+ })
24
+ const text = await res.text()
25
+ try {
26
+ return JSON.parse(text)
27
+ } catch {
28
+ return { status: res.status, body: text }
29
+ }
30
+ }
31
+
32
+ function parseArgs(args) {
33
+ const result = { _: [] }
34
+ for (let i = 0; i < args.length; i++) {
35
+ const arg = args[i]
36
+ if (arg.startsWith('--')) {
37
+ const key = arg.slice(2)
38
+ const next = args[i + 1]
39
+ if (next && !next.startsWith('--')) {
40
+ result[key] = next
41
+ i++
42
+ } else {
43
+ result[key] = true
44
+ }
45
+ } else {
46
+ result._.push(arg)
47
+ }
48
+ }
49
+ return result
50
+ }
51
+
52
+ function buildContents(args) {
53
+ const contents = {}
54
+ if (args.text) {
55
+ contents.text = args['max-chars']
56
+ ? { maxCharacters: Number(args['max-chars']) }
57
+ : true
58
+ }
59
+ if (args.highlights) {
60
+ contents.highlights = args['highlight-query']
61
+ ? { query: args['highlight-query'] }
62
+ : true
63
+ }
64
+ if (args.summary) {
65
+ contents.summary = args['summary-query']
66
+ ? { query: args['summary-query'] }
67
+ : {}
68
+ }
69
+ return Object.keys(contents).length ? contents : null
70
+ }
71
+
72
+ const args = parseArgs(process.argv.slice(2))
73
+ const [cmd, ...rest] = args._
74
+
75
+ async function main() {
76
+ let result
77
+
78
+ switch (cmd) {
79
+ case 'search': {
80
+ const query = args.query || rest.join(' ')
81
+ if (!query) { result = { error: '--query required' }; break }
82
+ const body = { query }
83
+ if (args.type) body.type = args.type
84
+ if (args.num) body.numResults = Number(args.num)
85
+ if (args.category) body.category = args.category
86
+ if (args['include-domains']) body.includeDomains = args['include-domains'].split(',').map(s => s.trim())
87
+ if (args['exclude-domains']) body.excludeDomains = args['exclude-domains'].split(',').map(s => s.trim())
88
+ if (args['include-text']) body.includeText = args['include-text'].split(',').map(s => s.trim())
89
+ if (args['exclude-text']) body.excludeText = args['exclude-text'].split(',').map(s => s.trim())
90
+ if (args['start-published']) body.startPublishedDate = args['start-published']
91
+ if (args['end-published']) body.endPublishedDate = args['end-published']
92
+ if (args['start-crawl']) body.startCrawlDate = args['start-crawl']
93
+ if (args['end-crawl']) body.endCrawlDate = args['end-crawl']
94
+ if (args['user-location']) body.userLocation = args['user-location']
95
+ const contents = buildContents(args)
96
+ if (contents) body.contents = contents
97
+ result = await api('POST', '/search', body)
98
+ break
99
+ }
100
+
101
+ case 'find-similar': {
102
+ const url = args.url
103
+ if (!url) { result = { error: '--url required' }; break }
104
+ const body = { url }
105
+ if (args.num) body.numResults = Number(args.num)
106
+ if (args['include-domains']) body.includeDomains = args['include-domains'].split(',').map(s => s.trim())
107
+ if (args['exclude-domains']) body.excludeDomains = args['exclude-domains'].split(',').map(s => s.trim())
108
+ if (args['start-published']) body.startPublishedDate = args['start-published']
109
+ if (args['end-published']) body.endPublishedDate = args['end-published']
110
+ if (args['start-crawl']) body.startCrawlDate = args['start-crawl']
111
+ if (args['end-crawl']) body.endCrawlDate = args['end-crawl']
112
+ const contents = buildContents(args)
113
+ if (contents) body.contents = contents
114
+ result = await api('POST', '/findSimilar', body)
115
+ break
116
+ }
117
+
118
+ case 'contents': {
119
+ const urls = args.urls?.split(',').map(s => s.trim())
120
+ if (!urls || !urls.length) { result = { error: '--urls required (comma-separated)' }; break }
121
+ const body = { urls }
122
+ const contents = buildContents(args)
123
+ if (contents) Object.assign(body, contents)
124
+ else body.text = true
125
+ result = await api('POST', '/contents', body)
126
+ break
127
+ }
128
+
129
+ default:
130
+ result = {
131
+ error: 'Unknown command',
132
+ usage: {
133
+ search: 'search --query <q> [--type neural|fast|auto|deep-lite|deep|deep-reasoning|instant] [--num <n>] [--category company|research paper|news|personal site|financial report|people] [--include-domains <d1,d2>] [--exclude-domains <d1,d2>] [--include-text <phrases>] [--exclude-text <phrases>] [--start-published <ISO>] [--end-published <ISO>] [--user-location <CC>] [--text] [--highlights] [--summary] [--max-chars <n>] [--highlight-query <q>] [--summary-query <q>]',
134
+ 'find-similar': 'find-similar --url <url> [--num <n>] [--include-domains <d1,d2>] [--exclude-domains <d1,d2>] [--start-published <ISO>] [--end-published <ISO>] [--text] [--highlights] [--summary]',
135
+ contents: 'contents --urls <url1,url2> [--text] [--highlights] [--summary] [--max-chars <n>] [--highlight-query <q>] [--summary-query <q>]',
136
+ options: '--dry-run (preview request without sending)',
137
+ }
138
+ }
139
+ }
140
+
141
+ console.log(JSON.stringify(result, null, 2))
142
+ }
143
+
144
+ main().catch(err => {
145
+ console.error(JSON.stringify({ error: err.message }))
146
+ process.exit(1)
147
+ })
@@ -0,0 +1,186 @@
1
+ #!/usr/bin/env node
2
+
3
+ const API_TOKEN = process.env.G2_API_TOKEN
4
+ const BASE_URL = 'https://data.g2.com/api/v1'
5
+
6
+ if (!API_TOKEN) {
7
+ console.error(JSON.stringify({ error: 'G2_API_TOKEN environment variable required' }))
8
+ process.exit(1)
9
+ }
10
+
11
+ async function api(method, path, body) {
12
+ if (args['dry-run']) {
13
+ return { _dry_run: true, method, url: `${BASE_URL}${path}`, headers: { Authorization: '***', 'Content-Type': 'application/vnd.api+json', Accept: 'application/vnd.api+json' }, body: body || undefined }
14
+ }
15
+ const res = await fetch(`${BASE_URL}${path}`, {
16
+ method,
17
+ headers: {
18
+ 'Authorization': `Token token=${API_TOKEN}`,
19
+ 'Content-Type': 'application/vnd.api+json',
20
+ 'Accept': 'application/vnd.api+json',
21
+ },
22
+ body: body ? JSON.stringify(body) : undefined,
23
+ })
24
+ const text = await res.text()
25
+ try {
26
+ return JSON.parse(text)
27
+ } catch {
28
+ return { status: res.status, body: text }
29
+ }
30
+ }
31
+
32
+ function parseArgs(args) {
33
+ const result = { _: [] }
34
+ for (let i = 0; i < args.length; i++) {
35
+ const arg = args[i]
36
+ if (arg.startsWith('--')) {
37
+ const key = arg.slice(2)
38
+ const next = args[i + 1]
39
+ if (next && !next.startsWith('--')) {
40
+ result[key] = next
41
+ i++
42
+ } else {
43
+ result[key] = true
44
+ }
45
+ } else {
46
+ result._.push(arg)
47
+ }
48
+ }
49
+ return result
50
+ }
51
+
52
+ const args = parseArgs(process.argv.slice(2))
53
+ const [cmd, sub, ...rest] = args._
54
+
55
+ async function main() {
56
+ let result
57
+ const page = args.page ? Number(args.page) : 1
58
+ const perPage = args['per-page'] ? Number(args['per-page']) : 25
59
+ const productId = args['product-id'] || args.product
60
+
61
+ switch (cmd) {
62
+ case 'reviews':
63
+ switch (sub) {
64
+ case 'list': {
65
+ let qs = `?page[size]=${perPage}&page[number]=${page}`
66
+ if (productId) qs += `&filter[product_id]=${productId}`
67
+ if (args.state) qs += `&filter[state]=${encodeURIComponent(args.state)}`
68
+ result = await api('GET', `/survey-responses${qs}`)
69
+ break
70
+ }
71
+ case 'get': {
72
+ const id = args.id
73
+ if (!id) { result = { error: '--id required' }; break }
74
+ result = await api('GET', `/survey-responses/${id}`)
75
+ break
76
+ }
77
+ default:
78
+ result = { error: 'Unknown reviews subcommand. Use: list, get' }
79
+ }
80
+ break
81
+
82
+ case 'products':
83
+ switch (sub) {
84
+ case 'list': {
85
+ let qs = `?page[size]=${perPage}&page[number]=${page}`
86
+ if (args.name) qs += `&filter[name]=${encodeURIComponent(args.name)}`
87
+ result = await api('GET', `/products${qs}`)
88
+ break
89
+ }
90
+ case 'get': {
91
+ const id = args.id
92
+ if (!id) { result = { error: '--id required' }; break }
93
+ result = await api('GET', `/products/${id}`)
94
+ break
95
+ }
96
+ default:
97
+ result = { error: 'Unknown products subcommand. Use: list, get' }
98
+ }
99
+ break
100
+
101
+ case 'reports':
102
+ switch (sub) {
103
+ case 'list': {
104
+ let qs = `?page[size]=${perPage}&page[number]=${page}`
105
+ result = await api('GET', `/reports${qs}`)
106
+ break
107
+ }
108
+ case 'get': {
109
+ const id = args.id
110
+ if (!id) { result = { error: '--id required' }; break }
111
+ result = await api('GET', `/reports/${id}`)
112
+ break
113
+ }
114
+ default:
115
+ result = { error: 'Unknown reports subcommand. Use: list, get' }
116
+ }
117
+ break
118
+
119
+ case 'competitors':
120
+ switch (sub) {
121
+ case 'list': {
122
+ if (!productId) { result = { error: '--product-id required' }; break }
123
+ let qs = `?page[size]=${perPage}&page[number]=${page}&filter[product_id]=${productId}`
124
+ result = await api('GET', `/competitor-comparisons${qs}`)
125
+ break
126
+ }
127
+ default:
128
+ result = { error: 'Unknown competitors subcommand. Use: list' }
129
+ }
130
+ break
131
+
132
+ case 'categories':
133
+ switch (sub) {
134
+ case 'list': {
135
+ let qs = `?page[size]=${perPage}&page[number]=${page}`
136
+ if (args.name) qs += `&filter[name]=${encodeURIComponent(args.name)}`
137
+ result = await api('GET', `/categories${qs}`)
138
+ break
139
+ }
140
+ case 'get': {
141
+ const id = args.id
142
+ if (!id) { result = { error: '--id required' }; break }
143
+ result = await api('GET', `/categories/${id}`)
144
+ break
145
+ }
146
+ default:
147
+ result = { error: 'Unknown categories subcommand. Use: list, get' }
148
+ }
149
+ break
150
+
151
+ case 'tracking':
152
+ switch (sub) {
153
+ case 'visitors': {
154
+ let qs = `?page[size]=${perPage}&page[number]=${page}`
155
+ if (args.start) qs += `&filter[start_date]=${encodeURIComponent(args.start)}`
156
+ if (args.end) qs += `&filter[end_date]=${encodeURIComponent(args.end)}`
157
+ result = await api('GET', `/tracking-events${qs}`)
158
+ break
159
+ }
160
+ default:
161
+ result = { error: 'Unknown tracking subcommand. Use: visitors' }
162
+ }
163
+ break
164
+
165
+ default:
166
+ result = {
167
+ error: 'Unknown command',
168
+ usage: {
169
+ reviews: 'reviews [list --product-id <id> | get --id <id>]',
170
+ products: 'products [list --name <name> | get --id <id>]',
171
+ reports: 'reports [list | get --id <id>]',
172
+ competitors: 'competitors [list --product-id <id>]',
173
+ categories: 'categories [list --name <name> | get --id <id>]',
174
+ tracking: 'tracking [visitors --start <date> --end <date>]',
175
+ options: '--page <n> --per-page <n>',
176
+ }
177
+ }
178
+ }
179
+
180
+ console.log(JSON.stringify(result, null, 2))
181
+ }
182
+
183
+ main().catch(err => {
184
+ console.error(JSON.stringify({ error: err.message }))
185
+ process.exit(1)
186
+ })
@@ -0,0 +1,194 @@
1
+ #!/usr/bin/env node
2
+
3
+ const ACCESS_TOKEN = process.env.GA4_ACCESS_TOKEN
4
+ const DATA_API = 'https://analyticsdata.googleapis.com/v1beta'
5
+ const ADMIN_API = 'https://analyticsadmin.googleapis.com/v1beta'
6
+ const MP_URL = 'https://www.google-analytics.com/mp/collect'
7
+
8
+ if (!ACCESS_TOKEN) {
9
+ console.error(JSON.stringify({ error: 'GA4_ACCESS_TOKEN environment variable required' }))
10
+ process.exit(1)
11
+ }
12
+
13
+ async function api(method, baseUrl, path, body) {
14
+ if (args['dry-run']) {
15
+ return { _dry_run: true, method, url: `${baseUrl}${path}`, headers: { Authorization: '***', 'Content-Type': 'application/json' }, body: body || undefined }
16
+ }
17
+ const res = await fetch(`${baseUrl}${path}`, {
18
+ method,
19
+ headers: {
20
+ 'Authorization': `Bearer ${ACCESS_TOKEN}`,
21
+ 'Content-Type': 'application/json',
22
+ },
23
+ body: body ? JSON.stringify(body) : undefined,
24
+ })
25
+ const text = await res.text()
26
+ try {
27
+ return JSON.parse(text)
28
+ } catch {
29
+ return { status: res.status, body: text }
30
+ }
31
+ }
32
+
33
+ async function mpApi(measurementId, apiSecret, body) {
34
+ const params = new URLSearchParams({ measurement_id: measurementId, api_secret: apiSecret })
35
+ if (args['dry-run']) {
36
+ return { _dry_run: true, method: 'POST', url: `${MP_URL}?${new URLSearchParams({ measurement_id: measurementId, api_secret: '***' })}`, headers: { 'Content-Type': 'application/json' }, body: body || undefined }
37
+ }
38
+ const res = await fetch(`${MP_URL}?${params}`, {
39
+ method: 'POST',
40
+ headers: { 'Content-Type': 'application/json' },
41
+ body: JSON.stringify(body),
42
+ })
43
+ const text = await res.text()
44
+ if (!text) return { status: res.status, success: res.ok }
45
+ try {
46
+ return JSON.parse(text)
47
+ } catch {
48
+ return { status: res.status, body: text }
49
+ }
50
+ }
51
+
52
+ function parseArgs(args) {
53
+ const result = { _: [] }
54
+ for (let i = 0; i < args.length; i++) {
55
+ const arg = args[i]
56
+ if (arg.startsWith('--')) {
57
+ const key = arg.slice(2)
58
+ const next = args[i + 1]
59
+ if (next && !next.startsWith('--')) {
60
+ result[key] = next
61
+ i++
62
+ } else {
63
+ result[key] = true
64
+ }
65
+ } else {
66
+ result._.push(arg)
67
+ }
68
+ }
69
+ return result
70
+ }
71
+
72
+ const args = parseArgs(process.argv.slice(2))
73
+ const [cmd, sub, ...rest] = args._
74
+
75
+ async function main() {
76
+ let result
77
+
78
+ switch (cmd) {
79
+ case 'reports':
80
+ switch (sub) {
81
+ case 'run': {
82
+ const property = args.property
83
+ if (!property) { result = { error: '--property required' }; break }
84
+ const body = {
85
+ dateRanges: [{
86
+ startDate: args['start-date'] || '30daysAgo',
87
+ endDate: args['end-date'] || 'today',
88
+ }],
89
+ }
90
+ if (args.dimensions) {
91
+ body.dimensions = args.dimensions.split(',').map(d => ({ name: d.trim() }))
92
+ }
93
+ if (args.metrics) {
94
+ body.metrics = args.metrics.split(',').map(m => ({ name: m.trim() }))
95
+ }
96
+ result = await api('POST', DATA_API, `/properties/${property}:runReport`, body)
97
+ break
98
+ }
99
+ default:
100
+ result = { error: 'Unknown reports subcommand. Use: run' }
101
+ }
102
+ break
103
+
104
+ case 'realtime':
105
+ switch (sub) {
106
+ case 'run': {
107
+ const property = args.property
108
+ if (!property) { result = { error: '--property required' }; break }
109
+ const body = {}
110
+ if (args.dimensions) {
111
+ body.dimensions = args.dimensions.split(',').map(d => ({ name: d.trim() }))
112
+ }
113
+ if (args.metrics) {
114
+ body.metrics = args.metrics.split(',').map(m => ({ name: m.trim() }))
115
+ }
116
+ result = await api('POST', DATA_API, `/properties/${property}:runRealtimeReport`, body)
117
+ break
118
+ }
119
+ default:
120
+ result = { error: 'Unknown realtime subcommand. Use: run' }
121
+ }
122
+ break
123
+
124
+ case 'conversions':
125
+ switch (sub) {
126
+ case 'list': {
127
+ const property = args.property
128
+ if (!property) { result = { error: '--property required' }; break }
129
+ result = await api('GET', ADMIN_API, `/properties/${property}/conversionEvents`)
130
+ break
131
+ }
132
+ case 'create': {
133
+ const property = args.property
134
+ if (!property) { result = { error: '--property required' }; break }
135
+ if (!args['event-name']) { result = { error: '--event-name required' }; break }
136
+ result = await api('POST', ADMIN_API, `/properties/${property}/conversionEvents`, {
137
+ eventName: args['event-name'],
138
+ })
139
+ break
140
+ }
141
+ default:
142
+ result = { error: 'Unknown conversions subcommand. Use: list, create' }
143
+ }
144
+ break
145
+
146
+ case 'events':
147
+ switch (sub) {
148
+ case 'send': {
149
+ if (!args['measurement-id']) { result = { error: '--measurement-id required' }; break }
150
+ if (!args['api-secret']) { result = { error: '--api-secret required' }; break }
151
+ if (!args['client-id']) { result = { error: '--client-id required' }; break }
152
+ if (!args['event-name']) { result = { error: '--event-name required' }; break }
153
+ let eventParams = {}
154
+ if (args.params) {
155
+ try {
156
+ eventParams = JSON.parse(args.params)
157
+ } catch {
158
+ result = { error: 'Invalid JSON in --params' }; break
159
+ }
160
+ }
161
+ const body = {
162
+ client_id: args['client-id'],
163
+ events: [{
164
+ name: args['event-name'],
165
+ params: eventParams,
166
+ }],
167
+ }
168
+ result = await mpApi(args['measurement-id'], args['api-secret'], body)
169
+ break
170
+ }
171
+ default:
172
+ result = { error: 'Unknown events subcommand. Use: send' }
173
+ }
174
+ break
175
+
176
+ default:
177
+ result = {
178
+ error: 'Unknown command',
179
+ usage: {
180
+ reports: 'reports run --property <id> [--start-date <date>] [--end-date <date>] [--dimensions <dims>] [--metrics <metrics>]',
181
+ realtime: 'realtime run --property <id> [--dimensions <dims>] [--metrics <metrics>]',
182
+ conversions: 'conversions [list|create] --property <id> [--event-name <name>]',
183
+ events: 'events send --measurement-id <id> --api-secret <secret> --client-id <id> --event-name <name> [--params <json>]',
184
+ }
185
+ }
186
+ }
187
+
188
+ console.log(JSON.stringify(result, null, 2))
189
+ }
190
+
191
+ main().catch(err => {
192
+ console.error(JSON.stringify({ error: err.message }))
193
+ process.exit(1)
194
+ })