agentsclimarketplace

Apify debug bundle

Skill jeremylongshore/claude-code-plugins-plus-skills/skills/.curated/apify-debug-bundle

425 plugins, 2,810 skills, 200 agents for Claude Code. Open-source marketplace at tonsofskills.com with the ccpi CLI package manager.

Install
npx -y skills add jeremylongshore/claude-code-plugins-plus-skills --skill apify-debug-bundle

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

What its author says it does

Copied from the file, not written here

Collect Apify debug evidence for support tickets and troubleshooting. Use when an Actor run has failed, is stuck, or produced empty output and you need to gather run metadata, logs, dataset samples, and environment info before opening a support ticket. Trigger with "apify debug", "apify support bundle", "collect apify logs", "apify diagnostic", "apify run failed why".

The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

5.2 KB, as published. Nobody here has run it

Apify Debug Bundle

Overview

Collect all diagnostic information needed to troubleshoot failed Actor runs and prepare Apify support tickets. Pulls run metadata, logs, dataset samples, and environment info into a single bundle so a support engineer (or you) can diagnose the failure without live access to your account.

Prerequisites

  • apify-client installed
  • APIFY_TOKEN configured
  • A failed or problematic run ID to investigate

Authentication

All API calls authenticate with the APIFY_TOKEN as a Bearer header (Authorization: Bearer $APIFY_TOKEN), and the SDK reads the same token from process.env.APIFY_TOKEN. Get the token from the Apify Console under Settings → Integrations → Personal API tokens. Never commit it — the bundle script redacts any local .env before packaging, and the platform auto-redacts secrets inside run logs.

Instructions

The workflow has four steps. The skeleton below is enough to run it; each step's full implementation lives in implementation.md.

  1. Investigate the failed run — pull run summary, dataset stats, and the log tail via the SDK. The core call:

    const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
    const run = await client.run(runId).get();
    const log = await client.run(runId).log().get();
    
  2. Create the debug bundle — run apify-debug-bundle.sh <RUN_ID>. It collects environment info, run details, log, a 5-item dataset sample, key-value store keys, a redacted .env, and platform health, then packages everything into a timestamped .tar.gz. Full script in implementation.md.

  3. Compare against a good run (optional) — diff a successful and failed run field-by-field to spot the delta (compareRuns(successId, failId)).

  4. Live-tail a running Actor (optional) — stream logs when the final log is not yet available.

For copy-pasteable code for every step, see implementation.md.

Output

A single timestamped tarball, apify-debug-YYYYMMDD-HHMMSS.tar.gz, containing:

FileContents
environment.txtNode/npm versions, installed Apify packages, CLI version
run-details.jsonRun status, options, stats, usage, cost
run-log.txtFull run log (secrets auto-redacted by the platform)
dataset-sample.jsonFirst 5 dataset items
kv-store-keys.jsonKey-value store key listing
env-redacted.txtLocal .env with all values redacted
platform-health.jsonApify platform health snapshot

Attach the tarball directly to an Apify support ticket.

Sensitive Data Handling

Always redact before sharing:

  • API tokens (apify_api_*)
  • Proxy passwords
  • PII (emails, names, IPs)
  • Custom environment variables

Safe to include:

  • Run IDs, Actor IDs, dataset IDs
  • Error messages and stack traces
  • Run configuration (memory, timeout)
  • Platform health status

Escalation Path

  1. Check run log for stack trace
  2. Compare with a successful run
  3. Check Apify Status for outages
  4. Create debug bundle
  5. Submit to Apify Support with bundle attached

Error Handling

IssueCauseSolution
Run not foundInvalid run ID or expiredUnnamed runs expire after 7 days
Log unavailableRun still in progressWait for completion or stream live
Empty datasetActor produced no outputCheck failedRequestHandler in code
High CU usageMemory too high or slow executionReduce memory, optimize code

Examples

Four worked scenarios — a plain FAILED run, an "it worked yesterday" regression diff, an empty-dataset investigation, and live-tailing a hung run — are in examples.md. The quickest path:

export APIFY_TOKEN="apify_api_..."
./apify-debug-bundle.sh abc123DEF          # → apify-debug-20260717-142530.tar.gz
tar -xzf apify-debug-*.tar.gz && tail -40 apify-debug-*/run-log.txt

See examples.md for the full walkthroughs, including reading the comparison output and interpreting a live tail.

Resources

Next Steps

For rate limit issues, see the apify-rate-limits skill.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.