Agent skill

Apify Reference Architecture

by jeremylongshore in jeremylongshore/tons-of-skills-marketplace

Production-grade architecture patterns for Apify-powered applications.

MITAuto-check passedData & Analytics

Install Apify Reference Architecture

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

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

GitHub CLI
$ gh skill install jeremylongshore/tons-of-skills-marketplace apify-reference-architecture --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-reference-architecture .claude/skills/apify-reference-architecture && 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-reference-architecture
GitHub stars
2.8k
Token cost
~1.5k tokens
SKILL.md length
537 words
Files
3 (incl. references)
Skills in repo
3,342
Repo updated
First seen
Licence
MIT

At a glance

Production-grade architecture patterns for Apify-powered applications.

  • Works in 3 steps: Standalone Actor — one scraper deployed… → Multi-Actor Pipeline — a discover →… → Full-Stack Integration — an application…
  • Designing scraping infrastructure
  • SKILL.md covers Overview, Prerequisites, Instructions and Output, plus 3 more sections
  • Calls npm; needs APIFY_TOKEN

What it does

Apify Reference Architecture is an agent skill from jeremylongshore/tons-of-skills-marketplace. Production-grade architecture patterns for Apify-powered applications. Use when designing scraping infrastructure, building multi-Actor pipelines, or integrating Apify into a larger system architecture. Trigger with "apify architecture", "apify best practices", "apify project structure", "scraping architecture", "apify system design".

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

It sits in Data & Analytics, covering Web scraping and Software architecture. 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

  • Designing scraping infrastructure
  • Building multi-Actor pipelines
  • Integrating Apify into a larger system architecture
  • With apify architecture

Example prompts

  • “apify architecture”
  • “apify best practices”
  • “apify project structure”
  • “/apify-reference-architecture”

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

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

  1. Standalone Actor — one scraper deployed to the Apify platform.
  2. Multi-Actor Pipeline — a discover → scrape → transform chain of Actors.
  3. Full-Stack Integration — an application using Apify as a data source behind a service layer.

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):

    • docs.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 Reference Architecture loads about 1.5k tokens when it runs, and up to ~4.6k if it reads all its reference files. Until then it costs about 91 tokens; SKILL.md has 537 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.5k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~4.6k

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). 537 words, ~1,517 tokens.

Download SKILL.mdSave it as .claude/skills/apify-reference-architecture/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
apify-reference-architecture
description
Production-grade architecture patterns for Apify-powered applications. Use when designing scraping infrastructure, building multi-Actor pipelines, or integrating Apify into a larger system architecture. Trigger with "apify architecture", "apify best practices", "apify project structure", "scraping architecture", "apify system design".
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 Reference Architecture

Overview

Production-ready architecture patterns for applications built on Apify. Three patterns scale from a single scraper to a full-stack integration:

  1. Standalone Actor — one scraper deployed to the Apify platform.
  2. Multi-Actor Pipeline — a discover → scrape → transform chain of Actors.
  3. Full-Stack Integration — an application using Apify as a data source behind a service layer.

This skill helps you choose the right pattern, lay out the directory structure, and wire the skeleton code. Full directory trees, diagrams, and code for every pattern live in references/architecture-patterns.md; the service layer, configuration loader, and health check live in references/implementation.md.

Prerequisites

  • Runtime: Node.js >=18, TypeScript, and the Apify CLI (npm i -g apify-cli).
  • Packages: apify + crawlee (inside an Actor), apify-client (calling Actors from an app), zod (input validation).
  • Auth: an Apify API token. Set APIFY_TOKEN in the environment; the Apify SDK and apify-client read it automatically (or pass it explicitly to new ApifyClient({ token })). Never hardcode the token — inject it via env var and validate at startup.
  • Access: Read and Grep the target repository so you can match the recommended layout against the code already on disk before proposing changes.

Instructions

  1. Pick the pattern. One scraper → Pattern 1. A staged workflow that discovers, scrapes, then cleans → Pattern 2. An app that consumes scraped data → Pattern 3.
  2. Grep the existing repo for apify, apify-client, and Actor.main to see what is already wired, so you extend rather than duplicate structure.
  3. Lay out the directory from the pattern's tree in references/architecture-patterns.md. Keep routing, extraction, and validation in separate modules.
  4. Add typed input validation with zod (see src/types.ts in the reference) so bad input fails fast at the Actor boundary instead of mid-crawl.
  5. Isolate every Apify call behind a service layer (Pattern 3) using the ApifyService class in references/implementation.md — the rest of the app never imports apify-client directly.
  6. Load configuration once at startup via loadConfig() and layer per-environment overrides on a single base object; validate required env vars before serving traffic.
  7. Expose an Apify health check so a bad token or platform outage surfaces before a user-facing scrape fails.
Show full SKILL.md (186 more words)Show less

Output

Applying this skill produces an architecture, not a running command. Expect:

  • A recommended directory layout for the chosen pattern.
  • Skeleton TypeScript modules (main.ts, types.ts, service layer, config loader, health check).
  • A per-environment configuration strategy and an Apify health signal.
  • For pipelines, an orchestrator that reports per-stage item counts and total USD cost, e.g.:
=== Pipeline Summary ===
Discovered: 320 URLs
Scraped:    298 items
Clean:      271 items
Total cost: $0.4120

Error Handling

IssueCauseSolution
Circular dependenciesService imports serviceUse dependency injection
Missing configEnv var not setValidate at startup with loadConfig()
Pipeline stage failureActor crash mid-pipelineAdd retry logic per stage
State managementTracking run statusUse webhook handler + database
Run not ready errorFetching results before SUCCEEDEDPoll getRunStatus or use a completion webhook

Examples

Standalone Actor entry point — the minimal skeleton; full file in references/architecture-patterns.md:

typescript
// src/main.ts
import { Actor } from 'apify';
import { CheerioCrawler } from 'crawlee';
import { router } from './routes/listing';
import { validateInput, ScraperInput } from './types';

await Actor.main(async () => {
  const input = validateInput(await Actor.getInput<ScraperInput>());
  const crawler = new CheerioCrawler({
    requestHandler: router,
    maxRequestsPerCrawl: input.maxItems ?? 100,
    maxConcurrency: input.concurrency ?? 10,
  });
  await crawler.run(input.startUrls.map(s => s.url));
});

Calling an Actor from an app — via the service layer:

typescript
const apify = new ApifyService(process.env.APIFY_TOKEN!);
const { runId } = await apify.startScrape(['https://example.com']);
const results = await apify.getResults<ProductOutput>(runId);

More: the multi-stage pipeline orchestrator and the full ApifyService class are in references/architecture-patterns.md and references/implementation.md. For multi-environment setup, see the companion apify-deploy-integration skill.

Resources

© 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 2 other files (references) in skills/.curated/apify-reference-architecture of jeremylongshore/tons-of-skills-marketplace.

  • SKILL.md
  • references/architecture-patterns.md
  • references/implementation.md

Open the folder on GitHubat commit cfae287

Compare with similar skills

Apify Reference Architecture 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 Reference Architecture compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Apify Reference Architecture this skilljeremylongshore/tons-of-skills-marketplace2.8k—~1.5kAutomated safety check: PassMIT
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
Apify Lead Scoring Enrichmentapify/awesome-skills266—~4.4kAutomated safety check: NotesApache-2.0
Carousel Benchmarknestyme/awesome-prompts151—~2.6kAutomated safety check: NotesNone

Similar skills

  • 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 today
    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 Lead Scoring Enrichment

    apify/awesome-skills

    Official

    Score and enrich a CSV of B2B leads using Apify Actors. An agent skill from apify/awesome-skills.

    266 GitHub stars~4.4k tokensUpdated 17 days ago
    Data & AnalyticsAuto-check: notes
  • Carousel Benchmark

    nestyme/awesome-prompts

    Find the TikTok photo-mode carousels (slideshows) that actually go viral in a niche and the accounts behind them, rank them by organic quality (save-rate, like-rate, boost detection) instead of raw…

    151 GitHub stars~2.6k tokensUpdated 9 days ago
    Data & AnalyticsAuto-check: notes
  • Blog Feed Monitor

    gooseworks-ai/goose-skills

    Scrape blog posts via RSS feeds (free, no API key) with Apify fallback for JS-heavy sites.

    1.2k GitHub starsUsed in 1 repo~578 tokens
    Data & AnalyticsAuto-check passed

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 Reference Architecture

What does Apify Reference Architecture do?

Production-grade architecture patterns for Apify-powered applications. Apify Reference Architecture is an agent skill from jeremylongshore/tons-of-skills-marketplace. Production-grade architecture patterns for Apify-powered applications.

When should I use Apify Reference Architecture?

Apify Reference Architecture fits situations like: designing scraping infrastructure; building multi-Actor pipelines; integrating Apify into a larger system architecture; with apify architecture.

How do I install Apify Reference Architecture in Claude Code?

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

How do I install Apify Reference Architecture in Codex?

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

Can I use Apify Reference Architecture 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-reference-architecture -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-reference-architecture, .gemini/skills/apify-reference-architecture, .github/skills/apify-reference-architecture and .opencode/skills/apify-reference-architecture in your project.

What does Apify Reference Architecture need to run?

Going by SKILL.md and its folder, Apify Reference Architecture 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 Reference Architecture access the network?

SKILL.md names 1 domain. As links in the text: docs.apify.com. This is read from the text; nothing was executed.

Is Apify Reference Architecture 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 Reference Architecture use?

Apify Reference Architecture 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 Reference Architecture use?

About 1.5k tokens (SKILL.md is roughly 6.1k 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 3k tokens, read only when the agent opens those files.

What are the alternatives to Apify Reference Architecture?

Skills that share tags, products or a category with Apify Reference Architecture: Reddit Post Finder (gooseworks-ai/goose-skills, 1.2k stars), Apify CLI (apify/apify-cli, 256 stars), Apify Collect (extrasmall0/dear-hiring-manager, 111 stars) and Apify Lead Scoring Enrichment (apify/awesome-skills, 266 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Apify Reference Architecture?

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.