Optimize Apify platform costs through memory tuning, compute unit management, and proxy budgeting.

MITAuto-check passedData & Analytics

Install Apify Cost Tuning

skills CLI
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill apify-cost-tuning -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install jeremylongshore/tons-of-skills-marketplace apify-cost-tuning --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/.curated/apify-cost-tuning .claude/skills/apify-cost-tuning && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
apify-cost-tuning
GitHub stars
2.8k
Token cost
~1.4k tokens
SKILL.md length
571 words
Files
4 (incl. references)
Skills in repo
3,342
Repo updated
First seen
Licence
MIT

At a glance

Optimize Apify platform costs through memory tuning, compute unit management, and proxy budgeting.

  • Works in 6 steps: Analyze current costs — roll up the last… → Reduce memory allocation (biggest lever)… → Optimize crawl duration — higher… → …
  • Analyzing Apify billing
  • SKILL.md covers Overview, Prerequisites, Instructions and Output, plus 5 more sections
  • Calls npm; needs APIFY_TOKEN

What it does

Apify Cost Tuning is an agent skill from jeremylongshore/tons-of-skills-marketplace. Optimize 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".

Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including reference files (for example `references/examples.md`, `references/implementation.md` and `references/pricing-model.md`). Compatibility notes: Designed for Claude Code

It sits in Data & Analytics, covering Web scraping and Budgeting and forecasting. It works with Apify. The repository describes itself as: Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com. The licence is MIT.

When your agent uses it

  • Analyzing Apify billing
  • Reducing Actor run costs
  • Implementing usage monitoring and budget alerts
  • With apify cost

Example prompts

  • “apify cost”
  • “apify billing”
  • “reduce apify costs”
  • “/apify-cost-tuning”

Requirements

  • Node.js
  • A credential in APIFY_TOKEN
  • Compatibility (from SKILL.md): Designed for Claude Code
  • Pre-approved tools (allowed-tools): Read, Grep

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Analyze current costs — roll up the last N days of runs into total CU, USD, and
  2. Reduce memory allocation (biggest lever) — sweep memory from 4096 MB down to
  3. Optimize crawl duration — higher maxConcurrency, tighter
  4. Minimize proxy costs — prefer datacenter (free with plan), only reach for
  5. Cost guard for runaway Actors — start the run, poll usageTotalUsd every 30s,
  6. Monitor monthly usage — iterate every Actor's runs since the 1st of the month

What it can do on your machine

Read from SKILL.md and the folder at commit cfae287. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Grep

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npm

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • apify.com
    • docs.apify.com
    • help.apify.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • APIFY_TOKEN

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Designed for Claude Code

    From compatibility in the SKILL.md frontmatter.

Context cost

Apify Cost Tuning loads about 1.4k tokens when it runs, and up to ~4.1k if it reads all its reference files. Until then it costs about 91 tokens; SKILL.md has 571 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~91
When it runs · the whole SKILL.md, loaded when a task matches
~1.4k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~4.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from jeremylongshore/tons-of-skills-marketplace at commit cfae287, republished under its MIT licence (© jeremylongshore). 571 words, ~1,414 tokens.

Download SKILL.mdSave it as .claude/skills/apify-cost-tuning/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
apify-cost-tuning
description
Optimize 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".
allowed-tools
Read, Grep
compatibility
Designed for Claude Code
version
1.5.0
license
MIT
author
Jeremy Longshore <jeremy@intentsolutions.io>
tags
saas, scraping, automation, apify

Apify Cost Tuning

Overview

Apify charges on three axes: compute units (CU), proxy traffic (GB), and storage. One CU = 1 GB of memory running for 1 hour, so cost scales with both memory allocation and run duration. This skill walks the investigate → tune → guard loop that finds where spend is going, cuts it at the biggest lever (memory), and installs guardrails so it stays down.

Full pricing tables (plan CU prices, proxy rates, storage rules) live in pricing-model.md.

Prerequisites

  • An Apify account with API access and APIFY_TOKEN set in the environment.
  • The apify-client package installed (npm install apify-client).
  • At least one Actor with run history to analyze.

Instructions

The workflow is six steps. Each is summarized here with its core lever; the full, runnable code for every step is in implementation.md.

  1. Analyze current costs — roll up the last N days of runs into total CU, USD, and duration, and surface the single most expensive run:

    typescript
    import { ApifyClient } from 'apify-client';
    const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
    
    const { items: runs } = await client.actor(actorId).runs().list({ limit: 1000, desc: true });
    const totalUsd = runs.reduce((s, r) => s + (r.usageTotalUsd ?? 0), 0);
  2. Reduce memory allocation (biggest lever) — sweep memory from 4096 MB down to 256 MB and stop at the first failure to find the sweet spot. Most CheerioCrawler Actors are over-provisioned. Sweet spots: simple Cheerio 256-512 MB, complex 512-1024 MB, Playwright 2048-4096 MB.

  3. Optimize crawl duration — higher maxConcurrency, tighter requestHandlerTimeoutSecs, a maxRequestsPerCrawl cap, fewer retries, and selective enqueueLinks. Faster crawls consume fewer CUs.

  4. Minimize proxy costs — prefer datacenter (free with plan), only reach for residential when a site blocks it, block images/fonts/CSS to save residential GB, and reuse proxy sessions with useSessionPool.

  5. Cost guard for runaway Actors — start the run, poll usageTotalUsd every 30s, and .abort() once spend crosses a hard cap.

  6. Monitor monthly usage — iterate every Actor's runs since the 1st of the month and print a cost-descending report so the top spenders are obvious.

See full walkthrough for the complete code of each step, including the memory sweep, proxy hooks, budget guard, and monthly report.

Show full SKILL.md (254 more words)Show less

Output

Running this skill produces:

  • A per-Actor cost analysis (runs, total CU, total USD, avg CU/run, avg cost/run, most expensive run) for a chosen lookback window.
  • A memory profile table mapping memory settings to status, duration, CU, and USD so you can pick the cheapest allocation that still succeeds.
  • A monthly cost report ranking every Actor by spend, with a grand total.
  • Tuned Actor configuration (reduced memory, capped crawls, proxy resource blocking) and an optional budget guard that aborts runs exceeding a USD ceiling.

Cost Optimization Checklist

  • Memory profiled (start low: 256-512MB for Cheerio)
  • maxRequestsPerCrawl set to prevent runaway crawls
  • Datacenter proxy used when possible (free with plan)
  • Residential proxy: images/CSS/fonts blocked to save bandwidth
  • maxConcurrency tuned (higher = faster = fewer CUs)
  • Scheduled runs have appropriate frequency (don't over-scrape)
  • Cost guard implemented for expensive runs
  • Monthly usage reviewed

Error Handling

IssueCauseSolution
Unexpected cost spikeNo maxRequestsPerCrawlAlways set an upper bound
High residential proxy costScraping images/fontsBlock non-essential resources
Over-provisioned memoryDefault 1024MBProfile and reduce to minimum
Too many scheduled runsAggressive cronReduce frequency if data freshness allows

Examples

Three worked scenarios chain the steps against concrete symptoms — a CheerioCrawler bill that tripled, runaway residential-proxy GB, and guarding a brand-new Actor. Each shows the full investigate → tune → verify loop. See examples.md.

Quick guard example — abort any run that exceeds $0.50:

typescript
// runWithBudget polls usageTotalUsd every 30s and aborts past the cap
const run = await runWithBudget('user/scraper', input, 0.50);

Resources

Next Steps

For architecture patterns, see apify-reference-architecture.

© jeremylongshore, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files (references) in skills/.curated/apify-cost-tuning of jeremylongshore/tons-of-skills-marketplace.

  • SKILL.md
  • references/examples.md
  • references/implementation.md
  • references/pricing-model.md

Open the folder on GitHubat commit cfae287

Compare with similar skills

Apify Cost Tuning next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Apify Cost Tuning compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Apify Cost Tuning this skilljeremylongshore/tons-of-skills-marketplace2.8k—~1.4kAutomated safety check: PassMIT
Linkedin Profile Post Scrapergooseworks-ai/goose-skills1.2k1 repos~495Automated safety check: PassMIT
Linkedin Message Writergooseworks-ai/goose-skills1.2k1 repos~3.4kAutomated safety check: NotesMIT
Reddit Post Findergooseworks-ai/goose-skills1.2k1 repos~1.2kAutomated safety check: PassMIT
Apify CLIapify/apify-cli256—~1.5kAutomated safety check: PassApache-2.0
Apify Collectextrasmall0/dear-hiring-manager111—~1.1kAutomated safety check: NotesMIT

Similar skills

  • Linkedin Profile Post Scraper

    gooseworks-ai/goose-skills

    Scrape recent posts from LinkedIn profiles using Apify. An agent skill from gooseworks-ai/goose-skills.

    1.2k GitHub starsUsed in 1 repo~495 tokens
    Data & AnalyticsAuto-check passed
  • Linkedin Message Writer

    gooseworks-ai/goose-skills

    Research LinkedIn profiles and write personalized messages for any LinkedIn message type — connection requests, InMails, DMs, message requests, post comments, and comment replies.

    1.2k GitHub starsUsed in 1 repo~3.4k tokens
    Data & AnalyticsAuto-check: notes
  • Reddit Post Finder

    gooseworks-ai/goose-skills

    Scrape and search Reddit posts using Apify. An agent skill from gooseworks-ai/goose-skills.

    1.2k GitHub starsUsed in 1 repo~1.2k tokens
    Data & AnalyticsAuto-check passed
  • Apify CLI

    apify/apify-cli

    Official

    Patterns for invoking the Apify CLI (apify) from agents. An agent skill from apify/apify-cli.

    256 GitHub stars~1.5k tokensUpdated yesterday
    Data & AnalyticsAuto-check passed
  • Apify Collect

    extrasmall0/dear-hiring-manager

    Collect fresh job-posting URLs into ~/.dear-hiring-manager/urls.txt by running an Apify job scraper — the discovery source for /batch.

    111 GitHub stars~1.1k tokensUpdated 2 mo ago
    Data & AnalyticsAuto-check: notes
  • Apify Buying Signal Detection

    apify/awesome-skills

    Official

    Set up a recurring buying-signal detection pipeline that finds companies showing buying intent across three signal types — job postings (hiring for the persona), fundraising events (recent raises)…

    266 GitHub stars~5.1k tokensUpdated 18 days ago
    Business, Finance & HRAuto-check: notes

More from jeremylongshore/tons-of-skills-marketplace

All 3,342 skills in this repo
  • Performing Security Code Review

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to conduct a security-focused code review using the security-agent plugin.

    2.8k GitHub starsUsed in 2 repos~1.3k tokens
    Auto-check: notes
  • Adapting Transfer Learning Models

    jeremylongshore/tons-of-skills-marketplace

    Build this skill automates the adaptation of pre-trained machine learning models using transfer learning techniques.

    2.8k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Agent Context Loader

    jeremylongshore/tons-of-skills-marketplace

    Execute proactive auto-loading: automatically detects and loads agents.md files.

    2.8k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Aggregating Performance Metrics

    jeremylongshore/tons-of-skills-marketplace

    Aggregate and centralize performance metrics from applications, systems, databases, caches, and services.

    2.8k GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Analyzing Capacity Planning

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to analyze capacity requirements and plan for future growth.

    2.8k GitHub stars~947 tokensUpdated today
    Auto-check passed
  • Analyzing Database Indexes

    jeremylongshore/tons-of-skills-marketplace

    Process use when you need to work with database indexing. An agent skill from jeremylongshore/tons-of-skills-marketplace.

    2.8k GitHub stars~2k tokensUpdated today
    Auto-check passed

Works with

Questions about Apify Cost Tuning

What does Apify Cost Tuning do?

Optimize Apify platform costs through memory tuning, compute unit management, and proxy budgeting. Apify Cost Tuning is an agent skill from jeremylongshore/tons-of-skills-marketplace. Optimize Apify platform costs through memory tuning, compute unit management, and proxy budgeting.

When should I use Apify Cost Tuning?

Apify Cost Tuning fits situations like: analyzing Apify billing; reducing Actor run costs; implementing usage monitoring and budget alerts; with apify cost.

How do I install Apify Cost Tuning in Claude Code?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill apify-cost-tuning -a claude-code`. Or copy the skill folder (skills/.curated/apify-cost-tuning in jeremylongshore/tons-of-skills-marketplace) into .claude/skills/apify-cost-tuning in your project. Claude Code loads it when a task matches its description.

How do I install Apify Cost Tuning in Codex?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill apify-cost-tuning -a codex`. Or copy the skill folder (skills/.curated/apify-cost-tuning in jeremylongshore/tons-of-skills-marketplace) into .agents/skills/apify-cost-tuning in your project. Codex loads it when a task matches its description.

Can I use Apify Cost Tuning in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill apify-cost-tuning -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/apify-cost-tuning, .gemini/skills/apify-cost-tuning, .github/skills/apify-cost-tuning and .opencode/skills/apify-cost-tuning in your project.

What does Apify Cost Tuning need to run?

Going by SKILL.md and its folder, Apify Cost Tuning needs the command-line tools its instructions call (npm) and credentials named APIFY_TOKEN. Our summary lists: Node.js; A credential in APIFY_TOKEN. Its frontmatter pre-approves these tools: Read, Grep. Compatibility (from SKILL.md): Designed for Claude Code.

Does Apify Cost Tuning access the network?

SKILL.md names 3 domains. As links in the text: apify.com, docs.apify.com and help.apify.com. This is read from the text; nothing was executed.

Is Apify Cost Tuning safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Apify Cost Tuning use?

Apify Cost Tuning is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Apify Cost Tuning use?

About 1.4k tokens (SKILL.md is roughly 5.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.7k tokens, read only when the agent opens those files.

What are the alternatives to Apify Cost Tuning?

Skills that share tags, products or a category with Apify Cost Tuning: Linkedin Profile Post Scraper (gooseworks-ai/goose-skills, 1.2k stars), Linkedin Message Writer (gooseworks-ai/goose-skills, 1.2k stars), Reddit Post Finder (gooseworks-ai/goose-skills, 1.2k stars) and Apify CLI (apify/apify-cli, 256 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Apify Cost Tuning?

jeremylongshore (a GitHub user) maintains it in jeremylongshore/tons-of-skills-marketplace, which has 2,827 GitHub stars. The repository holds 3,342 skills in this directory. The repository was last updated on October 10, 2026.

Source: jeremylongshore/tons-of-skills-marketplace on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.