All skills
apify avatar

/apify-actor-development

@c009920 official
by apifyapify/agent-skills2.4k stars
259

Create, modify, debug, and deploy Apify Actors, and write their input and output schemas. Use when building an Actor from scratch, changing or troubleshooting Actor code, generating or updating .actor schema files, or pushing an Actor to the Apify platform. To wrap an existing non-Actor project, use apify-actorization instead.

Use this Skill: https://skilld.dev/gh/apify/agent-skills/apify-actor-development

This session only. Nothing lands on disk.

referenceslogging.md

≈698 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Actor logging reference

JavaScript and TypeScript

ALWAYS use log from the apify package for logging (import { Actor, log } from 'apify') - This logger contains critical security logic including censoring sensitive data (Apify tokens, API keys, credentials) to prevent accidental exposure in logs.

Available log levels

The Apify logger provides the following methods for logging:

  • log.debug() - Debug level logs (detailed diagnostic information)
  • log.info() - Info level logs (general informational messages)
  • log.warning() - Warning level logs (warning messages for potentially problematic situations)
  • log.warningOnce() - Warning level logs (same warning message logged only once)
  • log.error() - Error level logs (error messages for failures)
  • log.exception() - Exception level logs (for exceptions with stack traces)
  • log.perf() - Performance level logs (performance metrics and timing information)
  • log.deprecated() - Deprecation level logs (warnings about deprecated code)
  • log.softFail() - Soft failure logs (non-critical failures that don't stop execution, e.g., input validation errors, skipped items)
  • log.internal() - Internal level logs (internal/system messages)

Best practices

  • Use log.debug() for detailed operation-level diagnostics (inside functions)
  • Use log.info() for general informational messages (API requests, successful operations)
  • Use log.warning() for potentially problematic situations (validation failures, unexpected states)
  • Use log.error() for actual errors and failures
  • Use log.exception() for caught exceptions with stack traces

Python

ALWAYS use Actor.log for logging - This logger contains critical security logic including censoring sensitive data (Apify tokens, API keys, credentials) to prevent accidental exposure in logs.

Available log levels

The Apify Actor logger provides the following methods for logging:

  • Actor.log.debug() - Debug level logs (detailed diagnostic information)
  • Actor.log.info() - Info level logs (general informational messages)
  • Actor.log.warning() - Warning level logs (warning messages for potentially problematic situations)
  • Actor.log.error() - Error level logs (error messages for failures)
  • Actor.log.exception() - Exception level logs (for exceptions with stack traces)

Best practices

  • Use Actor.log.debug() for detailed operation-level diagnostics (inside functions)
  • Use Actor.log.info() for general informational messages (API requests, successful operations)
  • Use Actor.log.warning() for potentially problematic situations (validation failures, unexpected states)
  • Use Actor.log.error() for actual errors and failures
  • Use Actor.log.exception() for caught exceptions with stack traces

Source: SKILL.md on GitHub

1 warning14d5 checks · Risk SAFE
  • Gen Agent Trust Hub14d

    The skill provides a framework for developing web scraping and automation tools on the Apify platform. It includes strong security recommendations for handling API tokens, sanitizing scraped data, and managing dependencies safely. It identifies the risk of processing untrusted web content and provides explicit mitigation strategies.

  • Socket14d

    No alerts

  • Snyk14d

    Risk: LOW · No issues

  • Runlayer7mo

    1/8 files flagged

  • ZeroLeaks5mo

    1 finding · Score: 82/100

Signed by skilld at c009920. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated yesterday
  • Python
  • TypeScript
  • apify
  • actors
  • web-scraping
  • automation
  • nodejs
  • docker
  • serverless
  • data-processing

README badge

README badge for apify/agent-skills/apify-actor-development

Develops, debugs, and deploys Apify Actors—serverless cloud programs for web scraping, automation, and data processing using the Apify CLI and SDK. Covers Actor creation across JavaScript, TypeScript, and Python, local testing with `apify run`, schema configuration, and deployment to the Apify platform.

Generated from the current SKILL.md.

What programming languages does this skill support?
JavaScript, TypeScript, and Python. The skill prompts you to choose your language preference and uses the appropriate `apify create` template (`project_empty` for JS, `ts_empty` for TS, `python-empty` for Python).
Do I need to install the Apify CLI before using this skill?
Yes. The skill requires `apify` CLI to be installed and authenticated. Install via `npm install -g apify-cli` and authenticate with `apify login` or set the `APIFY_TOKEN` environment variable.
Does local testing with `apify run` upload results to Apify Console?
No. Local testing stores data only in your `storage/` directory. You must deploy with `apify push` and run on the platform to see results in Apify Console.
What should I use for web scraping - CheerioCrawler or PlaywrightCrawler?
Use CheerioCrawler for static HTML (10x faster) and PlaywrightCrawler only for JavaScript-heavy sites that require a browser.
How are sensitive credentials handled in Actors?
Use the `apify/log` package, which automatically censors API keys and tokens. Never pass `APIFY_TOKEN` as command-line arguments or log raw crawled content that may contain credentials.

Generated from the current SKILL.md. These answers refresh after source changes.