opencode-skills-collection 4.0.68 → 4.0.70

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 (491) hide show
  1. package/bundled-skills/.antigravity-install-manifest.json +304 -1
  2. package/bundled-skills/access-review/SKILL.md +394 -0
  3. package/bundled-skills/access-review/references/details.md +121 -0
  4. package/bundled-skills/agent-evals/SKILL.md +420 -0
  5. package/bundled-skills/agent-observability/SKILL.md +346 -0
  6. package/bundled-skills/agent-observability/references/details.md +786 -0
  7. package/bundled-skills/ai-agent-security/SKILL.md +393 -0
  8. package/bundled-skills/ai-agent-security/references/details.md +912 -0
  9. package/bundled-skills/ai-coding-agent-guardrails/SKILL.md +442 -0
  10. package/bundled-skills/ai-coding-agent-guardrails/references/details.md +753 -0
  11. package/bundled-skills/ai-inference-service-mesh/SKILL.md +449 -0
  12. package/bundled-skills/ai-pipeline-orchestration/SKILL.md +287 -0
  13. package/bundled-skills/ai-red-teaming/SKILL.md +409 -0
  14. package/bundled-skills/ai-security-hardening/SKILL.md +343 -0
  15. package/bundled-skills/ai-sre-incident-response/SKILL.md +336 -0
  16. package/bundled-skills/alerting-oncall/SKILL.md +458 -0
  17. package/bundled-skills/alerting-oncall/references/details.md +84 -0
  18. package/bundled-skills/api-integration-architect/SKILL.md +241 -0
  19. package/bundled-skills/apify-generate-output-schema/SKILL.md +438 -0
  20. package/bundled-skills/apify-integration-development/SKILL.md +168 -0
  21. package/bundled-skills/apify-integration-development/references/ai-framework-package.md +158 -0
  22. package/bundled-skills/apify-integration-development/references/ai-harness-plugin.md +192 -0
  23. package/bundled-skills/apify-integration-development/references/sdk-integration.md +236 -0
  24. package/bundled-skills/apify-integration-development/references/workflow-automation.md +163 -0
  25. package/bundled-skills/apk-redteam-pipeline/SKILL.md +446 -0
  26. package/bundled-skills/architecture-review/README.md +42 -0
  27. package/bundled-skills/architecture-review/SKILL.md +77 -0
  28. package/bundled-skills/architecture-review/examples.md +11 -0
  29. package/bundled-skills/architecture-review/reference/best-practices.md +7 -0
  30. package/bundled-skills/architecture-review/reference/capabilities.md +20 -0
  31. package/bundled-skills/architecture-review/reference/fallbacks.md +11 -0
  32. package/bundled-skills/architecture-review/reference/graph.md +15 -0
  33. package/bundled-skills/architecture-review/reference/mcp.md +14 -0
  34. package/bundled-skills/architecture-review/reference/workflow.md +15 -0
  35. package/bundled-skills/architecture-review/templates/architecture-review.md +21 -0
  36. package/bundled-skills/argocd-gitops/SKILL.md +469 -0
  37. package/bundled-skills/arm-templates/SKILL.md +438 -0
  38. package/bundled-skills/arm-templates/references/details.md +64 -0
  39. package/bundled-skills/asset-inventory/SKILL.md +412 -0
  40. package/bundled-skills/asset-inventory/references/details.md +127 -0
  41. package/bundled-skills/audit-logging/SKILL.md +476 -0
  42. package/bundled-skills/aws-cloudtrail/SKILL.md +486 -0
  43. package/bundled-skills/aws-cost-optimization/SKILL.md +331 -0
  44. package/bundled-skills/aws-ec2/SKILL.md +426 -0
  45. package/bundled-skills/aws-ecs-fargate/SKILL.md +388 -0
  46. package/bundled-skills/aws-iam/SKILL.md +463 -0
  47. package/bundled-skills/aws-lambda/SKILL.md +428 -0
  48. package/bundled-skills/aws-rds/SKILL.md +380 -0
  49. package/bundled-skills/aws-s3/SKILL.md +434 -0
  50. package/bundled-skills/aws-secrets-manager/SKILL.md +486 -0
  51. package/bundled-skills/aws-vpc/SKILL.md +436 -0
  52. package/bundled-skills/azure-ai-document-intelligence-ts/SKILL.md +1 -1
  53. package/bundled-skills/azure-aks/SKILL.md +423 -0
  54. package/bundled-skills/azure-devops/SKILL.md +457 -0
  55. package/bundled-skills/azure-functions-devsec/SKILL.md +436 -0
  56. package/bundled-skills/azure-keyvault/SKILL.md +455 -0
  57. package/bundled-skills/azure-keyvault/references/details.md +83 -0
  58. package/bundled-skills/azure-monitor-audit/SKILL.md +379 -0
  59. package/bundled-skills/azure-networking/SKILL.md +448 -0
  60. package/bundled-skills/azure-networking/references/details.md +135 -0
  61. package/bundled-skills/azure-sql/SKILL.md +413 -0
  62. package/bundled-skills/azure-sql/references/details.md +113 -0
  63. package/bundled-skills/azure-vms/SKILL.md +402 -0
  64. package/bundled-skills/azure-vms/references/details.md +134 -0
  65. package/bundled-skills/backup-recovery/SKILL.md +388 -0
  66. package/bundled-skills/bb-methodology/SKILL.md +451 -0
  67. package/bundled-skills/bb-methodology/references/details.md +120 -0
  68. package/bundled-skills/block-storage/SKILL.md +371 -0
  69. package/bundled-skills/blue-green-deploy/SKILL.md +453 -0
  70. package/bundled-skills/blue-green-deploy/references/details.md +90 -0
  71. package/bundled-skills/bug-bounty/SKILL.md +447 -0
  72. package/bundled-skills/bug-bounty/references/details.md +1316 -0
  73. package/bundled-skills/bugcrowd-reporting/SKILL.md +351 -0
  74. package/bundled-skills/business-continuity/SKILL.md +463 -0
  75. package/bundled-skills/career-ops/SKILL.md +186 -0
  76. package/bundled-skills/cdn-setup/SKILL.md +374 -0
  77. package/bundled-skills/change-management/SKILL.md +438 -0
  78. package/bundled-skills/change-management/references/details.md +105 -0
  79. package/bundled-skills/circleci/SKILL.md +475 -0
  80. package/bundled-skills/cis-benchmarks/SKILL.md +150 -0
  81. package/bundled-skills/cloudflare-pages/SKILL.md +318 -0
  82. package/bundled-skills/cloudflare-r2/SKILL.md +353 -0
  83. package/bundled-skills/cloudflare-workers/SKILL.md +415 -0
  84. package/bundled-skills/cloudflare-zero-trust/SKILL.md +361 -0
  85. package/bundled-skills/cloudformation/SKILL.md +461 -0
  86. package/bundled-skills/code-review-sensei/SKILL.md +177 -0
  87. package/bundled-skills/codebase-onboarding/README.md +42 -0
  88. package/bundled-skills/codebase-onboarding/SKILL.md +77 -0
  89. package/bundled-skills/codebase-onboarding/examples.md +11 -0
  90. package/bundled-skills/codebase-onboarding/reference/best-practices.md +7 -0
  91. package/bundled-skills/codebase-onboarding/reference/capabilities.md +20 -0
  92. package/bundled-skills/codebase-onboarding/reference/fallbacks.md +11 -0
  93. package/bundled-skills/codebase-onboarding/reference/graph.md +15 -0
  94. package/bundled-skills/codebase-onboarding/reference/mcp.md +14 -0
  95. package/bundled-skills/codebase-onboarding/reference/workflow.md +15 -0
  96. package/bundled-skills/codebase-onboarding/templates/repository-onboarding.md +21 -0
  97. package/bundled-skills/connection-auth-rules/SKILL.md +199 -0
  98. package/bundled-skills/connection-auth-rules/fetch_schema.py +320 -0
  99. package/bundled-skills/constraint-driven-development/SKILL.md +335 -0
  100. package/bundled-skills/constraint-driven-development/references/floor-guard.md +99 -0
  101. package/bundled-skills/container-hardening/SKILL.md +126 -0
  102. package/bundled-skills/container-registries/SKILL.md +435 -0
  103. package/bundled-skills/container-scanning/SKILL.md +416 -0
  104. package/bundled-skills/convex-backend/SKILL.md +338 -0
  105. package/bundled-skills/dast-scanning/SKILL.md +437 -0
  106. package/bundled-skills/database-backups/SKILL.md +425 -0
  107. package/bundled-skills/datadog/SKILL.md +487 -0
  108. package/bundled-skills/dependency-analysis/README.md +42 -0
  109. package/bundled-skills/dependency-analysis/SKILL.md +76 -0
  110. package/bundled-skills/dependency-analysis/examples.md +11 -0
  111. package/bundled-skills/dependency-analysis/reference/best-practices.md +7 -0
  112. package/bundled-skills/dependency-analysis/reference/capabilities.md +20 -0
  113. package/bundled-skills/dependency-analysis/reference/fallbacks.md +11 -0
  114. package/bundled-skills/dependency-analysis/reference/graph.md +15 -0
  115. package/bundled-skills/dependency-analysis/reference/mcp.md +14 -0
  116. package/bundled-skills/dependency-analysis/reference/workflow.md +15 -0
  117. package/bundled-skills/dependency-analysis/templates/dependency-review.md +21 -0
  118. package/bundled-skills/dependency-scanning/SKILL.md +457 -0
  119. package/bundled-skills/devcontainers-nix/SKILL.md +416 -0
  120. package/bundled-skills/devops-pipeline-builder/SKILL.md +200 -0
  121. package/bundled-skills/disaster-recovery/SKILL.md +374 -0
  122. package/bundled-skills/disaster-recovery/references/details.md +219 -0
  123. package/bundled-skills/dns-management/SKILL.md +375 -0
  124. package/bundled-skills/docker-compose/SKILL.md +482 -0
  125. package/bundled-skills/docker-management/SKILL.md +426 -0
  126. package/bundled-skills/eas-app-stores/SKILL.md +197 -0
  127. package/bundled-skills/eas-app-stores/agents/openai.yaml +4 -0
  128. package/bundled-skills/eas-app-stores/references/app-store-metadata.md +497 -0
  129. package/bundled-skills/eas-app-stores/references/ios-app-store.md +376 -0
  130. package/bundled-skills/eas-app-stores/references/native-ios.md +167 -0
  131. package/bundled-skills/eas-app-stores/references/play-store.md +244 -0
  132. package/bundled-skills/eas-app-stores/references/testflight.md +62 -0
  133. package/bundled-skills/eas-app-stores/references/workflows.md +120 -0
  134. package/bundled-skills/eas-hosting/SKILL.md +448 -0
  135. package/bundled-skills/eas-hosting/agents/openai.yaml +4 -0
  136. package/bundled-skills/eas-observe/SKILL.md +75 -0
  137. package/bundled-skills/eas-observe/agents/openai.yaml +4 -0
  138. package/bundled-skills/eas-observe/references/metrics.md +98 -0
  139. package/bundled-skills/eas-observe/references/queries.md +403 -0
  140. package/bundled-skills/eas-observe/references/setup.md +476 -0
  141. package/bundled-skills/eas-observe/references/third-party.md +136 -0
  142. package/bundled-skills/eas-simulator/SKILL.md +251 -0
  143. package/bundled-skills/eas-simulator/agents/openai.yaml +4 -0
  144. package/bundled-skills/eas-simulator/references/controllers.md +135 -0
  145. package/bundled-skills/eas-simulator/references/run-your-app.md +240 -0
  146. package/bundled-skills/eas-simulator/references/troubleshooting.md +47 -0
  147. package/bundled-skills/eas-workflows/SKILL.md +119 -0
  148. package/bundled-skills/eas-workflows/agents/openai.yaml +4 -0
  149. package/bundled-skills/eas-workflows/scripts/fetch.js +109 -0
  150. package/bundled-skills/ebpf-observability/SKILL.md +436 -0
  151. package/bundled-skills/ebpf-observability/references/details.md +542 -0
  152. package/bundled-skills/elk-stack/SKILL.md +487 -0
  153. package/bundled-skills/enterprise-vpn-attack/SKILL.md +395 -0
  154. package/bundled-skills/evidence-hygiene/SKILL.md +404 -0
  155. package/bundled-skills/expo-animation/LICENSE +21 -0
  156. package/bundled-skills/expo-animation/RECIPES.md +385 -0
  157. package/bundled-skills/expo-animation/SKILL.md +295 -0
  158. package/bundled-skills/expo-animation/agents/openai.yaml +4 -0
  159. package/bundled-skills/fact-check-x-unified/SKILL.md +178 -0
  160. package/bundled-skills/fact-check-x-unified/agents/openai.yaml +4 -0
  161. package/bundled-skills/fact-check-x-unified/references/acceptance-criteria.md +44 -0
  162. package/bundled-skills/fact-check-x-unified/references/contracts.md +39 -0
  163. package/bundled-skills/fact-check-x-unified/scripts/common.py +31 -0
  164. package/bundled-skills/fact-check-x-unified/scripts/fact_check_x.py +1832 -0
  165. package/bundled-skills/fact-check-x-unified/scripts/trusted_search_config.py +324 -0
  166. package/bundled-skills/fact-check-x-unified/tests/anchor_downgrade_test.py +90 -0
  167. package/bundled-skills/fact-check-x-unified/tests/multi_platform_test.py +369 -0
  168. package/bundled-skills/fact-check-x-unified/tests/smoke_test.py +740 -0
  169. package/bundled-skills/fact-check-x-unified/tests/stage_checkpoint_test.py +103 -0
  170. package/bundled-skills/fact-check-x-unified/tests/trusted_search_config_test.py +156 -0
  171. package/bundled-skills/feature-flags/SKILL.md +426 -0
  172. package/bundled-skills/feature-flags/references/details.md +86 -0
  173. package/bundled-skills/fedramp-compliance/SKILL.md +453 -0
  174. package/bundled-skills/firebase-app-platform/SKILL.md +381 -0
  175. package/bundled-skills/firewall-config/SKILL.md +479 -0
  176. package/bundled-skills/gcp-audit-logs/SKILL.md +452 -0
  177. package/bundled-skills/gcp-audit-logs/references/details.md +56 -0
  178. package/bundled-skills/gcp-cloud-functions/SKILL.md +284 -0
  179. package/bundled-skills/gcp-cloud-sql/SKILL.md +277 -0
  180. package/bundled-skills/gcp-compute/SKILL.md +319 -0
  181. package/bundled-skills/gcp-gke/SKILL.md +307 -0
  182. package/bundled-skills/gcp-networking/SKILL.md +293 -0
  183. package/bundled-skills/gcp-secret-manager/SKILL.md +421 -0
  184. package/bundled-skills/gcp-secret-manager/references/details.md +131 -0
  185. package/bundled-skills/gdpr-compliance/SKILL.md +451 -0
  186. package/bundled-skills/gdpr-compliance/references/details.md +145 -0
  187. package/bundled-skills/geo-audit/SKILL.md +368 -0
  188. package/bundled-skills/geo-brand-mentions/SKILL.md +68 -0
  189. package/bundled-skills/geo-brand-mentions/references/details.md +471 -0
  190. package/bundled-skills/geo-citability/SKILL.md +350 -0
  191. package/bundled-skills/geo-compare/SKILL.md +340 -0
  192. package/bundled-skills/geo-content/SKILL.md +383 -0
  193. package/bundled-skills/geo-crawlers/SKILL.md +408 -0
  194. package/bundled-skills/geo-llmstxt/SKILL.md +464 -0
  195. package/bundled-skills/geo-platform-optimizer/SKILL.md +314 -0
  196. package/bundled-skills/geo-proposal/SKILL.md +378 -0
  197. package/bundled-skills/geo-prospect/SKILL.md +225 -0
  198. package/bundled-skills/geo-report/SKILL.md +436 -0
  199. package/bundled-skills/geo-report-pdf/SKILL.md +157 -0
  200. package/bundled-skills/geo-schema/SKILL.md +408 -0
  201. package/bundled-skills/geo-technical/SKILL.md +78 -0
  202. package/bundled-skills/geo-technical/references/details.md +543 -0
  203. package/bundled-skills/git-workflow/SKILL.md +460 -0
  204. package/bundled-skills/github-actions/SKILL.md +368 -0
  205. package/bundled-skills/gitlab-ci/SKILL.md +340 -0
  206. package/bundled-skills/gpt-taste/SKILL.md +8 -1
  207. package/bundled-skills/gpu-kubernetes-operations/SKILL.md +468 -0
  208. package/bundled-skills/gpu-server-management/SKILL.md +236 -0
  209. package/bundled-skills/hashicorp-vault/SKILL.md +408 -0
  210. package/bundled-skills/helm-charts/SKILL.md +469 -0
  211. package/bundled-skills/hf-cli/SKILL.md +263 -0
  212. package/bundled-skills/hipaa-compliance/SKILL.md +451 -0
  213. package/bundled-skills/huggingface-community-evals/SKILL.md +228 -0
  214. package/bundled-skills/huggingface-community-evals/examples/.env.example +3 -0
  215. package/bundled-skills/huggingface-community-evals/examples/USAGE_EXAMPLES.md +101 -0
  216. package/bundled-skills/huggingface-community-evals/scripts/inspect_eval_uv.py +104 -0
  217. package/bundled-skills/huggingface-community-evals/scripts/inspect_vllm_uv.py +306 -0
  218. package/bundled-skills/huggingface-community-evals/scripts/lighteval_vllm_uv.py +297 -0
  219. package/bundled-skills/huggingface-datasets/SKILL.md +130 -0
  220. package/bundled-skills/hunt-aspnet/SKILL.md +321 -0
  221. package/bundled-skills/hunt-ato/SKILL.md +184 -0
  222. package/bundled-skills/hunt-auth-bypass/SKILL.md +426 -0
  223. package/bundled-skills/hunt-auth-bypass/references/details.md +80 -0
  224. package/bundled-skills/hunt-brute-force/SKILL.md +341 -0
  225. package/bundled-skills/hunt-business-logic/SKILL.md +281 -0
  226. package/bundled-skills/hunt-cache-poison/SKILL.md +382 -0
  227. package/bundled-skills/hunt-captcha-bypass/SKILL.md +136 -0
  228. package/bundled-skills/hunt-cicd/SKILL.md +311 -0
  229. package/bundled-skills/hunt-clickjacking/SKILL.md +110 -0
  230. package/bundled-skills/hunt-cors/SKILL.md +335 -0
  231. package/bundled-skills/hunt-dom/SKILL.md +323 -0
  232. package/bundled-skills/hunt-exceptional-conditions/SKILL.md +111 -0
  233. package/bundled-skills/hunt-file-upload/SKILL.md +202 -0
  234. package/bundled-skills/hunt-fintech-graphql/SKILL.md +289 -0
  235. package/bundled-skills/hunt-forgot-password/SKILL.md +114 -0
  236. package/bundled-skills/hunt-grpc/SKILL.md +317 -0
  237. package/bundled-skills/hunt-host-header/SKILL.md +309 -0
  238. package/bundled-skills/hunt-html-injection/SKILL.md +106 -0
  239. package/bundled-skills/hunt-http-smuggling/SKILL.md +129 -0
  240. package/bundled-skills/hunt-http-smuggling/references/phase2h-smuggling-cachepoison.md +177 -0
  241. package/bundled-skills/hunt-idor/SKILL.md +434 -0
  242. package/bundled-skills/hunt-jwt-crypto/SKILL.md +221 -0
  243. package/bundled-skills/hunt-k8s/SKILL.md +337 -0
  244. package/bundled-skills/hunt-laravel/SKILL.md +255 -0
  245. package/bundled-skills/hunt-ldap/SKILL.md +351 -0
  246. package/bundled-skills/hunt-lfi/SKILL.md +311 -0
  247. package/bundled-skills/hunt-llm-ai/SKILL.md +289 -0
  248. package/bundled-skills/hunt-mfa-bypass/SKILL.md +177 -0
  249. package/bundled-skills/hunt-misc/SKILL.md +378 -0
  250. package/bundled-skills/hunt-nextjs/SKILL.md +299 -0
  251. package/bundled-skills/hunt-nodejs/SKILL.md +263 -0
  252. package/bundled-skills/hunt-nosqli/SKILL.md +210 -0
  253. package/bundled-skills/hunt-ntlm-info/SKILL.md +314 -0
  254. package/bundled-skills/hunt-oauth/SKILL.md +459 -0
  255. package/bundled-skills/hunt-open-redirect/SKILL.md +223 -0
  256. package/bundled-skills/hunt-race-condition/SKILL.md +381 -0
  257. package/bundled-skills/hunt-race-condition/references/details.md +159 -0
  258. package/bundled-skills/hunt-rag-vector/SKILL.md +212 -0
  259. package/bundled-skills/hunt-rce/SKILL.md +444 -0
  260. package/bundled-skills/hunt-rce/references/details.md +110 -0
  261. package/bundled-skills/hunt-saml/SKILL.md +156 -0
  262. package/bundled-skills/hunt-session/SKILL.md +342 -0
  263. package/bundled-skills/hunt-shadow-api/SKILL.md +198 -0
  264. package/bundled-skills/hunt-source-leak/SKILL.md +345 -0
  265. package/bundled-skills/hunt-spa-api/SKILL.md +163 -0
  266. package/bundled-skills/hunt-springboot/SKILL.md +285 -0
  267. package/bundled-skills/hunt-sqli/SKILL.md +466 -0
  268. package/bundled-skills/hunt-ssrf/SKILL.md +396 -0
  269. package/bundled-skills/hunt-ssrf/references/details.md +179 -0
  270. package/bundled-skills/hunt-ssti/SKILL.md +163 -0
  271. package/bundled-skills/hunt-subdomain/SKILL.md +379 -0
  272. package/bundled-skills/hunt-tls-network/SKILL.md +399 -0
  273. package/bundled-skills/hunt-xxe/SKILL.md +466 -0
  274. package/bundled-skills/i-have-adhd/SKILL.md +170 -0
  275. package/bundled-skills/identity-access-management/SKILL.md +382 -0
  276. package/bundled-skills/identity-access-management/references/details.md +524 -0
  277. package/bundled-skills/incident-management/SKILL.md +484 -0
  278. package/bundled-skills/incident-response/SKILL.md +448 -0
  279. package/bundled-skills/incident-response/references/details.md +113 -0
  280. package/bundled-skills/interview-me/SKILL.md +248 -0
  281. package/bundled-skills/iso27001-compliance/SKILL.md +460 -0
  282. package/bundled-skills/jenkins/SKILL.md +462 -0
  283. package/bundled-skills/jev-social/SKILL.md +182 -0
  284. package/bundled-skills/jev-use/SKILL.md +158 -0
  285. package/bundled-skills/kubernetes-hardening/SKILL.md +154 -0
  286. package/bundled-skills/kubernetes-ops/SKILL.md +449 -0
  287. package/bundled-skills/kubernetes-ops/references/details.md +108 -0
  288. package/bundled-skills/kustomize/SKILL.md +478 -0
  289. package/bundled-skills/linux-administration/SKILL.md +367 -0
  290. package/bundled-skills/linux-hardening/SKILL.md +154 -0
  291. package/bundled-skills/llm-app-security/SKILL.md +389 -0
  292. package/bundled-skills/llm-app-security/references/details.md +674 -0
  293. package/bundled-skills/llm-caching/SKILL.md +334 -0
  294. package/bundled-skills/llm-cost-optimization/SKILL.md +311 -0
  295. package/bundled-skills/llm-fine-tuning/SKILL.md +329 -0
  296. package/bundled-skills/llm-gateway/SKILL.md +282 -0
  297. package/bundled-skills/llm-inference-scaling/SKILL.md +286 -0
  298. package/bundled-skills/llmops-platform-engineering/SKILL.md +472 -0
  299. package/bundled-skills/load-balancing/SKILL.md +403 -0
  300. package/bundled-skills/loki-logging/SKILL.md +479 -0
  301. package/bundled-skills/longbridge-derivatives/SKILL.md +117 -0
  302. package/bundled-skills/longbridge-derivatives/references/option.md +36 -0
  303. package/bundled-skills/longbridge-derivatives/references/options-advanced.md +101 -0
  304. package/bundled-skills/longbridge-derivatives/references/options-pnl.md +74 -0
  305. package/bundled-skills/longbridge-derivatives/references/options-strategy.md +82 -0
  306. package/bundled-skills/longbridge-derivatives/references/options-volatility.md +70 -0
  307. package/bundled-skills/longbridge-derivatives/references/warrant.md +12 -0
  308. package/bundled-skills/longbridge-quant/SKILL.md +151 -0
  309. package/bundled-skills/longbridge-quant/references/correlation.md +51 -0
  310. package/bundled-skills/longbridge-quant/references/execution-model.md +68 -0
  311. package/bundled-skills/longbridge-quant/references/factor-research.md +95 -0
  312. package/bundled-skills/longbridge-quant/references/factor-screen.md +101 -0
  313. package/bundled-skills/longbridge-quant/references/hedging.md +136 -0
  314. package/bundled-skills/longbridge-quant/references/ml-strategy.md +77 -0
  315. package/bundled-skills/longbridge-quant/references/multifactor.md +68 -0
  316. package/bundled-skills/longbridge-quant/references/pairs-trading.md +61 -0
  317. package/bundled-skills/longbridge-quant/references/quant-cli.md +133 -0
  318. package/bundled-skills/longbridge-quant/references/quant-stats.md +150 -0
  319. package/bundled-skills/longbridge-quant/references/seasonality.md +50 -0
  320. package/bundled-skills/longbridge-quant/references/strategy-optimizer.md +68 -0
  321. package/bundled-skills/longbridge-quant/references/volatility-strategy.md +52 -0
  322. package/bundled-skills/longbridge-research/SKILL.md +187 -0
  323. package/bundled-skills/longbridge-research/references/company-profile.md +96 -0
  324. package/bundled-skills/longbridge-research/references/company-tearsheet.md +82 -0
  325. package/bundled-skills/longbridge-research/references/competitive-analysis.md +81 -0
  326. package/bundled-skills/longbridge-research/references/consensus.md +92 -0
  327. package/bundled-skills/longbridge-research/references/coverage-initiation.md +76 -0
  328. package/bundled-skills/longbridge-research/references/defi-yield.md +60 -0
  329. package/bundled-skills/longbridge-research/references/finance-calendar.md +165 -0
  330. package/bundled-skills/longbridge-research/references/financial-planning.md +77 -0
  331. package/bundled-skills/longbridge-research/references/forecast-eps.md +39 -0
  332. package/bundled-skills/longbridge-research/references/fund-holder.md +44 -0
  333. package/bundled-skills/longbridge-research/references/hkipo-analysis.md +101 -0
  334. package/bundled-skills/longbridge-research/references/industry-peers.md +46 -0
  335. package/bundled-skills/longbridge-research/references/industry-rank.md +62 -0
  336. package/bundled-skills/longbridge-research/references/insider-trades.md +48 -0
  337. package/bundled-skills/longbridge-research/references/institution-rating.md +62 -0
  338. package/bundled-skills/longbridge-research/references/investment-ideas.md +69 -0
  339. package/bundled-skills/longbridge-research/references/investment-proposal.md +95 -0
  340. package/bundled-skills/longbridge-research/references/investors.md +87 -0
  341. package/bundled-skills/longbridge-research/references/onchain.md +70 -0
  342. package/bundled-skills/longbridge-research/references/post-investment.md +76 -0
  343. package/bundled-skills/longbridge-research/references/shareholder.md +72 -0
  344. package/bundled-skills/longbridge-research/references/short-positions.md +50 -0
  345. package/bundled-skills/longbridge-research/references/short-trades.md +50 -0
  346. package/bundled-skills/longbridge-research/references/stock-research.md +61 -0
  347. package/bundled-skills/longbridge-research/references/thesis-tracker.md +64 -0
  348. package/bundled-skills/m365-entra-attack/SKILL.md +423 -0
  349. package/bundled-skills/mac-mini-llm-lab/SKILL.md +350 -0
  350. package/bundled-skills/makepad-2-0-animation/SKILL.md +318 -0
  351. package/bundled-skills/makepad-2-0-animation/references/animator-reference.md +433 -0
  352. package/bundled-skills/makepad-2-0-dsl/SKILL.md +492 -0
  353. package/bundled-skills/makepad-2-0-dsl/references/dsl-syntax-reference.md +511 -0
  354. package/bundled-skills/makepad-2-0-dsl/references/extended-guide.md +56 -0
  355. package/bundled-skills/makepad-2-0-dsl/references/property-system.md +757 -0
  356. package/bundled-skills/makepad-2-0-events/SKILL.md +497 -0
  357. package/bundled-skills/makepad-2-0-events/references/event-patterns.md +802 -0
  358. package/bundled-skills/makepad-2-0-events/references/extended-guide.md +590 -0
  359. package/bundled-skills/makepad-2-0-layout/SKILL.md +499 -0
  360. package/bundled-skills/makepad-2-0-layout/references/extended-guide.md +243 -0
  361. package/bundled-skills/makepad-2-0-layout/references/layout-patterns.md +881 -0
  362. package/bundled-skills/makepad-2-0-widgets/SKILL.md +261 -0
  363. package/bundled-skills/makepad-2-0-widgets/references/widget-advanced.md +648 -0
  364. package/bundled-skills/makepad-2-0-widgets/references/widget-catalog.md +547 -0
  365. package/bundled-skills/mcp-server-security/SKILL.md +356 -0
  366. package/bundled-skills/mcp-server-security/references/details.md +745 -0
  367. package/bundled-skills/mdm-device-management/SKILL.md +404 -0
  368. package/bundled-skills/mdm-device-management/references/details.md +410 -0
  369. package/bundled-skills/meeting-distiller-pro/SKILL.md +120 -0
  370. package/bundled-skills/meme-coin-audit/SKILL.md +402 -0
  371. package/bundled-skills/mid-engagement-ir-detection/SKILL.md +377 -0
  372. package/bundled-skills/model-registry-governance/SKILL.md +452 -0
  373. package/bundled-skills/model-serving-kubernetes/SKILL.md +339 -0
  374. package/bundled-skills/model-supply-chain-security/SKILL.md +427 -0
  375. package/bundled-skills/mongodb/SKILL.md +436 -0
  376. package/bundled-skills/monte-carlo-analyze-root-cause/SKILL.md +12 -1
  377. package/bundled-skills/monte-carlo-asset-health/SKILL.md +12 -1
  378. package/bundled-skills/monte-carlo-context-detection/SKILL.md +170 -0
  379. package/bundled-skills/monte-carlo-context-detection/references/signal-definitions.md +46 -0
  380. package/bundled-skills/multi-tenant-llm-hosting/SKILL.md +435 -0
  381. package/bundled-skills/multi-tenant-llm-hosting/references/details.md +211 -0
  382. package/bundled-skills/mysql/SKILL.md +390 -0
  383. package/bundled-skills/new-relic/SKILL.md +472 -0
  384. package/bundled-skills/nfs-storage/SKILL.md +356 -0
  385. package/bundled-skills/object-storage/SKILL.md +378 -0
  386. package/bundled-skills/offensive-osint/SKILL.md +443 -0
  387. package/bundled-skills/okta-attack/SKILL.md +436 -0
  388. package/bundled-skills/ollama-stack/SKILL.md +379 -0
  389. package/bundled-skills/openclaw-deployment-hardening/SKILL.md +135 -0
  390. package/bundled-skills/openclaw-local-mac-mini/SKILL.md +426 -0
  391. package/bundled-skills/openclaw-local-mac-mini/references/details.md +221 -0
  392. package/bundled-skills/openclaw-security-hardening/SKILL.md +135 -0
  393. package/bundled-skills/openshift/SKILL.md +485 -0
  394. package/bundled-skills/opentelemetry/SKILL.md +438 -0
  395. package/bundled-skills/opentelemetry/references/details.md +78 -0
  396. package/bundled-skills/opentofu-migration/SKILL.md +349 -0
  397. package/bundled-skills/osint-methodology/SKILL.md +460 -0
  398. package/bundled-skills/osint-methodology/references/details.md +1350 -0
  399. package/bundled-skills/pci-dss-compliance/SKILL.md +446 -0
  400. package/bundled-skills/penetration-testing/SKILL.md +152 -0
  401. package/bundled-skills/performance-tuning/SKILL.md +381 -0
  402. package/bundled-skills/planetscale/SKILL.md +297 -0
  403. package/bundled-skills/platform-engineering/SKILL.md +348 -0
  404. package/bundled-skills/platform-engineering/references/details.md +944 -0
  405. package/bundled-skills/podman/SKILL.md +405 -0
  406. package/bundled-skills/policy-as-code/SKILL.md +434 -0
  407. package/bundled-skills/policy-as-code/references/details.md +204 -0
  408. package/bundled-skills/postgresql-devsec/SKILL.md +378 -0
  409. package/bundled-skills/prometheus-grafana/SKILL.md +469 -0
  410. package/bundled-skills/prompt-injection-defense/SKILL.md +483 -0
  411. package/bundled-skills/rag-infrastructure/SKILL.md +269 -0
  412. package/bundled-skills/rag-observability-evals/SKILL.md +444 -0
  413. package/bundled-skills/rag-observability-evals/references/details.md +92 -0
  414. package/bundled-skills/recon-scope-triage/SKILL.md +128 -0
  415. package/bundled-skills/redis/SKILL.md +421 -0
  416. package/bundled-skills/redteam-report-template/SKILL.md +370 -0
  417. package/bundled-skills/remotion-captions/SKILL.md +57 -0
  418. package/bundled-skills/remotion-captions/agents/openai.yaml +7 -0
  419. package/bundled-skills/remotion-captions/assets/remotion-icon.svg +4 -0
  420. package/bundled-skills/remotion-captions/display-captions.md +190 -0
  421. package/bundled-skills/remotion-captions/import-srt-captions.md +73 -0
  422. package/bundled-skills/remotion-captions/transcribe-captions.md +70 -0
  423. package/bundled-skills/remotion-create/SKILL.md +106 -0
  424. package/bundled-skills/remotion-create/agents/openai.yaml +7 -0
  425. package/bundled-skills/remotion-create/assets/remotion-icon.svg +4 -0
  426. package/bundled-skills/remotion-create/tailwind.md +11 -0
  427. package/bundled-skills/remotion-create/video-layout.md +9 -0
  428. package/bundled-skills/remotion-docs/SKILL.md +67 -0
  429. package/bundled-skills/remotion-docs/agents/openai.yaml +7 -0
  430. package/bundled-skills/remotion-docs/assets/remotion-icon.svg +4 -0
  431. package/bundled-skills/remotion-interactivity/SKILL.md +270 -0
  432. package/bundled-skills/remotion-interactivity/agents/openai.yaml +7 -0
  433. package/bundled-skills/remotion-interactivity/assets/remotion-icon.svg +4 -0
  434. package/bundled-skills/remotion-render/SKILL.md +48 -0
  435. package/bundled-skills/remotion-render/agents/openai.yaml +7 -0
  436. package/bundled-skills/remotion-render/assets/remotion-icon.svg +4 -0
  437. package/bundled-skills/remotion-render/transparent-videos.md +106 -0
  438. package/bundled-skills/report-writing/SKILL.md +426 -0
  439. package/bundled-skills/report-writing/references/details.md +187 -0
  440. package/bundled-skills/reverse-proxy/SKILL.md +420 -0
  441. package/bundled-skills/runbook-creation/SKILL.md +438 -0
  442. package/bundled-skills/runbook-creation/references/details.md +71 -0
  443. package/bundled-skills/saas-pricing-strategist/SKILL.md +169 -0
  444. package/bundled-skills/saas-security-posture/SKILL.md +415 -0
  445. package/bundled-skills/sast-scanning/SKILL.md +444 -0
  446. package/bundled-skills/sbom-supply-chain/SKILL.md +433 -0
  447. package/bundled-skills/score-eval/SKILL.md +35 -0
  448. package/bundled-skills/security-arsenal/SKILL.md +446 -0
  449. package/bundled-skills/security-arsenal/references/details.md +540 -0
  450. package/bundled-skills/security-automation/SKILL.md +146 -0
  451. package/bundled-skills/semantic-versioning/SKILL.md +434 -0
  452. package/bundled-skills/semantic-versioning/references/details.md +83 -0
  453. package/bundled-skills/service-mesh/SKILL.md +422 -0
  454. package/bundled-skills/soc2-compliance/SKILL.md +409 -0
  455. package/bundled-skills/sops-encryption/SKILL.md +124 -0
  456. package/bundled-skills/sre-dashboards/SKILL.md +143 -0
  457. package/bundled-skills/ssh-configuration/SKILL.md +324 -0
  458. package/bundled-skills/ssl-tls-management/SKILL.md +428 -0
  459. package/bundled-skills/ssl-tls-management/references/details.md +99 -0
  460. package/bundled-skills/startup-it-troubleshooting/SKILL.md +415 -0
  461. package/bundled-skills/supply-chain-attack-recon/SKILL.md +453 -0
  462. package/bundled-skills/supply-chain-attack-recon/references/details.md +258 -0
  463. package/bundled-skills/systemd-services/SKILL.md +379 -0
  464. package/bundled-skills/terraform-aws/SKILL.md +125 -0
  465. package/bundled-skills/terraform-azure/SKILL.md +415 -0
  466. package/bundled-skills/terraform-azure/references/details.md +231 -0
  467. package/bundled-skills/terraform-gcp/SKILL.md +369 -0
  468. package/bundled-skills/threat-modeling/SKILL.md +487 -0
  469. package/bundled-skills/user-management/SKILL.md +383 -0
  470. package/bundled-skills/using-agent-skills/SKILL.md +220 -0
  471. package/bundled-skills/vector-database-ops/SKILL.md +300 -0
  472. package/bundled-skills/vendor-management/SKILL.md +439 -0
  473. package/bundled-skills/vendor-management/references/details.md +109 -0
  474. package/bundled-skills/vercel-deployments/SKILL.md +296 -0
  475. package/bundled-skills/vllm-server/SKILL.md +236 -0
  476. package/bundled-skills/vmware-vcenter-attack/SKILL.md +412 -0
  477. package/bundled-skills/vpn-setup/SKILL.md +452 -0
  478. package/bundled-skills/vulnerability-scanning/SKILL.md +448 -0
  479. package/bundled-skills/waf-setup/SKILL.md +354 -0
  480. package/bundled-skills/waf-setup/references/details.md +211 -0
  481. package/bundled-skills/web2-recon/SKILL.md +440 -0
  482. package/bundled-skills/web2-recon/references/details.md +319 -0
  483. package/bundled-skills/web3-audit/SKILL.md +445 -0
  484. package/bundled-skills/web3-audit/references/details.md +224 -0
  485. package/bundled-skills/windows-hardening/SKILL.md +454 -0
  486. package/bundled-skills/windows-hardening/references/details.md +204 -0
  487. package/bundled-skills/windows-server/SKILL.md +318 -0
  488. package/bundled-skills/writing-guidelines/SKILL.md +60 -0
  489. package/bundled-skills/zero-trust/SKILL.md +461 -0
  490. package/package.json +1 -1
  491. package/skills_index.json +7874 -277
@@ -0,0 +1,168 @@
1
+ ---
2
+ description: Curated upstream guidance for Apify Integration Development; use when the workflow matches the user goal.
3
+ name: apify-integration-development
4
+ source_repo: apify/agent-skills
5
+ source_type: official
6
+ source: apify
7
+ date_added: '2026-09-21'
8
+ risk: unknown
9
+ ---
10
+ ## When to Use
11
+ - Use when this upstream workflow matches the user's stated goal.
12
+ - Use when the task requires the procedures documented in this skill.
13
+
14
+ # Apify Integration Development
15
+
16
+ Design and build an **official Apify integration** for a company's product, with minimal help from Apify. This skill covers every integration shape Apify supports - workflow-automation apps, AI agent plugins (coding agents and harnesses), AI framework packages, and direct application clients - so a partner team can ship a first-class Apify integration end to end. The cross-cutting rules below apply to all of them, and one category-specific reference file carries the rest.
17
+
18
+ > **Building an official integration?** Once you publish it, contact **integrations@apify.com** so the Apify team can review, test, and validate your integration before it reaches users. We'll check the capability surface, cost controls, error handling, and attribution headers, and help you close any gaps.
19
+
20
+ ## Step 0 - Learn the Apify model first (required)
21
+
22
+ Before designing anything, fetch and read `https://apify.com/agents.md`. It is the canonical quickstart for AI agents and the single source of truth for vocabulary, the run flow, and the cost rule. If the fetch fails, the mini-glossary below keeps the skill usable.
23
+
24
+ Apify vocabulary (always written with a capital A on the platform):
25
+
26
+ - **Actor** - a serverless cloud program that takes JSON input, performs a task, and produces structured output. Not an AI agent.
27
+ - **Actor Run** - one execution of an Actor. Each run has its own dataset, key-value store, and request queue, and ends in a terminal status (`SUCCEEDED`, `FAILED`, `TIMED-OUT`, `ABORTED`).
28
+ - **Dataset** - append-only structured storage for a run's results. An Actor call returns the dataset ID, not its contents.
29
+ - **Key-Value Store** - unstructured/file storage (screenshots, HTML, OUTPUT).
30
+ - **Actor Task** - a saved, parameterized configuration for running an Actor.
31
+ - **Apify Store** - the marketplace of Actors at `https://apify.com/store.md`.
32
+ - **Apify Console** - the web UI at `https://console.apify.com`.
33
+ - **Compute Unit (CU)** - billing unit: memory (MB) x duration (hours).
34
+
35
+ Further terms (build, standby, request queue, proxy, pricing models): `https://docs.apify.com/llms.txt`.
36
+
37
+ ## Use Apify MCP for live context while planning
38
+
39
+ The Apify MCP server is the fastest way to research Actors, schemas, pricing, and docs during integration design. See `https://docs.apify.com/integrations/mcp` (append `.md` for a markdown version).
40
+
41
+ If Apify MCP tools are already available in this environment, use them:
42
+
43
+ - `search-actors` - find Actors by platform/product keyword (search by product name, not end goal).
44
+ - `fetch-actor-details` - read an Actor's input schema, output format, README, and pricing before you encode its shape into the integration.
45
+ - `search-apify-docs` / `fetch-apify-docs` - pull contextual documentation pages.
46
+
47
+ The anonymous discovery subset (`search-actors`, `fetch-actor-details`, `search-apify-docs`, `fetch-apify-docs`) works without an account, so you can research even before the developer has connected their token.
48
+
49
+ ## Pick your integration shape
50
+
51
+ Read exactly one reference file based on the product you are integrating into. Each reference carries the category-specific UX design, a canonical capability matrix, and a definition-of-done checklist.
52
+
53
+ | Product shape | Examples | Read |
54
+ |---|---|---|
55
+ | Workflow automation platform | Zapier, n8n, Make, Pipedream, Activepieces | `references/workflow-automation.md` |
56
+ | AI agent plugin (coding agent or harness) | Cursor, Claude Code, Codex, GitHub Copilot (coding agents); OpenClaw-style runtimes, Hermes-style harnesses (harnesses) | `references/ai-harness-plugin.md` |
57
+ | AI framework package (PyPI/npm for LLM frameworks) | LangChain, LlamaIndex, Haystack, Vercel AI SDK | `references/ai-framework-package.md` |
58
+ | Application integration (direct client) | A backend service, scheduled job, product feature calling Actors via `apify-client` or REST | `references/sdk-integration.md` |
59
+
60
+ Paths are relative to this skill folder. If your product spans two shapes (e.g. an AI harness built on top of a framework package), read both - the rules compose. The AI agent plugin reference covers **two approaches with different trade-offs**: a lightweight skills + MCP bundle for skills/MCP-aware coding agents, and a custom tool-registry plugin for OpenClaw/Hermes-style harnesses.
61
+
62
+ ## Cross-cutting design rules (true for every integration type)
63
+
64
+ These invariants were extracted from every existing Apify integration. Apply them regardless of shape.
65
+
66
+ ### Vocabulary mirroring
67
+ Model the integration's resources on Apify's domain (Actor / Run / Dataset / KV Store / Task). Users coming from Apify Console should find the same concepts under the same names.
68
+
69
+ ### Asynchronous run flow with bounded polling
70
+ Actors can run for seconds to hours. Use the asynchronous flow, never the 300-second synchronous endpoint for anything but short jobs:
71
+
72
+ ```
73
+ POST /v2/actors/{actorId}/runs -> start, return runId
74
+ GET /v2/actor-runs/{runId} -> poll until terminal status
75
+ GET /v2/datasets/{datasetId}/items -> fetch results on SUCCEEDED
76
+ ```
77
+
78
+ Polling must be **bounded**: use the run's own `timeoutSecs` plus a grace buffer, with an absolute ceiling fallback. Never `while (true)`. On a non-terminal status, surface the run ID so the user/agent can poll again or inspect the failure.
79
+
80
+ ### Cost is first-class
81
+ Every path that starts a run must expose a cost control. The canonical control is `maxTotalChargeUsd` (caps the run's total charge on most pricing models) and `maxItems` (caps billed items on pay-per-result Actors). Send them as **options / query parameters**, never as Actor input - inside input they are either an Actor-declared field or simply invalid. `0` / empty / null means *no limit*. For LLM-facing integrations, the ceilings are **developer-controlled**; an LLM cannot widen them.
82
+
83
+ ### Attribution headers
84
+ Stamp an integration header on every outbound request so Apify can attribute traffic: `x-apify-integration-platform: <your-platform>`. When a request is driven by an AI tool (not a human in a UI), also send `x-apify-integration-ai-tool: true`. If the integration was built using this skill, add `x-apify-integration-origin: apify-integration-development-skill` so Apify can distinguish skill-generated integrations from custom ones. One line, big telemetry payoff.
85
+
86
+ ### Authentication
87
+ - Browser / consumer-facing (a human completes a sign-in): OAuth2 with PKCE. Do not ask for raw tokens.
88
+ - Headless / server / CI (no human present): API token as `Authorization: Bearer <APIFY_TOKEN>`, stored in an env var or secret manager, never hardcoded or logged.
89
+
90
+ Both paths are real - pick by who is present at auth time, not by which is easier.
91
+
92
+ ### Centralized HTTP layer
93
+ One base-URL constant, shared between credentials and the HTTP layer. Retries with exponential backoff on 429 and 5xx. **Never retry non-idempotent `POST /runs` on network errors** - a duplicate Actor run is a real, billed, side-effecting operation. This is the single most important correctness invariant in the HTTP layer.
94
+
95
+ ### Error taxonomy
96
+ Map Apify errors to the host platform's error categories (retryable vs auth vs permanent). Surface the API's actual error text, not a generic HTTP message. For permission-approval failures (a full-permission Actor needs explicit approval), include the approval URL after validating it is an absolute `http(s)` URL. For LLM consumers, return errors **as data** (JSON error objects), never as raised exceptions - the model needs something to read and reason about.
97
+
98
+ ### Webhooks over polling for run-finished events
99
+ When the host supports inbound webhooks, register an Apify webhook scoped to `actorId` or `actorTaskId` with the terminal statuses the user picked. Make registration **idempotent** (a re-activated workflow should not create duplicate webhooks), persist the webhook ID so deactivation can clean it up, and always provide sample/fallback data so users can test the trigger without waiting for a real run.
100
+
101
+ ### Generate from OpenAPI where the host allows it
102
+ If the host platform can generate UI fields from an OpenAPI spec, use Apify's spec (`https://apify.com/openapi.json`) and a tag allowlist. Hand-write only what the spec cannot express: convenience wrappers, bill-cap fields, lean AI-tool output contracts.
103
+
104
+ ### High-level convenience operations alongside generic runs
105
+ Generic "run Actor" serves power users. Add a few opinionated, high-level actions for the common case (e.g. "Scrape single URL" wrapping a content scraper with `maxCrawlDepth: 0`, `maxResults: 1`) so non-power users get a 2-field form instead of a full Actor configuration. Validate the URL *before* starting a paid run.
106
+
107
+ ### Testing and release
108
+ Keep two test modes: mocked (hermetic, no credentials) and live E2E (real API, CI-gated). Automate releases through the host platform's CI on Git tags / GitHub Releases. Never hand-edit versions or changelogs if a release workflow manages them.
109
+
110
+ ## Top anti-patterns to refuse on review
111
+
112
+ 1. Retrying `POST /runs` on a network error - duplicates a billed run.
113
+ 2. Unbounded `while (true)` polling - ties up the host with no ceiling.
114
+ 3. Putting `maxTotalChargeUsd` / `maxItems` inside Actor input instead of options - silently not a cap.
115
+ 4. Dumping a full dataset into an LLM context without size caps or untrusted-content fencing - prompt-injection and context blowout.
116
+ 5. One monolithic tool list for an LLM agent - routing accuracy degrades past ~8 tools; curate subsets.
117
+ 6. Surfacing a raw HTTP status/message instead of Apify's actual error text - users can't act on "400".
118
+
119
+ ## Minimal API surface every integration needs
120
+
121
+ | Purpose | Method + path |
122
+ |---|---|
123
+ | Start an Actor run | `POST /v2/actors/{actorId}/runs` |
124
+ | Start a Task run | `POST /v2/actor-tasks/{taskId}/runs` |
125
+ | Poll a run | `GET /v2/actor-runs/{runId}` |
126
+ | List runs | `GET /v2/actor-runs` |
127
+ | Dataset items | `GET /v2/datasets/{datasetId}/items` |
128
+ | KV record | `GET /v2/key-value-stores/{storeId}/records/{key}` |
129
+ | Set KV record | `PUT /v2/key-value-stores/{storeId}/records/{key}` |
130
+ | Store search | `GET /v2/store` |
131
+ | Webhook CRUD | `POST/GET/DELETE /v2/webhooks` |
132
+ | Validate token / current user | `GET /v2/users/me` |
133
+
134
+ REST reference: `https://docs.apify.com/api/v2`. OpenAPI spec: `https://apify.com/openapi.json`.
135
+
136
+ ## Working workflow
137
+
138
+ 1. Fetch `https://apify.com/agents.md` and internalize the model.
139
+ 2. Pick the integration shape above and read the matching reference file.
140
+ 3. Use Apify MCP (if available) to research the concrete Actors, schemas, and pricing the integration will expose.
141
+ 4. Draft the **capability matrix** for the chosen category (each reference has one) and the UX spec (resource -> operation -> fields -> errors).
142
+ 5. Scaffold the integration following the category-specific rules in the reference.
143
+ 6. Verify against the **definition-of-done checklist** at the end of that reference.
144
+
145
+ ## Reference implementations to study
146
+
147
+ Real, public integrations per category - read their source when in doubt:
148
+
149
+ - Workflow automation: `@apify/n8n-nodes-apify` (npm), the Apify Zapier app.
150
+ - AI agent plugins (coding agents): the Apify plugin bundle (MCP server + skills + router + slash commands) shipped for Cursor, Claude Code, Copilot, and similar tools.
151
+ - AI agent plugins (harnesses): `apify-hermes-agent-plugin` (PyPI), `@apify/apify-openclaw-plugin`.
152
+ - AI framework packages: `langchain-apify` (PyPI).
153
+ - Application integration: see `references/sdk-integration.md` for the canonical `apify-client` usage in JS/TS, Python, and over REST.
154
+
155
+ Support for integration questions: `integrations@apify.com`. Contact us both for design guidance while you build and for review/testing once you publish - we validate the capability surface, cost controls, error handling, and attribution before the integration reaches users.
156
+
157
+
158
+ ## Examples
159
+
160
+ ```text
161
+ User: Apply this skill to my current task.
162
+ Assistant: Follow the workflow in this skill, cite limitations, and ask before risky steps.
163
+ ```
164
+
165
+ ## Limitations
166
+
167
+ - Imported upstream skill; verify credentials, permissions, and safety boundaries before execution.
168
+ - Does not replace environment-specific validation, testing, or maintainer review.
@@ -0,0 +1,158 @@
1
+ # AI framework package integrations
2
+
3
+ Design guide for building a PyPI/npm package that exposes Apify to an AI/LLM framework - LangChain, LlamaIndex, Haystack, Vercel AI SDK, or similar. These are *client-side* integrations: code that calls Apify Actors from outside the Apify runtime, for applications, agents, and RAG pipelines. Apply the cross-cutting rules from `SKILL.md` on top.
4
+
5
+ ## 1. Scope: client-side only, wrap apify-client, never the Actor SDK
6
+
7
+ This package is for applications that call Apify Actors from outside the Apify runtime. It is **not** for code running *inside* an Actor. Apify Actors should run with limited permissions and use scoped tokens via the Actor SDK's `Actor.open_dataset()`; importing a framework client that reconstructs its own `ApifyClient` from an env-var token would bypass that scoping and pull an unnecessary dependency into Actor images.
8
+
9
+ Dependency philosophy: wrap the official `apify-client` library, never the `apify` SDK. `apify` is for *building* Actors; `apify-client` is for *calling* them. Keep the runtime dependency surface minimal (`langchain-core`, `apify-client`, and a backport if needed) to minimize version conflicts and keep install time short in agent environments.
10
+
11
+ Stamp a custom `user-agent` suffix (e.g. `; Origin/langchain`) or the attribution header on the client so Apify can attribute traffic.
12
+
13
+ ## 2. Layered architecture: client -> framework adapters -> public API
14
+
15
+ ```
16
+ Public API curated exports
17
+ |
18
+ +--------------------+--------------------+
19
+ | | |
20
+ Tools Document loaders Retriever
21
+ (agents) (RAG ingestion) (RAG retrieval)
22
+ | | |
23
+ ApifyToolsClient (sync)
24
+ |
25
+ apify-client (sync + async)
26
+ |
27
+ Apify REST API
28
+ ```
29
+
30
+ | Layer | Role |
31
+ |---|---|
32
+ | **Client** | Thin, synchronous wrapper over `apify-client`. One method per Actor operation. No framework types here. |
33
+ | **Tools** | Framework `BaseTool` subclasses for agent tool-calling. |
34
+ | **Document loaders** | `BaseLoader` implementations for RAG ingestion. |
35
+ | **Retriever** | `BaseRetriever` for RAG query-time retrieval. |
36
+
37
+ Framework types live only above the client layer. The client layer speaks pure Python/JS dicts and `apify-client` objects. This lets the client be unit-tested with no framework dependency, and lets the framework-facing layers focus exclusively on schema, tool semantics, and envelope formatting.
38
+
39
+ ## 3. ApifyToolsClient: one sync gateway, typed method per Actor
40
+
41
+ All Actor interaction goes through a single synchronous client class with one convenience method per supported Actor (e.g. `google_search`, `instagram_scrape`, `crawl_website`). Each method:
42
+
43
+ - Builds the Actor-specific `run_input` dict, translating from the integration's normalized parameter names to the Actor's raw input schema. (Actor schemas are idiosyncratic - `searchStringsArray`, `directUrls`, `detailsUrls` vs `listingUrls`; the client absorbs that so the tool exposes clean names like `query`, `url`, `url_type`.)
44
+ - Calls `client.actor(id).call(...)` which blocks until the run finishes.
45
+ - Checks run status and raises if the run did not reach `SUCCEEDED` (a failed run must never silently return empty results).
46
+ - Returns a `(run_details, items)` tuple (or just one where appropriate).
47
+
48
+ **Why blocking?** Callers don't manage polling loops; the API stays simple. The async surface is handled at the framework layer (`asyncio.to_thread` / `Promise.resolve`) rather than duplicating every method in async form.
49
+
50
+ Adding a new Actor tool means adding one client method (input translation + status check) and one tool class (schema + `_run`), not wiring up polling, retries, or async variants.
51
+
52
+ ## 4. Uniform JSON output envelope
53
+
54
+ All tools return a JSON string of one shape:
55
+
56
+ ```json
57
+ {"run": {"run_id": "...", "status": "...", "dataset_id": "...",
58
+ "started_at": "...", "finished_at": "..."},
59
+ "items": [...]}
60
+ ```
61
+
62
+ `run` is `null` for dataset-only tools. An optional `notice` key surfaces out-of-band hints (e.g. an Actor returned demo placeholder data on the free plan). Serialize with `default=str` so non-JSON-native types (datetimes from a `clean=True` deserialiser) never throw mid-tool-call.
63
+
64
+ A single predictable envelope lets agents parse results with one code path. The `run` metadata gives the agent enough to chain calls - run an Actor with one tool, then fetch the dataset with another using the returned `dataset_id`. End every tool description with "Use only the data returned; do not hallucinate missing fields."
65
+
66
+ ## 5. Safety clamps - defense against LLM-requested extremes
67
+
68
+ An LLM invoking a tool can request absurd values: 10,000 results, 32 GB of memory, a 1-hour timeout. Clamp every request to **developer-controlled ceilings**:
69
+
70
+ | Clamp | Default ceiling | Developer max |
71
+ |---|---|
72
+ | `timeout_secs` | 600 s |
73
+ | `memory_mbytes` | 4,096 MB (snapped to nearest valid power-of-2) | 8,192 MB |
74
+ | `items` / `limit` | 1,000 |
75
+ | `max_crawl_depth` | 5 |
76
+
77
+ Memory is notable: Apify accepts memory only as a power-of-2 (128, 256, 512, ..., 32768). Snap an arbitrary LLM value to the nearest valid step at or below the developer's cap. The default ceiling of 4,096 MB (4 GB) is generous for most Actors but well below the platform max, so LLM-requested extremes are clamped. The developer can raise the ceiling up to 8,192 MB, but an LLM cannot widen it beyond the developer-set value.
78
+
79
+ Some Actors have runtime limits not declared in their input schema (e.g. a RAG web browser rejects `maxResults > 100` at runtime). These can't be derived by schema introspection - track them by hand as overrides on the specific tool so the clamp enforces the Actor's real ceiling.
80
+
81
+ The ceilings are *developer-controlled fields* on the tool instance - an application can tighten them further, but the LLM cannot widen them. This makes the integration safe to hand to an autonomous agent without risking runaway compute costs.
82
+
83
+ ## 6. Curated tool subsets, not one monolithic list
84
+
85
+ Tools are grouped into convenience lists:
86
+
87
+ | List | Tools | Use case |
88
+ |---|---|---|
89
+ | Core | Run Actor, get dataset, run+get, scrape URL, run task, run task+get | Generic platform primitives |
90
+ | Search | Google search, web crawler, RAG web browser, Google Maps, YouTube, e-commerce | Web search & content crawling |
91
+ | Social | Instagram, LinkedIn, Twitter/X, TikTok, Facebook | Social media scraping |
92
+
93
+ Warn explicitly: **don't bind all tools at once.** Most LLMs lose routing accuracy past ~8 tools, so pick the family the agent actually needs. Curated subsets let an agent built for social-media analysis avoid distinguishing among 19 tool descriptions.
94
+
95
+ ## 7. Hand-written tools + dynamic schema for the long tail
96
+
97
+ Alongside hand-written tools (which get clean schemas and descriptions), ship one dynamic tool that takes an `actor_id` at construction, fetches the Actor's latest default build, and **generates an input model dynamically** from the build's input schema. Prune descriptions to a fixed length; limit properties to `type`, `default`, `prefill`, `enum`.
98
+
99
+ This covers the long tail of Actors without a dedicated wrapper - you don't need a hand-written tool for every one of Apify's thousands of Actors. The trade-off is a looser schema (the LLM sees the raw Actor input shape) and a network call at construction time.
100
+
101
+ ## 8. Map to the framework's idiomatic surfaces
102
+
103
+ Implement the framework's actual extension points, all backed by the same client:
104
+
105
+ | Surface | Base class | Use case |
106
+ |---|---|---|
107
+ | **Tools** | `BaseTool` | Agent tool-calling (ReAct, LangGraph) |
108
+ | **Document loaders** | `BaseLoader` | Batch RAG ingestion (load -> split -> embed -> vector store) |
109
+ | **Retriever** | `BaseRetriever` | Query-time web retrieval for RAG chains |
110
+
111
+ - A **dataset loader** loads an existing dataset by ID and maps each item to a `Document` via a user-supplied mapping function (every Actor's output schema is different, so give the user full control). Implement both eager `load()` and streaming `lazy_load()`.
112
+ - A **crawl loader** is an *active* loader: it runs a content crawler on construction, then yields `Document`s with `page_content` (markdown) and `metadata` (`source`, `title`, `crawl_depth`).
113
+ - A **search retriever** wraps a search-and-crawl Actor for low-latency interactive RAG; the async path runs the synchronous client off the event loop via `to_thread`.
114
+
115
+ ## 9. Token hygiene
116
+
117
+ One canonical token parameter/env var (e.g. `apify_token` / `APIFY_TOKEN`). If a legacy name exists (`APIFY_API_TOKEN`), honor it with a `DeprecationWarning` but reject new code that declares it. Centralize the policy in two helpers: one for explicit `__init__` signatures, one for Pydantic `model_validator(mode='before')` hooks. Store the token as a `SecretStr` (excluded from repr and serialization) and never log it.
118
+
119
+ ## 10. Content extraction: markdown-first with defensive fallbacks
120
+
121
+ When extracting page content from crawling Actors, prefer `markdown` over `text`, with a trailing `or ''` to guarantee a string even when a key is present but null. Follow a fixed fallback order for the source URL: nested `metadata.url` -> `crawledUrl` -> top-level `url`. Tolerate a `metadata` field that is missing or not a dict (some Actor responses surface `null`). Actor output shapes are inconsistent across versions and configurations; centralize one canonical fallback order so the retriever, loaders, and tools all agree on what "the content", "the source URL", and "the title" mean.
122
+
123
+ ## 11. Error mapping
124
+
125
+ - **Client layer** raises `RuntimeError` for failed/empty runs and `ValueError` for invalid input. Wrap transport errors in `RuntimeError`.
126
+ - **Tool layer** catches both and re-raises as the framework's tool-error type (e.g. `ToolException`) with `handle_tool_error = True`, which surfaces to the agent as a recoverable error message.
127
+
128
+ An agent that gets a `ToolException` can read the message and retry with corrected input. An unhandled `RuntimeError` would crash the agent loop. The boundary is clean: the client raises domain errors; the tool adapts them to the framework's tool-error protocol.
129
+
130
+ ## 12. Packaging, release, and quality bar
131
+
132
+ - Minimal runtime deps; an explicit sdist allowlist so local-only paths (`dist/`, `.venv/`, `docs/`, test fixtures) never reach the registry.
133
+ - Release via conventional-commits-driven automation that reads commit-message prefixes to auto-generate the changelog and compute the version bump; a `BREAKING CHANGE:` footer triggers a major bump. Never hand-edit `version =` or `CHANGELOG.md` if the workflow manages them.
134
+ - Strict linting (`select = ["ALL"]` with a curated ignore list), strict typing (`disallow_untyped_defs`), and **socket-disabled unit tests** so the unit suite is truly unit - no hidden integration dependencies. Integration tests need a real token (CI only).
135
+
136
+ ## 13. Position vs the Apify MCP server
137
+
138
+ The README's top banner should direct users to Apify's MCP server (`https://mcp.apify.com`) as a richer, more featureful alternative for interactive agent workflows that need dynamic Actor discovery. The package is not deprecated, but the MCP path is recommended for new interactive agent sessions.
139
+
140
+ The positioning: the package is the **programmatic, typed, registry-installable** option for code that outlives a single agent session (servers, scheduled jobs, pipelines); the MCP server is the **interactive, dynamic** option. Rather than compete, position them for their respective audiences.
141
+
142
+ ## Definition-of-done checklist
143
+
144
+ - [ ] Package is client-side only; depends on `apify-client`, never `apify`.
145
+ - [ ] Layered: thin client (no framework types) -> framework adapters -> curated public API.
146
+ - [ ] One synchronous client with a typed method per supported Actor; input normalization centralized.
147
+ - [ ] All tools return the uniform JSON envelope; serialization never throws on non-native types.
148
+ - [ ] Developer-controlled safety clamps (timeout, memory power-of-2, items, depth) are in place; hand-tracked runtime limits override specific tools.
149
+ - [ ] Tools grouped into curated subsets; documentation warns against binding all at once.
150
+ - [ ] A dynamic-schema tool covers the long tail of Actors.
151
+ - [ ] Framework surfaces (tools / loaders / retriever) all backed by the same client.
152
+ - [ ] One canonical token name; legacy alias emits a deprecation warning; token is `SecretStr`, never logged.
153
+ - [ ] Content extraction is markdown-first with documented fallback order.
154
+ - [ ] Client raises domain errors; tools adapt them to the framework's tool-error protocol.
155
+ - [ ] sdist allowlist excludes local paths; release automation drives versioning.
156
+ - [ ] Unit tests are socket-disabled; lint/typing are strict.
157
+ - [ ] README cross-references the MCP server for interactive/dynamic use.
158
+ - [ ] Attribution header / user-agent suffix is set on the client; skill-origin header included if built from this skill.
@@ -0,0 +1,192 @@
1
+ # AI agent plugin integrations
2
+
3
+ Design guide for building an Apify plugin that gives an AI agent access to Actors. There are **two plugin shapes**, and which one you build depends on the host:
4
+
5
+ - **Approach A - Coding agent plugin (skills + MCP bundle):** for skills/MCP-aware coding assistants like Cursor, Claude Code, Codex, and GitHub Copilot. You assemble a small set of runtime artifacts the host already knows how to load, and the hosted Apify MCP server (`https://mcp.apify.com`) provides the tool surface. Minimal code.
6
+ - **Approach B - Harness / assistant plugin (custom tool registry):** for agent runtimes like OpenClaw-style runtimes and Hermes-style harnesses that have their own tool registry and config file. You build a small custom toolset (`discover` / `start` / `collect`) backed by the `apify-client` SDK, using a stored credential rather than per-session OAuth.
7
+
8
+ Apply the cross-cutting rules from `SKILL.md` on top of either approach.
9
+
10
+ ## Which approach? Trade-offs
11
+
12
+ | Dimension | A - Coding agent plugin (skills + MCP) | B - Harness / assistant plugin (custom registry) |
13
+ |---|---|---|
14
+ | Target hosts | Cursor, Claude Code, Codex, GitHub Copilot | OpenClaw-style runtimes, Hermes-style harnesses, custom tool-calling agents |
15
+ | Tool surface | Hosted Apify MCP server - no tool code to write | You implement `discover` / `start` / `collect` yourself |
16
+ | Auth | OAuth (MCP) / `apify login` (CLI) / `APIFY_TOKEN` (SDK), per route | Stored API key resolved by the plugin, passed to `apify-client` |
17
+ | Build effort | Low - assemble artifacts, no HTTP/retry/registry code | Higher - tools, schema, error taxonomy, host gotchas |
18
+ | Capabilities | Run existing Actors **and** build/test/deploy new Actors **and** integrate an app | Broker the Store to the agent (run existing Actors) |
19
+ | Maintenance | The MCP server owns the runtime surface | You own the tool code plus host-SDK compatibility |
20
+ | Best when | The host supports skills/MCP and you want the fastest path | The host has its own registry and needs bespoke tools |
21
+
22
+ If the host is a skills/MCP-aware coding tool, prefer Approach A. If the host is a custom harness with its own registry (no MCP), use Approach B. A product can ship both over time - start with whichever matches the primary host.
23
+
24
+ ---
25
+
26
+ # Approach A - Coding agent plugin (skills + MCP bundle)
27
+
28
+ For skills/MCP-aware coding assistants (Cursor, Claude Code, Codex, GitHub Copilot). This section describes the **installed plugin** - what the user gets and how the pieces interact at runtime - not how the bundle is produced.
29
+
30
+ ## A.1 The four runtime artifacts
31
+
32
+ | Artifact | Role at runtime |
33
+ |---|---|
34
+ | **MCP server** | Registers `https://mcp.apify.com` with the host and exposes the callable tool surface (below). OAuth: the user signs in via browser on the first tool call that needs auth - no token in config. |
35
+ | **Skills** | On-demand `SKILL.md` instruction documents. The host matches each skill's `description` against user intent and loads the body into context only when relevant, keeping baseline context small. |
36
+ | **Subagent / router** | The entry point. Classifies the request into one of three routes, selects the transport (MCP vs CLI), and invokes the matching skill or tools. |
37
+ | **Slash commands** | User-invoked entry points (e.g. `/create-actor <description>`) that drive a guided end-to-end workflow. |
38
+
39
+ **MCP tool surface** once connected: `search-actors` (search the Store), `fetch-actor-details` (input schema, output format, pricing), `call-actor` (run with input JSON), `get-actor-run` (poll status), `get-dataset-items` (fetch results), `search-apify-docs` / `fetch-apify-docs` (docs). The discovery subset (`search-actors`, `fetch-actor-details`, `search-apify-docs`, `fetch-apify-docs`) works without an account.
40
+
41
+ ## A.2 The three routes the plugin serves
42
+
43
+ The router classifies every request and routes it:
44
+
45
+ | Signal | Route | How it runs |
46
+ |---|---|---|
47
+ | Use existing Actors (search, run, get data) | 1 | MCP tools directly; the CLI is the fallback when MCP is unavailable |
48
+ | Build / test / deploy a custom Actor | 2 | Apify CLI (`apify create` / `run` / `push`) - local filesystem, no MCP equivalent |
49
+ | Add Apify to an existing app | 3 | `apify-client` over HTTPS - neither MCP nor CLI |
50
+
51
+ **MCP-vs-CLI selection (Route 1 only).** Detect transports once: MCP is available if a tool named `search-actors` is in the tool list; CLI is available if `apify --help` exits 0. Prefer MCP when present (no shell/install friction, OAuth auth); fall back to the CLI otherwise. Routes 2 and 3 are unaffected.
52
+
53
+ **Naming trap.** The `apify` npm package is the **SDK for building** Actors (Route 2). The `apify-client` package is the **API client for calling** Actors (Route 3). Never confuse them.
54
+
55
+ **Auth per route:** Route 1 (MCP) OAuth via browser prompt, never ask for a token; Route 1 CLI fallback + Route 2 `apify login --token <TOKEN>` once (the CLI ignores `APIFY_TOKEN`); Route 3 the `APIFY_TOKEN` env var.
56
+
57
+ ## A.3 Definition of done (Approach A)
58
+
59
+ - [ ] MCP declared and reachable - `https://mcp.apify.com` registered and its tools appear in the tool list.
60
+ - [ ] OAuth works - the first auth-requiring MCP call prompts a browser sign-in; no token in config.
61
+ - [ ] Skills load by intent - each skill's `description` matches its requests; bodies load only when relevant.
62
+ - [ ] Router classifies correctly - requests land on Route 1 / 2 / 3; ambiguous ones ask the user to choose.
63
+ - [ ] Transport selection correct - Route 1 prefers MCP and falls back to CLI cleanly; Routes 2/3 use CLI/SDK.
64
+ - [ ] Auth wired per route; the `apify` vs `apify-client` distinction is never confused.
65
+ - [ ] Cost caps honored (`maxTotalChargeUsd` / `maxItems`) and attribution headers set (see `SKILL.md`).
66
+ - [ ] Slash command (e.g. `/create-actor`) runs end to end.
67
+ - [ ] Verified inside the actual target tool, not just in isolation.
68
+
69
+ ---
70
+
71
+ # Approach B - Harness / assistant plugin (custom tool registry)
72
+
73
+ For agent runtimes with their own tool registry (OpenClaw-style runtimes, Hermes-style harnesses, or any custom tool-calling agent). The plugin brokers the entire Apify Store to the agent - it does not bundle scrapers.
74
+
75
+ The harness runs locally/persistently, has its own tool registry and config file, and calls Apify with a stored credential rather than per-session OAuth. So this shape borrows from the "API token + apify-client" path, not the MCP path.
76
+
77
+ ## 1. Shape decision: few composable tools vs a dynamic tool list
78
+
79
+ Decide based on what the harness supports:
80
+
81
+ - **Static tool registry** (tools registered once at plugin load, no per-Actor materialization): register a **small, fixed set of composable tools** and let the LLM compose them. This keeps the prompt budget small and the call graph legible.
82
+ - **Dynamic tool registration** (the harness can materialize tools at runtime): you *can* expose a dynamic per-Actor tool list, but a fixed trio is still simpler and usually enough.
83
+
84
+ The MCP server's surface (search / inspect / call / poll / fetch as separate dynamic tools) is one shape. A harness plugin is a different shape - do not copy it blindly.
85
+
86
+ ## 2. Canonical action set: discover / start / collect
87
+
88
+ Three tools cover the entire workflow and map cleanly to the asynchronous REST flow (`POST /runs` -> poll `GET /actor-runs/{id}` -> `GET /datasets/{id}/items`):
89
+
90
+ | Tool | Purpose | Why |
91
+ |---|---|---|
92
+ | **discover** | Search Apify Store by keyword, OR fetch a single Actor's input schema + README by `actorId` | Two modes in one tool: an LLM that just got a list of Actor IDs almost always wants to inspect one next; splitting would double round-trips |
93
+ | **start** | Fire-and-forget batch starts (cap batch size, e.g. 10 per call). Accepts cost limiting params (`maxTotalChargeUsd`, `maxItems`) sent as run options, never Actor input | Returns run references (`run_id`, `actor_id`, `default_dataset_id`, optional label) immediately without waiting |
94
+ | **collect** | Poll run statuses and return completed dataset results | Re-call with the same run refs until `all_done` is true; return pending / completed / errored runs in separate arrays so the LLM keeps iterating on the pending ones |
95
+
96
+ `collect` is the only one that needs to be async - it polls runs concurrently (`asyncio.gather` / `Promise.allSettled`) and pushes blocking SDK calls off the event loop. The other two are fast and single-shot.
97
+
98
+ ## 3. Two-phase async execution - never block the agent
99
+
100
+ Actors run for seconds to minutes. **Do not block the agent's single execution thread on a multi-minute run.** Split start and collect:
101
+
102
+ - `start` fires the run and returns immediately with a `runId` / `datasetId` reference.
103
+ - `collect` polls status and fetches dataset items only once the run reaches a terminal status.
104
+
105
+ This lets the agent kick off a run, do other useful work (or start more runs in parallel), and come back to collect. `collect` handles multiple runs in one call and reports `completed` / `pending` / `errors` separately so the agent knows whether to poll again.
106
+
107
+ Do **not** use the synchronous `run-sync-get-dataset-items` endpoint - its 300-second ceiling is shorter than many Actor runs.
108
+
109
+ ## 4. The tool description is the agent's instruction manual
110
+
111
+ There are no separate Agent Skills inside a harness plugin - the tool description plus the `discover` action provide all the guidance the agent needs. Embed, in plain text:
112
+
113
+ - A directive to **delegate to a sub-agent** that returns only relevant extracted fields, not raw dataset dumps - keeping the parent agent's context window clean.
114
+ - A **batching** instruction: most Actors accept arrays of URLs/queries; one run with 5 URLs is cheaper and faster than 5 runs with 1 URL each.
115
+ - A compact **known-actors list** (Instagram, Facebook, TikTok, YouTube, Twitter/X, Google Maps, Booking, TripAdvisor, etc.) so the agent can pick a familiar Actor without a discovery round-trip.
116
+ - The Actor ID format, the discover -> start -> collect workflow, and a support contact for user-facing issues.
117
+
118
+ Hand the agent a short, self-contained instruction set so it can act without external lookups.
119
+
120
+ ## 5. Treat scraped content as untrusted and bounded
121
+
122
+ Dataset results are arbitrary web data - they can contain text that *looks* like instructions to the LLM. Wrap every dataset before it reaches the model:
123
+
124
+ - Insert boundary markers: `<<<EXTERNAL_UNTRUSTED_CONTENT>>>` ... `<<<END_EXTERNAL_UNTRUSTED_CONTENT>>>` plus a source metadata line (`apify:<actorId>`).
125
+ - **Sanitize** any attempt to forge those markers from within the scraped data.
126
+ - Cap the payload size (e.g. 50,000 chars) with a `[\u2026truncated]` marker.
127
+ - Cap item count (e.g. `limit` default 100 per run); if the fetched count equals the limit, set `may_have_more: true` and warn so the LLM can re-call with a higher limit.
128
+
129
+ This is the plugin's analogue of the "keep the run small" cost guidance, applied at *read* time.
130
+
131
+ ## 6. Errors are data, never raised
132
+
133
+ Every handler catches broadly and returns a **JSON error object**, never a raised exception:
134
+
135
+ ```
136
+ except Exception as exc:
137
+ return {'error': str(exc)}
138
+ ```
139
+
140
+ Why: a raised exception **crashes the tool call** from the harness's perspective. Returning `{'error': ...}` lets the LLM read the failure, explain it to the user, and decide whether to retry or stop. Extend this to per-run granularity in `start`: a batch can partially succeed, so each failed spec becomes an entry in an `errors` array while successful ones populate `runs`. The LLM can then report "7 of 10 started, 3 failed with these messages" without a second call.
141
+
142
+ ## 7. Auth and setup
143
+
144
+ - API key resolution order: plugin config field -> `APIFY_API_KEY` (or `APIFY_TOKEN`) env var. Normalize pasted input - strip line/paragraph separators and trim whitespace (defends against copy-paste artifacts).
145
+ - The key is **never** included in tool output, **never** logged, only passed to the client constructor.
146
+ - Validate `baseUrl` against an allowlist prefix (`https://api.apify.com`) to prevent SSRF - a misconfigured plugin must not point at an arbitrary host.
147
+ - Ship a `setup` CLI command that prompts for the key, **verifies it against the live API** (`GET /v2/users/me`), and writes config. **Reuse the host's config-merge logic** for enabling the toolset - do not reimplement it. Host internals reconcile disabled-toolsets, preserve MCP server entries, and handle bookkeeping a from-scratch reimplementation would silently break. If the config-write API is unavailable or fails, fall back to printing the exact config block the user should add manually. Treat setup failures as non-fatal: the token is already saved, so the user can flip the toolset on themselves.
148
+
149
+ If the harness's `register()` is synchronous and the loader does not `await` it (a common gotcha), keep registration fully synchronous - build the tool (construct a client + schema, no I/O) and register inline. Any network call happens later inside a tool `execute` or CLI action, where async is expected.
150
+
151
+ ## 8. SDK handling and attribution
152
+
153
+ Use the official `apify-client` SDK (JS or Python), not raw HTTP. Construct the client once, memoized, and rebuilt only when the token changes. Stamp the attribution headers on every request: `x-apify-integration-platform: <your-harness>` and `x-apify-integration-ai-tool: true`. If the integration was built using the Apify integration development skill, also set `x-apify-integration-origin: apify-integration-development-skill`. This is the single most important line for Apify's side of the relationship.
154
+
155
+ **Compatibility shim:** SDK versions return a mix of Pydantic models and plain dicts, and Pydantic models expose only **snake_case** attributes even when the JSON is **camelCase**. Route *all* response reads through a small `_attr(obj, key, default)` helper that handles either shape. Direct `.attr` / `["key"]` access will silently return defaults on a mismatch.
156
+
157
+ ## 9. Host integration gotchas
158
+
159
+ - **Entry-point loader semantics:** verify how the harness's loader resolves the plugin entry-point string before writing the packaging line. Some loaders expect a bare module (then `getattr(result, "register")`); others expect `"module:attr"`. Copying the wrong form silently fails to load. Document it with a long comment.
160
+ - **Schema validator constraints:** many harness validators reject `anyOf` / `oneOf` / `allOf`. Use a string enum for any discriminated `action` field, `Optional(...)` for optionals (never a nullable union), and a flat `Record(string, unknown)` for `input` (the Actor's real schema is only knowable after a `discover` call). A discriminated `action` plus optional sibling fields is the only shape the validator accepts.
161
+ - **Inlined utilities:** if the harness's plugin SDK does not export small helpers (error types, secret normalization, content wrapping), inline stable copies rather than deep-importing internals. Internal file layouts change frequently; deep imports couple the plugin to them. Accept the trade-off that upstream bug fixes won't track.
162
+
163
+ ## 10. Actor ID format: tilde, not slash
164
+
165
+ Use `username~actor-name` everywhere an Actor ID appears: tool descriptions, `discover` results, `start`/`collect` payloads. The REST API uses `/` as a path delimiter, so a slash-separated ID in a URL is ambiguous. The tilde form is unambiguous and what the SDK and Store APIs accept directly. Build slugs in this form so the agent can pass them straight through to `start` without transformation.
166
+
167
+ ## 11. Dependency injection for tests
168
+
169
+ The tool factory should accept an optional injected `client`. When omitted, construct a real client from the resolved key; when provided (in tests), bypass it entirely. This lets the test suite exercise every action and edge case - store search, schema fetch, run start, collect success/pending, unknown action, missing key - with no network access, using a hand-rolled mock shaped to the SDK's method-chain surface. No mocking framework needed.
170
+
171
+ ## 12. Known gaps to design for
172
+
173
+ 1. **Poll vs webhook.** `collect` is an LLM-driven poll loop; long-running Actors mean multiple round-trips. A webhook-backed `collect` would be cheaper but requires the harness to expose a callback surface.
174
+ 2. **Account-free discovery.** If the harness's `check_fn` gates all tools on a token, `discover` requires an account even for research. Consider giving `discover` a separate, looser check so users can browse before connecting.
175
+ 3. **Surface scope.** Only the basic run-start -> poll -> fetch-dataset flow is exposed. Standby runs, Tasks, and schedules may be out of scope for v0.1 - document the boundary.
176
+
177
+ ## Definition-of-done checklist (Approach B)
178
+
179
+ - [ ] Fixed, small set of composable tools (`discover` / `start` / `collect`) registered; dynamic list only if the harness truly supports it.
180
+ - [ ] Two-phase async: `start` returns refs, `collect` polls; no blocking on long runs.
181
+ - [ ] Tool description carries known-actors list, batching instruction, and delegation directive.
182
+ - [ ] Dataset output is untrusted-content fenced, size-capped, and marker-sanitized.
183
+ - [ ] Errors are returned as data, never raised; partial batch failures are per-item.
184
+ - [ ] Setup command verifies the token, reuses host config-merge, and has a manual fallback.
185
+ - [ ] Attribution headers (`-platform`, `-ai-tool`, and `-origin`) are set on the client.
186
+ - [ ] All SDK response reads go through a compatibility shim.
187
+ - [ ] Entry-point loader semantics verified; `register()` is synchronous if the loader does not await.
188
+ - [ ] Schema uses string enums + `Optional`, no `anyOf`/`oneOf`; `input` is a record.
189
+ - [ ] Actor IDs use the tilde form in all user/agent-facing surfaces.
190
+ - [ ] Tool factory accepts an injected client; tests run with no network.
191
+ - [ ] Known gaps (webhook, account-free discovery) are documented, not hidden.
192
+ - [ ] Cost cap (`maxTotalChargeUsd` / `maxItems`) is plumbed through as run options on `start`, never Actor input.