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.
Works with
AI-first code editor with Composer
Before installing skills in Cursor, ensure your development environment meets these requirements:
node --versionapify-generate-output-schemaExecute the skills CLI command in your project's root directory to begin installation:
Fetches apify-generate-output-schema from apify/agent-skills and configures it for Cursor.
The CLI shows a list of agents. Use arrow keys and space to select Cursor:
Confirm successful installation by checking the skill directory location:
Restart Cursor to activate apify-generate-output-schema. Access via /apify-generate-output-schema in your agent's command palette.
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.
Submit your Claude Code skill and start earning
Automate repetitive workflows and reduce manual effort
Example
Generate reports, summarize documents, draft communications
Save 3-5 hours per week on routine tasks
Learn new skills, understand complex topics, get expert guidance
Example
Explain concepts, provide examples, suggest learning resources
Accelerate learning and skill development by 2x
Enhance output quality through reviews, suggestions, and refinements
Example
Review drafts, suggest improvements, catch errors
Improve work quality by 30-40% with less effort
0
total installs
0
this week
1.8K
GitHub stars
0
upvotes
Run in your terminal
0
installs
0
this week
1.8K
stars
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.
"nullable": trueGoal: Locate the Actor and understand its output
Initial request: $ARGUMENTS
Actions:
.actor/ directory containing actor.jsonactor.json to understand the Actor's configurationdataset_schema.json, output_schema.json, and key_value_store_schema.json already exist.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 structureActor.pushData(, dataset.pushData(, Dataset.pushData(Actor.push_data(, dataset.push_data(, Dataset.push_data(Actor.setValue(, keyValueStore.setValue(, KeyValueStore.setValue(Actor.set_value(, key_value_store.set_value(, KeyValueStore.set_value(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 definitionstorages.dataset or storages.keyValueStore config exists in actor.json, note it for migrationPresent findings to user: list all discovered dataset output fields, key-value store keys, their types, and where they come from.
dataset_schema.jsonGoal: Create a complete dataset schema with field definitions and display views
{
"actorSpecification": 1,
"fields": {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
// ALL output fields here — every field the Actor can produce,
// not just the ones shown in the overview view
},
"required": [],
"additionalProperties": true
},
"views": {
"overview": {
"title": "Overview",
"description": "Most important fields at a glance",
"transformation": {
"fields": [
// 8-12 most important field names
]
},
"display": {
"component": "table",
"properties": {
// Display config for each overview field
}
}
}
}
}
If existing output schemas were found in the repository during Phase 1 (step 5), follow their conventions:
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.
| Rule | Detail |
|---|---|
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 |
"nullable": true |
On every field — APIs are unpredictable |
"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 |
"required": [] |
Always empty array — on the top-level fields object AND on every nested object within properties |
| Anonymized examples | No real user IDs, usernames, or content |
"type" required with "nullable" |
AJV rejects nullable without a type on the same field |
Warning — most common mistakes:
- Only including fields that appear in the overview view. The
fields.propertiesmust list ALL output fields, even if they are not in theviewssection.- Only adding
"required": []and"additionalProperties": trueon nested object-type properties but forgetting them on the top-levelfieldsobject. Both levels need them.
Note:
nullableis an Apify-specific extension to JSON Schema draft-07. It is intentional and correct.
String field:
"title": {
"type": "string",
"description": "Title of the scraped item",
"nullable": true,
"example": "Example Item Title"
}
Number field:
"viewCount": {
"type": "number",
"description": "Number of views",
"nullable": true,
"example": 15000
}
Boolean field:
"isVerified": {
"type": "boolean",
"description": "Whether the account is verified",
"nullable": true,
"example": true
}
Array field:
"hashtags": {
"type": "array",
"description": "Hashtags associated with the item",
"items": { "type": "string" },
"nullable": true,
"example": ["#example", "#demo"]
}
Nested object field:
"authorInfo": {
"type": "object",
"description": "Information about the author",
"properties": {
"name": { "type": "string", "nullable": true },
"url": { "type": "string", "nullable": true }
},
"required": [],
"additionalProperties": true,
"nullable": true,
"example": { "name": "Example Author", "url": "https://example.com/author" }
}
Enum field:
"contentType": {
"type": "string",
"description": "Type of content",
"enum": ["article", "video", "image"],
"nullable": true,
"example": "article"
}
Union type (e.g., TypeScript ObjectType | string):
"metadata": {
"type": ["object", "string"],
"description": "Structured metadata object, or error string if unavailable",
"nullable": true,
"example": { "key": "value" }
}
Use realistic but generic values. Follow platform ID format conventions:
| Field type | Example approach |
|---|---|
| IDs | Match platform format and length (e.g., 11 chars for YouTube video IDs) |
| Usernames | "exampleuser", "sampleuser123" |
| Display names | "Example Channel", "Sample Author" |
| URLs | Use platform's standard URL forImplementation GuidePrerequisites
Time Estimate 15-45 minutes depending on use case complexity Steps
Common Pitfalls
Best Practices✓ Do
✗ Don't
💡 Pro Tips
When to Use This✓ Use when Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement. ✗ Avoid when Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion. Learning Path
Related Skillstypescript-best-practices146jwynia/agent-skills Backendsame category fastapi-python61mindrally/skills Backendsame category java-springboot51github/awesome-copilot Backendsame category google-search-console49kostja94/marketing-skills Backendsame category python-expert-best-practices-code-review44wispbit-ai/skills Backendsame category backend-development21mrgoonie/claudekit-skills Backendsame category Reviews4.4★★★★★34 reviews
showing 1-10 of 34 1 / 4 DiscussionComments — not star reviews
|