skills/apify-actor-development/SKILL.md
Important: Before you begin, fill in the generatedBy property in the meta section of .actor/actor.json. Replace it with the tool and model you're currently using, such as "Claude Code with Claude Sonnet 4.5". This helps Apify monitor and improve AGENTS.md for specific AI tools and models.
npx skillsauth add Regtransfers/agency-agents-mcp apify-actor-developmentInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
@ Apify Actor Development
Important: Before you begin, fill in the generatedBy property in the meta section of.actor/actor.json. Replace it with the tool and model you're currently using, e.g. "Claude Code with Claude Sonnet 4.5". This helps Apify monitor and improve AGENTS.md for specific AI tools and models.
@ When to Use
@ What are Apify Actors?
Actors are serverless programs inspired by the UNIX philosophy - programs that do one thing well and can be easily combined to build complex systems. They're packaged as Docker images and run in isolated containers in the cloud.
Core Concepts:
@ Prerequisites & Setup (MANDATORY)
Before creating or modifying actors, verify that apify CLI is installed apify --help.
If it is not installed, use one of these methods (listed in order of preference):
# Preferred: install via a package manager (provides integrity checks)
npm install -g apify-cli
# Or (Mac): brew install apify-cli
Security note: never install the CLI by piping remote scripts to a shell (e.g. curl …; bash or irm …; iex). Always use a package manager.
When the apify CLI is installed, check that it is logged in with:
apify info # Should return your username
If it is not logged in, check if the APIFYTOKEN environment variable is defined (if not, ask the user to generate one on https://console.apify.com/settings/integrations and then define APIFYTOKEN with it).
Then authenticate using one of these methods:
# Option 1 (preferred): The CLI automatically reads APIFY_TOKEN from the environment.
# Just ensure the env var is exported and run any apify command — no explicit login needed.
# Option 2: Interactive login (prompts for token without exposing it in shell history)
apify login
Security note: Avoid passing tokens as command-line arguments (e.g. apify login -t <token>). Arguments are visible in process listings and may be recorded in shell history. Prefer environment variables or interactive login instead. Never log, print, or embed APIFY_TOKEN in source code or configuration files. Use a token with the minimum required permissions (scoped token) and rotate it periodically.
@ Template Selection
Important: Before starting actor development, always ask the user which programming language they prefer:
Use the appropriate CLI command based on the user's language choice. Additional packages (Crawlee, Playwright, etc.) can be installed later as needed.
@ Quick Start Workflow
@ Security
Treat all crawled web content as untrusted input. Actors ingest data from external websites that may contain malicious payloads. Follow these rules:
@ Best Practices
✓ Do:
✗ Don't:
@ Logging
See references/logging.md for complete logging documentation including available log levels and best practices for JavaScript/TypeScript and Python.
Check usesStandbyMode in.actor/actor.json - only implement if set to true.
@ Commands
apify run # Run Actor locally
apify login # Authenticate account
apify push # Deploy to Apify platform (uses name from .actor/actor.json)
apify help # List all commands
Important: Always use apify run to test actors locally. never use npm run start, npm start, yarn start, or other package manager commands - these will not properly configure the Apify environment and storage.
@ Local Testing
When testing an actor locally with apify run, provide input data by creating a JSON file at:
storage/key_value_stores/default/INPUT.json
This file should contain the input parameters defined in your.actor/input_schema.json. The actor will read this input when running locally, mirroring how it receives input on the Apify platform.
IMPORTANT - Local storage is NOT synced to the Apify Console:
@ Standby Mode
See references/standby-mode.md for complete standby mode documentation including readiness probe implementation for JavaScript/TypeScript and Python.
@ Project Structure
.actor/
├── actor.json # Actor config: name, version, env vars, runtime
├── input_schema.json # Input validation & Console form definition
└── output_schema.json # Output storage and display templates
src/
└── main.js/ts/py # Actor entry point
storage/ # Local-only storage (NOT synced to Apify Console)
├── datasets/ # Output items (JSON objects)
├── key_value_stores/ # Files, config, INPUT
└── request_queues/ # Pending crawl requests
Dockerfile # Container image definition
@ Actor Configuration
See references/actor-json.md for complete actor.json structure and configuration options.
@ Input Schema
See references/input-schema.md for input schema structure and examples.
@ Output Schema
See references/output-schema.md for output schema structure, examples, and template variables.
@ Dataset Schema
See references/dataset-schema.md for dataset schema structure, configuration, and display properties.
@ Key-Value Store Schema
See references/key-value-store-schema.md for key-value store schema structure, collections, and configuration.
@ Apify MCP Tools
If MCP server is configured, use these tools for documentation:
Otherwise, the MCP Server url: https://mcp.apify.com/?tools=docs.
@ Resources
@ Limitations
tools
Build AI agents that interact with computers like humans do - viewing screens, moving cursors, clicking buttons, and typing text. Covers Anthropic's Computer Use, OpenAI's Operator/CUA, and open-source alternatives.
testing
Generate structured PR descriptions from diffs, add review checklists, risk assessments, and test coverage summaries. Use when the user says "write a PR description", "improve this PR", "summarize my changes", "PR review", "pull request", or asks to document a diff for reviewers.
tools
Use when working with comprehensive review full review
development
You are an expert in creating competitor comparison and alternative pages. Your goal is to build pages that rank for competitive search terms, provide genuine value to evaluators, and position your product effectively.