opencode-skills-collection 4.0.69 → 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 (185) hide show
  1. package/bundled-skills/.antigravity-install-manifest.json +39 -1
  2. package/bundled-skills/api-integration-architect/SKILL.md +241 -0
  3. package/bundled-skills/apify-generate-output-schema/SKILL.md +438 -0
  4. package/bundled-skills/apify-integration-development/SKILL.md +168 -0
  5. package/bundled-skills/apify-integration-development/references/ai-framework-package.md +158 -0
  6. package/bundled-skills/apify-integration-development/references/ai-harness-plugin.md +192 -0
  7. package/bundled-skills/apify-integration-development/references/sdk-integration.md +236 -0
  8. package/bundled-skills/apify-integration-development/references/workflow-automation.md +163 -0
  9. package/bundled-skills/architecture-review/README.md +42 -0
  10. package/bundled-skills/architecture-review/SKILL.md +77 -0
  11. package/bundled-skills/architecture-review/examples.md +11 -0
  12. package/bundled-skills/architecture-review/reference/best-practices.md +7 -0
  13. package/bundled-skills/architecture-review/reference/capabilities.md +20 -0
  14. package/bundled-skills/architecture-review/reference/fallbacks.md +11 -0
  15. package/bundled-skills/architecture-review/reference/graph.md +15 -0
  16. package/bundled-skills/architecture-review/reference/mcp.md +14 -0
  17. package/bundled-skills/architecture-review/reference/workflow.md +15 -0
  18. package/bundled-skills/architecture-review/templates/architecture-review.md +21 -0
  19. package/bundled-skills/code-review-sensei/SKILL.md +177 -0
  20. package/bundled-skills/codebase-onboarding/README.md +42 -0
  21. package/bundled-skills/codebase-onboarding/SKILL.md +77 -0
  22. package/bundled-skills/codebase-onboarding/examples.md +11 -0
  23. package/bundled-skills/codebase-onboarding/reference/best-practices.md +7 -0
  24. package/bundled-skills/codebase-onboarding/reference/capabilities.md +20 -0
  25. package/bundled-skills/codebase-onboarding/reference/fallbacks.md +11 -0
  26. package/bundled-skills/codebase-onboarding/reference/graph.md +15 -0
  27. package/bundled-skills/codebase-onboarding/reference/mcp.md +14 -0
  28. package/bundled-skills/codebase-onboarding/reference/workflow.md +15 -0
  29. package/bundled-skills/codebase-onboarding/templates/repository-onboarding.md +21 -0
  30. package/bundled-skills/connection-auth-rules/SKILL.md +199 -0
  31. package/bundled-skills/connection-auth-rules/fetch_schema.py +320 -0
  32. package/bundled-skills/dependency-analysis/README.md +42 -0
  33. package/bundled-skills/dependency-analysis/SKILL.md +76 -0
  34. package/bundled-skills/dependency-analysis/examples.md +11 -0
  35. package/bundled-skills/dependency-analysis/reference/best-practices.md +7 -0
  36. package/bundled-skills/dependency-analysis/reference/capabilities.md +20 -0
  37. package/bundled-skills/dependency-analysis/reference/fallbacks.md +11 -0
  38. package/bundled-skills/dependency-analysis/reference/graph.md +15 -0
  39. package/bundled-skills/dependency-analysis/reference/mcp.md +14 -0
  40. package/bundled-skills/dependency-analysis/reference/workflow.md +15 -0
  41. package/bundled-skills/dependency-analysis/templates/dependency-review.md +21 -0
  42. package/bundled-skills/devops-pipeline-builder/SKILL.md +200 -0
  43. package/bundled-skills/eas-app-stores/SKILL.md +197 -0
  44. package/bundled-skills/eas-app-stores/agents/openai.yaml +4 -0
  45. package/bundled-skills/eas-app-stores/references/app-store-metadata.md +497 -0
  46. package/bundled-skills/eas-app-stores/references/ios-app-store.md +376 -0
  47. package/bundled-skills/eas-app-stores/references/native-ios.md +167 -0
  48. package/bundled-skills/eas-app-stores/references/play-store.md +244 -0
  49. package/bundled-skills/eas-app-stores/references/testflight.md +62 -0
  50. package/bundled-skills/eas-app-stores/references/workflows.md +120 -0
  51. package/bundled-skills/eas-hosting/SKILL.md +448 -0
  52. package/bundled-skills/eas-hosting/agents/openai.yaml +4 -0
  53. package/bundled-skills/eas-observe/SKILL.md +75 -0
  54. package/bundled-skills/eas-observe/agents/openai.yaml +4 -0
  55. package/bundled-skills/eas-observe/references/metrics.md +98 -0
  56. package/bundled-skills/eas-observe/references/queries.md +403 -0
  57. package/bundled-skills/eas-observe/references/setup.md +476 -0
  58. package/bundled-skills/eas-observe/references/third-party.md +136 -0
  59. package/bundled-skills/eas-simulator/SKILL.md +251 -0
  60. package/bundled-skills/eas-simulator/agents/openai.yaml +4 -0
  61. package/bundled-skills/eas-simulator/references/controllers.md +135 -0
  62. package/bundled-skills/eas-simulator/references/run-your-app.md +240 -0
  63. package/bundled-skills/eas-simulator/references/troubleshooting.md +47 -0
  64. package/bundled-skills/eas-workflows/SKILL.md +119 -0
  65. package/bundled-skills/eas-workflows/agents/openai.yaml +4 -0
  66. package/bundled-skills/eas-workflows/scripts/fetch.js +109 -0
  67. package/bundled-skills/expo-animation/LICENSE +21 -0
  68. package/bundled-skills/expo-animation/RECIPES.md +385 -0
  69. package/bundled-skills/expo-animation/SKILL.md +295 -0
  70. package/bundled-skills/expo-animation/agents/openai.yaml +4 -0
  71. package/bundled-skills/fact-check-x-unified/SKILL.md +178 -0
  72. package/bundled-skills/fact-check-x-unified/agents/openai.yaml +4 -0
  73. package/bundled-skills/fact-check-x-unified/references/acceptance-criteria.md +44 -0
  74. package/bundled-skills/fact-check-x-unified/references/contracts.md +39 -0
  75. package/bundled-skills/fact-check-x-unified/scripts/common.py +31 -0
  76. package/bundled-skills/fact-check-x-unified/scripts/fact_check_x.py +1832 -0
  77. package/bundled-skills/fact-check-x-unified/scripts/trusted_search_config.py +324 -0
  78. package/bundled-skills/fact-check-x-unified/tests/anchor_downgrade_test.py +90 -0
  79. package/bundled-skills/fact-check-x-unified/tests/multi_platform_test.py +369 -0
  80. package/bundled-skills/fact-check-x-unified/tests/smoke_test.py +740 -0
  81. package/bundled-skills/fact-check-x-unified/tests/stage_checkpoint_test.py +103 -0
  82. package/bundled-skills/fact-check-x-unified/tests/trusted_search_config_test.py +156 -0
  83. package/bundled-skills/gpt-taste/SKILL.md +8 -1
  84. package/bundled-skills/hf-cli/SKILL.md +263 -0
  85. package/bundled-skills/huggingface-community-evals/SKILL.md +228 -0
  86. package/bundled-skills/huggingface-community-evals/examples/.env.example +3 -0
  87. package/bundled-skills/huggingface-community-evals/examples/USAGE_EXAMPLES.md +101 -0
  88. package/bundled-skills/huggingface-community-evals/scripts/inspect_eval_uv.py +104 -0
  89. package/bundled-skills/huggingface-community-evals/scripts/inspect_vllm_uv.py +306 -0
  90. package/bundled-skills/huggingface-community-evals/scripts/lighteval_vllm_uv.py +297 -0
  91. package/bundled-skills/huggingface-datasets/SKILL.md +130 -0
  92. package/bundled-skills/jev-social/SKILL.md +182 -0
  93. package/bundled-skills/longbridge-derivatives/SKILL.md +117 -0
  94. package/bundled-skills/longbridge-derivatives/references/option.md +36 -0
  95. package/bundled-skills/longbridge-derivatives/references/options-advanced.md +101 -0
  96. package/bundled-skills/longbridge-derivatives/references/options-pnl.md +74 -0
  97. package/bundled-skills/longbridge-derivatives/references/options-strategy.md +82 -0
  98. package/bundled-skills/longbridge-derivatives/references/options-volatility.md +70 -0
  99. package/bundled-skills/longbridge-derivatives/references/warrant.md +12 -0
  100. package/bundled-skills/longbridge-quant/SKILL.md +151 -0
  101. package/bundled-skills/longbridge-quant/references/correlation.md +51 -0
  102. package/bundled-skills/longbridge-quant/references/execution-model.md +68 -0
  103. package/bundled-skills/longbridge-quant/references/factor-research.md +95 -0
  104. package/bundled-skills/longbridge-quant/references/factor-screen.md +101 -0
  105. package/bundled-skills/longbridge-quant/references/hedging.md +136 -0
  106. package/bundled-skills/longbridge-quant/references/ml-strategy.md +77 -0
  107. package/bundled-skills/longbridge-quant/references/multifactor.md +68 -0
  108. package/bundled-skills/longbridge-quant/references/pairs-trading.md +61 -0
  109. package/bundled-skills/longbridge-quant/references/quant-cli.md +133 -0
  110. package/bundled-skills/longbridge-quant/references/quant-stats.md +150 -0
  111. package/bundled-skills/longbridge-quant/references/seasonality.md +50 -0
  112. package/bundled-skills/longbridge-quant/references/strategy-optimizer.md +68 -0
  113. package/bundled-skills/longbridge-quant/references/volatility-strategy.md +52 -0
  114. package/bundled-skills/longbridge-research/SKILL.md +187 -0
  115. package/bundled-skills/longbridge-research/references/company-profile.md +96 -0
  116. package/bundled-skills/longbridge-research/references/company-tearsheet.md +82 -0
  117. package/bundled-skills/longbridge-research/references/competitive-analysis.md +81 -0
  118. package/bundled-skills/longbridge-research/references/consensus.md +92 -0
  119. package/bundled-skills/longbridge-research/references/coverage-initiation.md +76 -0
  120. package/bundled-skills/longbridge-research/references/defi-yield.md +60 -0
  121. package/bundled-skills/longbridge-research/references/finance-calendar.md +165 -0
  122. package/bundled-skills/longbridge-research/references/financial-planning.md +77 -0
  123. package/bundled-skills/longbridge-research/references/forecast-eps.md +39 -0
  124. package/bundled-skills/longbridge-research/references/fund-holder.md +44 -0
  125. package/bundled-skills/longbridge-research/references/hkipo-analysis.md +101 -0
  126. package/bundled-skills/longbridge-research/references/industry-peers.md +46 -0
  127. package/bundled-skills/longbridge-research/references/industry-rank.md +62 -0
  128. package/bundled-skills/longbridge-research/references/insider-trades.md +48 -0
  129. package/bundled-skills/longbridge-research/references/institution-rating.md +62 -0
  130. package/bundled-skills/longbridge-research/references/investment-ideas.md +69 -0
  131. package/bundled-skills/longbridge-research/references/investment-proposal.md +95 -0
  132. package/bundled-skills/longbridge-research/references/investors.md +87 -0
  133. package/bundled-skills/longbridge-research/references/onchain.md +70 -0
  134. package/bundled-skills/longbridge-research/references/post-investment.md +76 -0
  135. package/bundled-skills/longbridge-research/references/shareholder.md +72 -0
  136. package/bundled-skills/longbridge-research/references/short-positions.md +50 -0
  137. package/bundled-skills/longbridge-research/references/short-trades.md +50 -0
  138. package/bundled-skills/longbridge-research/references/stock-research.md +61 -0
  139. package/bundled-skills/longbridge-research/references/thesis-tracker.md +64 -0
  140. package/bundled-skills/makepad-2-0-animation/SKILL.md +318 -0
  141. package/bundled-skills/makepad-2-0-animation/references/animator-reference.md +433 -0
  142. package/bundled-skills/makepad-2-0-dsl/SKILL.md +492 -0
  143. package/bundled-skills/makepad-2-0-dsl/references/dsl-syntax-reference.md +511 -0
  144. package/bundled-skills/makepad-2-0-dsl/references/extended-guide.md +56 -0
  145. package/bundled-skills/makepad-2-0-dsl/references/property-system.md +757 -0
  146. package/bundled-skills/makepad-2-0-events/SKILL.md +497 -0
  147. package/bundled-skills/makepad-2-0-events/references/event-patterns.md +802 -0
  148. package/bundled-skills/makepad-2-0-events/references/extended-guide.md +590 -0
  149. package/bundled-skills/makepad-2-0-layout/SKILL.md +499 -0
  150. package/bundled-skills/makepad-2-0-layout/references/extended-guide.md +243 -0
  151. package/bundled-skills/makepad-2-0-layout/references/layout-patterns.md +881 -0
  152. package/bundled-skills/makepad-2-0-widgets/SKILL.md +261 -0
  153. package/bundled-skills/makepad-2-0-widgets/references/widget-advanced.md +648 -0
  154. package/bundled-skills/makepad-2-0-widgets/references/widget-catalog.md +547 -0
  155. package/bundled-skills/meeting-distiller-pro/SKILL.md +120 -0
  156. package/bundled-skills/monte-carlo-analyze-root-cause/SKILL.md +12 -1
  157. package/bundled-skills/monte-carlo-asset-health/SKILL.md +12 -1
  158. package/bundled-skills/monte-carlo-context-detection/SKILL.md +170 -0
  159. package/bundled-skills/monte-carlo-context-detection/references/signal-definitions.md +46 -0
  160. package/bundled-skills/remotion-captions/SKILL.md +57 -0
  161. package/bundled-skills/remotion-captions/agents/openai.yaml +7 -0
  162. package/bundled-skills/remotion-captions/assets/remotion-icon.svg +4 -0
  163. package/bundled-skills/remotion-captions/display-captions.md +190 -0
  164. package/bundled-skills/remotion-captions/import-srt-captions.md +73 -0
  165. package/bundled-skills/remotion-captions/transcribe-captions.md +70 -0
  166. package/bundled-skills/remotion-create/SKILL.md +106 -0
  167. package/bundled-skills/remotion-create/agents/openai.yaml +7 -0
  168. package/bundled-skills/remotion-create/assets/remotion-icon.svg +4 -0
  169. package/bundled-skills/remotion-create/tailwind.md +11 -0
  170. package/bundled-skills/remotion-create/video-layout.md +9 -0
  171. package/bundled-skills/remotion-docs/SKILL.md +67 -0
  172. package/bundled-skills/remotion-docs/agents/openai.yaml +7 -0
  173. package/bundled-skills/remotion-docs/assets/remotion-icon.svg +4 -0
  174. package/bundled-skills/remotion-interactivity/SKILL.md +270 -0
  175. package/bundled-skills/remotion-interactivity/agents/openai.yaml +7 -0
  176. package/bundled-skills/remotion-interactivity/assets/remotion-icon.svg +4 -0
  177. package/bundled-skills/remotion-render/SKILL.md +48 -0
  178. package/bundled-skills/remotion-render/agents/openai.yaml +7 -0
  179. package/bundled-skills/remotion-render/assets/remotion-icon.svg +4 -0
  180. package/bundled-skills/remotion-render/transparent-videos.md +106 -0
  181. package/bundled-skills/saas-pricing-strategist/SKILL.md +169 -0
  182. package/bundled-skills/score-eval/SKILL.md +35 -0
  183. package/bundled-skills/writing-guidelines/SKILL.md +60 -0
  184. package/package.json +1 -1
  185. package/skills_index.json +980 -3
@@ -0,0 +1,438 @@
1
+ ---
2
+ name: apify-generate-output-schema
3
+ description: Generate output schemas (dataset_schema.json, output_schema.json, key_value_store_schema.json)
4
+ for an Apify Actor by analyzing its source code. Use when creating or updating Actor
5
+ output schemas.
6
+ source_repo: apify/agent-skills
7
+ source_type: official
8
+ source: apify
9
+ date_added: '2026-09-21'
10
+ risk: unknown
11
+ ---
12
+ ## When to Use
13
+ - Use when this upstream workflow matches the user's stated goal.
14
+ - Use when the task requires the procedures documented in this skill.
15
+
16
+ # Generate Actor output schema
17
+
18
+ You are generating output schema files for an Apify Actor. The output schema tells Apify Console how to display run results. You will analyze the Actor's source code, create `dataset_schema.json`, `output_schema.json`, and `key_value_store_schema.json` (if the Actor uses key-value store), and update `actor.json`.
19
+
20
+ ## Core principles
21
+
22
+ - **Analyze code first**: Read the Actor's source to understand what data it actually pushes to the dataset — never guess
23
+ - **Every field is nullable**: APIs and websites are unpredictable — always set `"nullable": true`
24
+ - **Anonymize examples**: Never use real user IDs, usernames, or personal data in examples
25
+ - **Verify against code**: If TypeScript types exist, cross-check the schema against both the type definition AND the code that produces the values
26
+ - **Reuse existing patterns**: Before generating schemas, check if other Actors in the same repository already have output schemas — match their structure, naming conventions, description style, and formatting
27
+ - **Don't reinvent the wheel**: Reuse existing type definitions, interfaces, and utilities from the codebase instead of creating duplicate definitions
28
+
29
+ ---
30
+
31
+ ## Phase 1: Discover Actor structure
32
+
33
+ **Goal**: Locate the Actor and understand its output
34
+
35
+ Initial request: $ARGUMENTS
36
+
37
+ **Actions**:
38
+ 1. Create todo list with all phases
39
+ 2. Find the `.actor/` directory containing `actor.json`
40
+ 3. Read `actor.json` to understand the Actor's configuration
41
+ 4. Check if `dataset_schema.json`, `output_schema.json`, and `key_value_store_schema.json` already exist
42
+ 5. **Search for existing schemas in the repository**: Look for other `.actor/` directories or schema files (e.g., `**/dataset_schema.json`, `**/output_schema.json`, `**/key_value_store_schema.json`) to learn the repo's conventions — match their description style, field naming, example formatting, and overall structure
43
+ 6. Find all places where data is pushed to the dataset:
44
+ - **JavaScript/TypeScript**: Search for `Actor.pushData(`, `dataset.pushData(`, `Dataset.pushData(`
45
+ - **Python**: Search for `Actor.push_data(`, `dataset.push_data(`, `Dataset.push_data(`
46
+ 7. Find all places where data is stored in the key-value store:
47
+ - **JavaScript/TypeScript**: Search for `Actor.setValue(`, `keyValueStore.setValue(`, `KeyValueStore.setValue(`
48
+ - **Python**: Search for `Actor.set_value(`, `key_value_store.set_value(`, `KeyValueStore.set_value(`
49
+ 8. Find output type definitions — **reuse them directly** instead of recreating from scratch:
50
+ - **TypeScript**: Look for output type interfaces/types (e.g., in `src/types/`, `src/types/output.ts`). If an interface or type already defines the output shape, derive the schema fields from it — do not create a parallel definition
51
+ - **Python**: Look for TypedDict, dataclass, or Pydantic model definitions. Use the existing field names, types, and docstrings as the source of truth
52
+ 9. Check for existing shared schema utilities or helper functions in the codebase that handle schema generation or validation — reuse them rather than creating new logic
53
+ 10. If inline `storages.dataset` or `storages.keyValueStore` config exists in `actor.json`, note it for migration
54
+
55
+ Present findings to user: list all discovered dataset output fields, key-value store keys, their types, and where they come from.
56
+
57
+ ---
58
+
59
+ ## Phase 2: Generate `dataset_schema.json`
60
+
61
+ **Goal**: Create a complete dataset schema with field definitions and display views
62
+
63
+ ### File structure
64
+
65
+ ```json
66
+ {
67
+ "actorSpecification": 1,
68
+ "fields": {
69
+ "$schema": "http://json-schema.org/draft-07/schema#",
70
+ "type": "object",
71
+ "properties": {
72
+ // ALL output fields here — every field the Actor can produce,
73
+ // not just the ones shown in the overview view
74
+ },
75
+ "required": [],
76
+ "additionalProperties": true
77
+ },
78
+ "views": {
79
+ "overview": {
80
+ "title": "Overview",
81
+ "description": "Most important fields at a glance",
82
+ "transformation": {
83
+ "fields": [
84
+ // 8-12 most important field names
85
+ ]
86
+ },
87
+ "display": {
88
+ "component": "table",
89
+ "properties": {
90
+ // Display config for each overview field
91
+ }
92
+ }
93
+ }
94
+ }
95
+ }
96
+ ```
97
+
98
+ ### Consistency with existing schemas
99
+
100
+ If existing output schemas were found in the repository during Phase 1 (step 5), follow their conventions:
101
+ - Match the **description writing style** (sentence case vs. lowercase, period vs. no period, etc.)
102
+ - Match the **field naming convention** (camelCase vs. snake_case) — this must also match the actual keys produced by the Actor code
103
+ - Match the **example value style** (e.g., date formats, URL patterns, placeholder names)
104
+ - Match the **view structure** (number of fields in overview, display format choices)
105
+ - Match the **JSON formatting** (indentation, property ordering, spacing) — all schemas in the same repository must use identical formatting, including standalone Actors
106
+
107
+ When the Actor code already has well-defined TypeScript interfaces or Python type classes, derive fields directly from those types rather than re-analyzing pushData/push_data calls from scratch. The type definition is the canonical source.
108
+
109
+ ### Hard rules (no exceptions)
110
+
111
+ | Rule | Detail |
112
+ |------|--------|
113
+ | **All fields in `properties`** | The `fields.properties` object must contain **every** field the Actor can output, not just the fields shown in the overview view. The views section selects a subset for display — the `properties` section must be the complete superset |
114
+ | `"nullable": true` | On **every** field — APIs are unpredictable |
115
+ | `"additionalProperties": true` | On the **top-level `fields` object** AND on **every nested object** within `properties`. This is the most commonly missed rule — it must appear at both levels |
116
+ | `"required": []` | Always empty array — on the **top-level `fields` object** AND on **every nested object** within `properties` |
117
+ | Anonymized examples | No real user IDs, usernames, or content |
118
+ | `"type"` required with `"nullable"` | AJV rejects `nullable` without a `type` on the same field |
119
+
120
+ > **Warning — most common mistakes**:
121
+ > 1. Only including fields that appear in the overview view. The `fields.properties` must list ALL output fields, even if they are not in the `views` section.
122
+ > 2. Only adding `"required": []` and `"additionalProperties": true` on nested object-type properties but forgetting them on the top-level `fields` object. Both levels need them.
123
+
124
+ > **Note**: `nullable` is an Apify-specific extension to JSON Schema draft-07. It is intentional and correct.
125
+
126
+ ### Field type patterns
127
+
128
+ **String field:**
129
+ ```json
130
+ "title": {
131
+ "type": "string",
132
+ "description": "Title of the scraped item",
133
+ "nullable": true,
134
+ "example": "Example Item Title"
135
+ }
136
+ ```
137
+
138
+ **Number field:**
139
+ ```json
140
+ "viewCount": {
141
+ "type": "number",
142
+ "description": "Number of views",
143
+ "nullable": true,
144
+ "example": 15000
145
+ }
146
+ ```
147
+
148
+ **Boolean field:**
149
+ ```json
150
+ "isVerified": {
151
+ "type": "boolean",
152
+ "description": "Whether the account is verified",
153
+ "nullable": true,
154
+ "example": true
155
+ }
156
+ ```
157
+
158
+ **Array field:**
159
+ ```json
160
+ "hashtags": {
161
+ "type": "array",
162
+ "description": "Hashtags associated with the item",
163
+ "items": { "type": "string" },
164
+ "nullable": true,
165
+ "example": ["#example", "#demo"]
166
+ }
167
+ ```
168
+
169
+ **Nested object field:**
170
+ ```json
171
+ "authorInfo": {
172
+ "type": "object",
173
+ "description": "Information about the author",
174
+ "properties": {
175
+ "name": { "type": "string", "nullable": true },
176
+ "url": { "type": "string", "nullable": true }
177
+ },
178
+ "required": [],
179
+ "additionalProperties": true,
180
+ "nullable": true,
181
+ "example": { "name": "Example Author", "url": "https://example.com/author" }
182
+ }
183
+ ```
184
+
185
+ **Enum field:**
186
+ ```json
187
+ "contentType": {
188
+ "type": "string",
189
+ "description": "Type of content",
190
+ "enum": ["article", "video", "image"],
191
+ "nullable": true,
192
+ "example": "article"
193
+ }
194
+ ```
195
+
196
+ **Union type (e.g., TypeScript `ObjectType | string`):**
197
+ ```json
198
+ "metadata": {
199
+ "type": ["object", "string"],
200
+ "description": "Structured metadata object, or error string if unavailable",
201
+ "nullable": true,
202
+ "example": { "key": "value" }
203
+ }
204
+ ```
205
+
206
+ ### Anonymized example values
207
+
208
+ Use realistic but generic values. Follow platform ID format conventions:
209
+
210
+ | Field type | Example approach |
211
+ |---|---|
212
+ | IDs | Match platform format and length (e.g., 11 chars for YouTube video IDs) |
213
+ | Usernames | `"exampleuser"`, `"sampleuser123"` |
214
+ | Display names | `"Example Channel"`, `"Sample Author"` |
215
+ | URLs | Use platform's standard URL format with fake IDs |
216
+ | Dates | `"2025-01-15T12:00:00.000Z"` (ISO 8601) |
217
+ | Text content | Generic descriptive text, e.g., `"This is an example description."` |
218
+
219
+ ### Views section
220
+
221
+ - `transformation.fields`: List 8–12 most important field names (order = column order in UI)
222
+ - `display.properties`: One entry per overview field with `label` and `format`
223
+ - Available formats: `"text"`, `"number"`, `"date"`, `"link"`, `"boolean"`, `"image"`, `"array"`, `"object"`
224
+
225
+ Pick fields that give users the most useful at-a-glance summary of the data.
226
+
227
+ ---
228
+
229
+ ## Phase 3: Generate `key_value_store_schema.json` (if applicable)
230
+
231
+ **Goal**: Define key-value store collections if the Actor stores data in the key-value store
232
+
233
+ > **Skip this phase** if no `Actor.setValue()` / `Actor.set_value()` calls were found in Phase 1 (beyond the default `INPUT` key).
234
+
235
+ ### File structure
236
+
237
+ ```json
238
+ {
239
+ "actorKeyValueStoreSchemaVersion": 1,
240
+ "title": "<Descriptive title — what the key-value store contains>",
241
+ "description": "<One sentence describing the stored data>",
242
+ "collections": {
243
+ "<collectionName>": {
244
+ "title": "<Human-readable title>",
245
+ "description": "<What this collection contains>",
246
+ "keyPrefix": "<prefix->"
247
+ }
248
+ }
249
+ }
250
+ ```
251
+
252
+ ### How to identify collections
253
+
254
+ Group the discovered `setValue` / `set_value` calls by key pattern:
255
+
256
+ 1. **Fixed keys** (e.g., `"RESULTS"`, `"summary"`) — use `"key"` (exact match)
257
+ 2. **Dynamic keys with a prefix** (e.g., `"screenshot-${id}"`, `f"image-{name}"`) — use `"keyPrefix"`
258
+
259
+ Each group becomes a collection.
260
+
261
+ ### Collection properties
262
+
263
+ | Property | Required | Description |
264
+ |----------|----------|-------------|
265
+ | `title` | Yes | Shown in UI tabs |
266
+ | `description` | No | Shown in UI tooltips |
267
+ | `key` | Conditional | Exact key for single-key collections (use `key` OR `keyPrefix`, not both) |
268
+ | `keyPrefix` | Conditional | Prefix for multi-key collections (use `key` OR `keyPrefix`, not both) |
269
+ | `contentTypes` | No | Restrict allowed MIME types (e.g., `["image/jpeg"]`, `["application/json"]`) |
270
+ | `jsonSchema` | No | JSON Schema draft-07 for validating `application/json` content |
271
+
272
+ ### Examples
273
+
274
+ **Single file output (e.g., a report):**
275
+ ```json
276
+ {
277
+ "actorKeyValueStoreSchemaVersion": 1,
278
+ "title": "Analysis Results",
279
+ "description": "Key-value store containing analysis output",
280
+ "collections": {
281
+ "report": {
282
+ "title": "Report",
283
+ "description": "Final analysis report",
284
+ "key": "REPORT",
285
+ "contentTypes": ["application/json"]
286
+ }
287
+ }
288
+ }
289
+ ```
290
+
291
+ **Multiple files with prefix (e.g., screenshots):**
292
+ ```json
293
+ {
294
+ "actorKeyValueStoreSchemaVersion": 1,
295
+ "title": "Scraped Files",
296
+ "description": "Key-value store containing downloaded files and screenshots",
297
+ "collections": {
298
+ "screenshots": {
299
+ "title": "Screenshots",
300
+ "description": "Page screenshots captured during scraping",
301
+ "keyPrefix": "screenshot-",
302
+ "contentTypes": ["image/png", "image/jpeg"]
303
+ },
304
+ "documents": {
305
+ "title": "Documents",
306
+ "description": "Downloaded document files",
307
+ "keyPrefix": "doc-",
308
+ "contentTypes": ["application/pdf", "text/html"]
309
+ }
310
+ }
311
+ }
312
+ ```
313
+
314
+ ---
315
+
316
+ ## Phase 4: Generate `output_schema.json`
317
+
318
+ **Goal**: Create the output schema that tells Apify Console where to find results
319
+
320
+ For most Actors that push data to a dataset, this is a minimal file:
321
+
322
+ ```json
323
+ {
324
+ "actorOutputSchemaVersion": 1,
325
+ "title": "<Descriptive title — what the Actor returns>",
326
+ "description": "<One sentence describing the output data>",
327
+ "properties": {
328
+ "dataset": {
329
+ "type": "string",
330
+ "title": "Results",
331
+ "description": "Dataset containing all scraped data",
332
+ "template": "{{links.apiDefaultDatasetUrl}}/items"
333
+ }
334
+ }
335
+ }
336
+ ```
337
+
338
+ > **Critical**: Each property entry **must** include `"type": "string"` — this is an Apify-specific convention. The Apify meta-validator rejects properties without it (and rejects `"type": "object"` — only `"string"` is valid here).
339
+
340
+ If `key_value_store_schema.json` was generated in Phase 3, add a second property:
341
+ ```json
342
+ "files": {
343
+ "type": "string",
344
+ "title": "Files",
345
+ "description": "Key-value store containing downloaded files",
346
+ "template": "{{links.apiDefaultKeyValueStoreUrl}}/keys"
347
+ }
348
+ ```
349
+
350
+ ### Available template variables
351
+
352
+ - `{{links.apiDefaultDatasetUrl}}` — API URL of default dataset
353
+ - `{{links.apiDefaultKeyValueStoreUrl}}` — API URL of default key-value store
354
+ - `{{links.publicRunUrl}}` — Public run URL
355
+ - `{{links.consoleRunUrl}}` — Console run URL
356
+ - `{{links.apiRunUrl}}` — API run URL
357
+ - `{{links.containerRunUrl}}` — URL of webserver running inside the run
358
+ - `{{run.defaultDatasetId}}` — ID of the default dataset
359
+ - `{{run.defaultKeyValueStoreId}}` — ID of the default key-value store
360
+
361
+ ---
362
+
363
+ ## Phase 5: Update `actor.json`
364
+
365
+ **Goal**: Wire the schema files into the Actor configuration
366
+
367
+ **Actions**:
368
+ 1. Read the current `actor.json`
369
+ 2. Add or update the `storages.dataset` reference:
370
+ ```json
371
+ "storages": {
372
+ "dataset": "./dataset_schema.json"
373
+ }
374
+ ```
375
+ 3. If `key_value_store_schema.json` was generated, add the reference:
376
+ ```json
377
+ "storages": {
378
+ "dataset": "./dataset_schema.json",
379
+ "keyValueStore": "./key_value_store_schema.json"
380
+ }
381
+ ```
382
+ 4. Add or update the `output` reference:
383
+ ```json
384
+ "output": "./output_schema.json"
385
+ ```
386
+ 5. If `actor.json` had inline `storages.dataset` or `storages.keyValueStore` objects (not string paths), migrate their content into the respective schema files and replace the inline objects with file path strings
387
+
388
+ ---
389
+
390
+ ## Phase 6: Review and validate
391
+
392
+ **Goal**: Ensure correctness and completeness
393
+
394
+ **Checklist**:
395
+ - [ ] **Every** output field from the source code is in `dataset_schema.json` `fields.properties` — not just the overview view fields but ALL fields the Actor can produce
396
+ - [ ] Every field has `"nullable": true`
397
+ - [ ] The **top-level `fields` object** has both `"additionalProperties": true` and `"required": []`
398
+ - [ ] Every **nested object** within `properties` also has `"additionalProperties": true` and `"required": []`
399
+ - [ ] Every field has a `"description"` and an `"example"`
400
+ - [ ] All example values are anonymized
401
+ - [ ] `"type"` is present on every field that has `"nullable"`
402
+ - [ ] Views list 8–12 most useful fields with correct display formats
403
+ - [ ] `output_schema.json` has `"type": "string"` on every property
404
+ - [ ] If key-value store is used: `key_value_store_schema.json` has collections matching all `setValue`/`set_value` calls
405
+ - [ ] If key-value store is used: each collection uses either `key` or `keyPrefix` (not both)
406
+ - [ ] `actor.json` references all generated schema files
407
+ - [ ] Schema field names match the actual keys in the code (camelCase/snake_case consistency)
408
+ - [ ] If existing schemas were found in the repo, the new schema follows their conventions (description style, example format, view structure)
409
+ - [ ] Schema fields are derived from existing type definitions (interfaces, TypedDicts, dataclasses) where available — no duplicated or divergent field definitions
410
+
411
+ Present the generated schemas to the user for review before writing them.
412
+
413
+ ---
414
+
415
+ ## Phase 7: Summary
416
+
417
+ **Goal**: Document what was created
418
+
419
+ Report:
420
+ - Files created or updated
421
+ - Number of fields in the dataset schema
422
+ - Number of collections in the key-value store schema (if generated)
423
+ - Fields selected for the overview view
424
+ - Any fields that need user clarification (ambiguous types, unclear nullability)
425
+ - Suggested next steps (test locally with `apify run --user-agent apify-agent-skills/apify-generate-output-schema`, verify output tab in Console)
426
+
427
+
428
+ ## Examples
429
+
430
+ ```text
431
+ User: Apply this skill to my current task.
432
+ Assistant: Follow the workflow in this skill, cite limitations, and ask before risky steps.
433
+ ```
434
+
435
+ ## Limitations
436
+
437
+ - Imported upstream skill; verify credentials, permissions, and safety boundaries before execution.
438
+ - Does not replace environment-specific validation, testing, or maintainer review.
@@ -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.