Index of every page on this site: llms.txt
All skills
Run it yourself

Install and configure Apify SDK, CLI, and API client authentication. Use when setting up a new Apify project, configuring API tokens, or initializing apify-client / Apify SDK in your codebase. Trigger with "install apify", "setup apify", "apify auth", "configure apify token".

Use this Skill: https://skilld.dev/gh/jeremylongshore/tons-of-skills-marketplace/apify-install-auth

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencesexamples.md

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

Apify Install & Auth — Worked Examples

Copy-paste-ready setups that go one step past the SKILL.md skeleton. Each is a complete file you can drop into a real project.

TypeScript Project Setup — Singleton Client

A lazily-initialized singleton so the whole app shares one authenticated client and fails fast with a clear message when the token is missing.

// src/apify/client.ts
import { ApifyClient } from 'apify-client';
import 'dotenv/config'; // npm install dotenv

let client: ApifyClient | null = null;

export function getClient(): ApifyClient {
  if (!client) {
    if (!process.env.APIFY_TOKEN) {
      throw new Error('APIFY_TOKEN environment variable is required');
    }
    client = new ApifyClient({ token: process.env.APIFY_TOKEN });
  }
  return client;
}

.env.example Template

Commit this (with a placeholder), never the real .env.

# Apify — get your token at https://console.apify.com/account/integrations
APIFY_TOKEN=apify_api_REPLACE_ME

Verify Connection Snippet

Confirm the token authenticates before wiring the client into the rest of the app.

import { ApifyClient } from 'apify-client';

const client = new ApifyClient({
  token: process.env.APIFY_TOKEN,
});

// List your Actors to confirm auth works
const { items } = await client.actors().list();
console.log(`Authenticated. You have ${items.length} Actors.`);

CLI Verification

For interactive development where the CLI is installed globally.

apify login --token YOUR_TOKEN
apify info  # Shows your account info

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts2mo3 checks · Risk SAFE
  • Gen Agent Trust Hub2mo

    This skill provides instructions for setting up the Apify ecosystem, including the JS client, SDK, and CLI. It follows security best practices by recommending environment variables and .env files for credential management, using placeholders for tokens, and referencing official NPM packages. The command usage is restricted to necessary tools (npm, apify, npx).

  • Socket2mo

    No alerts

  • Snyk2mo

    Risk: LOW · No issues

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

Last checked against GitHub yesterday.

Activeupdated 4 months ago
What it can do
Reads files Edits files Runs commands
version
1.5.0
author
Jeremy Longshore <jeremy@intentsolutions.io>
tags
[
  "saas",
  "scraping",
  "automation",
  "apify"
]
All 5 allowed tools
ReadWriteBash(npm:*)Bash(npx:*)Bash(apify:*)
Other metadata
compatibility
Designed for Claude Code

README badge

README badge for jeremylongshore/tons-of-skills-marketplace/apify-install-auth