/apify-pack:apify-upgrade-migrationfrom apify-pack
Upgrades Apify SDK, apify-client, and Crawlee packages safely, handling breaking changes and migrations like v2 to v3.
Ships in apify-pack. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Guide for upgrading apify, apify-client, and crawlee packages. The biggest
migration in Apify's history was SDK v2 to v3, which split crawling functionality
into the crawlee package. This skill covers that migration plus general upgrade
procedures. Read and edit source files with Grep/Read/Edit to apply the
rename-heavy changes, then verify with the packaged script.
Before starting, confirm the working tree is in a recoverable state:
npm test) plus a build step (npm run build) to catch
TypeScript interface changes.npm list apify apify-client crawlee)
so rollback targets are known.APIFY_TOKEN in the environment if the verification script's API-connection
check will run.# Check installed versions
npm list apify apify-client crawlee 2>/dev/null
# Check latest available versions
npm view apify version
npm view apify-client version
npm view crawlee version
# Check for outdated packages
npm outdated apify apify-client crawlee
git checkout -b upgrade/apify-packages
# Upgrade to latest
npm install apify@latest crawlee@latest apify-client@latest
# Or upgrade to specific version
npm install [email protected] [email protected]
# Check for peer dependency issues
npm ls 2>&1 | grep "ERESOLVE\|peer dep"
If crossing the v2→v3 boundary, use Grep to find every Apify. reference and
Edit each call site. The full before/after set — imports, Actor.main, crawler
option renames (handlePageFunction → requestHandler), proxy config, request
queues, and the new router pattern — is in
the v2-to-v3 migration guide. Minimal shape:
// v2
import Apify from 'apify';
const { CheerioCrawler } = Apify;
// v3
import { Actor } from 'apify';
import { CheerioCrawler } from 'crawlee';
npm test
npm run build # Catch TypeScript errors
Then run the packaged verification script from verify-and-rollback.md, which checks imports resolve, the client connects, and a crawler instantiates.
A successful upgrade produces:
package.json / package-lock.json with the new apify, crawlee,
and apify-client versions on the upgrade/apify-packages branch.Apify.* call sites converted to Actor.* /
crawlee imports (only when crossing v2→v3).=== Upgrade Verification ===
[PASS] Actor import
[PASS] CheerioCrawler import
[PASS] ApifyClient import
[PASS] API connection
[PASS] Crawler instantiation
All checks passed.
If any check fails, follow the rollback procedure to restore the previous versions before investigating.
| Error | Cause | Solution |
|---|---|---|
handlePageFunction is not valid | Using v2 option names in v3 | Rename to requestHandler |
Apify.main is not a function | v2 default export removed | Import { Actor } from apify |
Cannot find module 'crawlee' | Crawlee not installed | npm install crawlee |
| Type errors after upgrade | Changed interfaces | Check release notes for type changes |
ERESOLVE peer conflict on install | Mismatched apify/crawlee majors | Pin both to matching majors, e.g. apify@3 crawlee@3 |
Example 1 — Straight version bump (no major boundary). Update within v3 and confirm nothing broke:
git checkout -b upgrade/apify-packages
npm install apify@latest crawlee@latest apify-client@latest
npm test && npm run build
Example 2 — v2 → v3 crawler migration. Rename the removed option names in a crawler config:
// BEFORE (v2)
const crawler = new Apify.CheerioCrawler({
handlePageFunction: async ({ request, $ }) => { /* ... */ },
});
// AFTER (v3 / Crawlee)
const crawler = new CheerioCrawler({
requestHandler: async ({ request, $ }) => { /* ... */ },
});
Example 3 — apify-client constructor change. Drop the removed userId:
// v1.x
const client = new ApifyClient({ userId: 'xxx', token: 'yyy' });
// v2+
const client = new ApifyClient({ token: 'yyy' });
Deeper walkthroughs — the complete v2→v3 rename set and the full verification script — live in references/.
For CI integration during upgrades, see apify-ci-integration.
What SKILL.md sets; muted values are Claude Code's defaults
18 skills in this plugin
/apify-ci-integrationConfigure CI/CD pipelines for Apify Actor builds and deployments.
Use when automating Actor deployment via GitHub Actions, running
integration tests against the live Apify API, or building CI/CD for
scrapers that push to the Apify platform.
Trigger with "apify CI", "apify GitHub Actions", "apify automated deploy",
"CI apify", "apify pipeline", "auto deploy actor".
/apify-common-errorsDiagnose and fix common Apify Actor and API errors.
Use when an Apify run fails, an API call returns 401/403/404/413/429,
a proxy connection drops, an Actor build breaks, or a scrape hits an
anti-bot block, and you need the cause plus a copy-paste fix.
Trigger with "apify error", "fix apify", "actor failed",
"apify not working", "debug apify", "apify 429".
/apify-core-workflow-aBuild a complete web scraping Actor with Crawlee and deploy to Apify.
Use when you need end-to-end web scraping on Apify: defining an input schema, building a router-based Crawlee crawler, extracting structured data, storing results in a dataset, testing locally, and deploying the Actor to the platform.
Trigger with "apify scrape website", "build apify actor", "crawlee scraper", "apify main workflow".
/apify-core-workflow-bManage Apify datasets, key-value stores, and request queues programmatically,
and orchestrate multi-Actor pipelines.
Use when you need to read or write Apify datasets, export scraped data to
CSV/JSON/XLSX, store config or binary artifacts in a key-value store, manage a
resumable request queue, chain Actors into a scrape → transform → export
pipeline, or monitor Actor run status and cost.
Trigger with "apify dataset", "apify key-value store", "apify storage",
"export apify data", "apify pipeline", "apify request queue".
/apify-cost-tuningOptimize Apify platform costs through memory tuning, compute unit management, and proxy budgeting. Use when analyzing Apify billing, reducing Actor run costs, or implementing usage monitoring and budget alerts. Trigger with "apify cost", "apify billing", "reduce apify costs", "apify pricing", "apify expensive", "apify budget", "compute units"./apify-debug-bundleCollect 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".
npx claudepluginhub jeremylongshore/tons-of-skills-marketplace --plugin apify-packOther plugins' skills for the same job