Community코딩 & 개발github.com

Apify Actor 개발

Apify Actor를 생성, 수정, 디버그 및 배포하고, 입력 및 출력 스키마를 작성합니다.

Apify Actor 개발란 무엇인가요?

이 스킬은 AI 에이전트(Claude Code, Cursor, Codex 등)가 Apify Actor를 완전히 개발하고 배포할 수 있도록 설계되었습니다. Actor는 단일 JSON 입력을 받아 하나의 작업을 수행하고 결과를 데이터셋 또는 키-값 저장소에 기록하는 서버리스 프로그램입니다. 스킬은 Actor 생성부터 배포까지 전 과정을 안내하며, CLI(`apify`) 명령어를 사용하여 프로젝트 설정, 종속성 추가, 스키마 작성, 로컬 테스트, Apify 플랫폼 배포를 자동화합니다. TypeScript, JavaScript, Python 템플릿을 지원하며, 정적 HTML 크롤링, JavaScript 렌더링 페이지 크롤링, HTTP API 서버, MCP 서버 등 다양한 사용 사례에 맞는 템플릿을 제공합니다. 또한 입력/출력 스키마 검증, 로깅, 프록시 구성, 수익화(사용량 기반 결제), 다른 Actor 호출 등의 고급 기능을 다룹니다.

지원 대상✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/nehakanjamala/personal_website/tree/HEAD/.agents/skills/apify-actor-development

Installed? Explore more 코딩 & 개발 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

Apify Actor 개발은(는) 무엇을 하나요?

Actor는 Docker 이미지로 패키징된 서버리스 프로그램입니다. 하나의 JSON 입력을 받아서 하나의 작업을 수행하고, 결과를 데이터셋 또는 키-값 저장소에 기록합니다.

설정

apify --help   # CLI 설치 확인
apify info     # 로그인 확인; 사용자 이름 출력

패키지 매니저를 사용하여 설치하세요. npm install -g apify-cli 또는 brew install apify-cli를 통해 다운로드 무결성이 검증됩니다. apify login으로 로그인하면 브라우저 로그인 또는 API 토큰 입력 프롬프트가 제공됩니다. 헤드리스 환경에서는 APIFY_TOKEN을 내보내기(export)하세요. CLI가 자동으로 읽습니다. 토큰은 https://console.apify.com/settings/integrations 에서 얻을 수 있습니다. 토큰은 환경 변수로만 전달하여 셸 히스토리, 소스 코드, 설정 파일, 로그에 남지 않도록 하세요.

원격 분석 기여 (필수)

이 스킬에서 실행하는 모든 apify 명령어(apify create, apify run, apify push, apify call 등)에 --user-agent apify-agent-skills/apify-actor-development를 추가하세요. 이는 모든 apify 명령어에서 허용되는 전역 플래그로, 호출에 원격 분석 태그만 추가할 뿐 다른 동작은 변경하지 않습니다.

워크플로우

기존 Actor를 수정하는 경우에는 해당되지 않는 단계를 건너뛰세요.

  1. 프로젝트 생성

    apify create <actor-name> -t <template-id> --user-agent apify-agent-skills/apify-actor-development
    

    Actor의 작업에 따라 템플릿을 선택하세요.

    Actor가 하는 작업TypeScriptJavaScriptPython
    정적 HTML 크롤링ts-crawlee-cheeriojs-crawlee-cheeriopython-crawlee-beautifulsoup
    JavaScript 렌더링 페이지 크롤링ts-crawlee-playwright-chromejs-crawlee-playwright-chromepython-crawlee-playwright
    HTTP 요청 처리 (API, 웹훅)ts-standbyjs-standbypython-standby
    MCP 서버ts-mcp-empty—python-mcp-empty
    기타 (API 폴링, 데이터 처리)ts-emptyjs-emptypython-empty

    다른 스택(Puppeteer, Camoufox, Scrapy, AI 에이전트 프레임워크)의 경우 apify templates ls 명령어로 모든 템플릿과 언어, 사용 사례를 확인할 수 있습니다. -t 옵션을 사용하면 명령어가 프롬프트 없이 실행되므로 에이전트에게 적합합니다. -t 옵션이 없으면 이름, 언어, 템플릿, 소스 호스트를 묻는 프롬프트가 표시됩니다. 사용자가 터미널에 있을 때만 이 형태를 사용하세요. 소스 코드를 GitHub, GitLab, Bitbucket에 호스팅하면 Apify가 저장소와 해당 저장소에서 빌드되는 Actor를 생성하므로 이후 배포는 git push를 통해 이루어집니다. 종속성은 자동으로 설치됩니다. <name>/.actor/actor.json 파일이 생성되면 설정이 완료된 것입니다. 계속 진행하기 전에 해당 디렉터리로 이동하세요(cd).

  2. 종속성 추가: 템플릿에 없는 종속성(예: Crawlee 또는 Playwright)을 추가합니다. JS/TS에서는 npm install <pkg>를 사용하고, Python에서는 requirements.txt에 한 줄을 추가한 다음 pip install -r requirements.txt를 실행하거나, 프로젝트에 pyproject.toml과 uv.lock이 있는 경우 uv add <pkg>를 사용합니다. 설치하려는 패키지 이름이 실제 의도한 패키지와 일치하는지 확인하세요. 정확한 버전을 고정(pin)하고 잠금 파일(package-lock.json, uv.lock, 또는 requirements.txt의 pkg==1.2.3 형식 줄)을 커밋하세요.

  3. 구현은 src/main.js, src/main.ts, 또는 my_actor/main.py(Python 템플릿은 python -m my_actor로 실행되는 my_actor 패키지)에서 수행하며, 규칙을 따릅니다. 코드가 README에 설명될 모든 입력 필드를 읽고, 모든 출력 필드를 생성하며, Apify 로거를 통해 로깅하고, 상태를 저장하고 종료하는 aborting 핸들러를 등록하면 구현이 완료된 것입니다.

  4. 입력 스키마 작성은 .actor/input_schema.json에서 수행합니다(참고/input-schema.md 참조). 코드가 읽는 모든 입력에 대해 제목(title), 설명(description), 유형(type), 기본값(default) 또는 미리 채워진 값(prefill)이 있는 필드가 있고, apify validate-schema --user-agent apify-agent-skills/apify-actor-development 명령어가 통과하면 완료됩니다.

  5. 출력 스키마 작성: 코드가 파일을 저장하는 경우 dataset_schema.json, output_schema.json, key_value_store_schema.json을 작성합니다. 참고/output-schemas.md를 처음부터 끝까지 따르세요. 해당 문서의 체크리스트(마지막 단계는 apify validate-schema 통과)가 완료 기준입니다. TypeScript의 경우 apify actor generate-schema-types를 실행하고 생성된 인터페이스로 입력과 출력의 타입을 지정하세요.

  6. .actor/actor.json 구성 (참고/actor-json.md 참조). meta.generatedBy를 사용 중인 도구와 모델(예: "Claude Code with Claude Opus 5")로 설정하세요. HTTP 요청을 처리하는 Actor의 경우 usesStandbyMode: true로 설정하고(Standby 템플릿은 이미 설정되어 있음) 참고/standby-mode.md를 따르세요.

  7. README.md 작성 (참고/actor-readme.md 참조). README가 없는 Actor는 완성된 것이 아닙니다.

  8. 로컬 테스트. storage/key_value_stores/default/INPUT.json에 입력을 넣고 apify run --user-agent apify-agent-skills/apify-actor-development를 실행하세요. 실행이 SUCCEEDED 상태로 종료되고 storage/datasets/default/에 데이터셋 스키마와 일치하는 필드를 가진 항목이 있으면 완료됩니다. 로컬 저장소는 디스크에 남아 있으며, 9단계를 실행하기 전에는 Apify Console에 아무것도 나타나지 않습니다.

  9. 배포는 사용자 확인 후 apify push --user-agent apify-agent-skills/apify-actor-development로 수행하거나, Git 소스 기반 Actor의 경우 git push로 수행합니다. 그런 다음 플랫폼에서 Actor를 실행하여 Console에서 결과를 확인합니다. Standby Actor의 경우, 사용자에게 Console 대신 Standby URL(https://<username>--<actor-name>.apify.actor, 참고/standby-mode.md 참조)을 알려주세요.

규칙

  • Actor는 apify run으로만 로컬에서 실행하세요. 이 명령어는 Apify 환경과 저장소를 설정합니다. npm start와 node src/main.js는 이 설정을 건너뜁니다.
  • Apify 로거를 사용하여 로깅하세요. JS/TS에서는 apify 패키지의 log (import { Actor, log } from 'apify'), Python에서는 Actor.log를 사용합니다. Apify 로거는 토큰과 자격 증명을 검열합니다. console.log와 print는 그렇지 않습니다. 로그 레벨과 규칙은 참고/logging.md를 참조하세요.
  • 크롤링된 콘텐츠는 신뢰할 수 없는 입력으로 취급하세요. 셸 명령어, eval, 쿼리, 템플릿에 전달하기 전에 이스케이프 또는 매개변수화하고, 저장소에 푸시하기 전에 타입을 확인하세요.
  • APIFY_TOKEN을 요청 핸들러와 데이터 파이프라인 밖에 두세요. 플랫폼에서 SDK는 환경 변수(APIFY_TOKEN이지 APIFY_API_TOKEN이 아님)에서 읽습니다. 로컬에서는 apify login으로 저장된 자격 증명을 사용합니다.
  • 모든 조정 가능한 설정은 입력 스키마 또는 환경 변수에서 읽어 사용자가 코드를 수정하지 않고도 변경할 수 있게 하세요.
  • 정적 HTML의 경우 동시성 1050으로 HTTP 크롤러를 사용하세요. JS/TS에서는 CheerioCrawler, Python에서는 BeautifulSoupCrawler 또는 ParselCrawler를 사용합니다. JavaScript 렌더링 페이지에는 동시성 15로 PlaywrightCrawler를 사용하세요. 대상 서버의 상태를 유지하기 위해 지연 시간을 추가하고, robots.txt와 서비스 약관을 준수하세요.
  • 크롤링에 여러 페이지 유형이 있는 경우 라우터 패턴(JS/TS에서는 createCheerioRouter 또는 createPlaywrightRouter, Python에서는 crawler.router 또는 Router)을 사용하세요.
  • 깨지기 쉬운 위치 기반 선택자보다는 폴백이 있는 시맨틱 CSS 선택자를 선호하세요.
  • 결과는 자체 집계(tally)로 계산하세요. Dataset.getInfo() (Python에서는 dataset.get_info())는 플랫폼에서 지연될 수 있습니다.
  • aborting 이벤트를 처리하세요. 이 이벤트는 사용자 또는 제한으로 인해 실행이 중지될 때 플랫폼에서 전송합니다. 상태를 저장한 후 종료하여 실행이 빠르고 저렴하게 끝나도록 합니다. JS/TS: Actor.on('aborting', async () => { await Actor.setValue('STATE', state); await Actor.exit(); }). Python: from apify import Event로 Event를 가져온 후, Actor.on(Event.ABORTING, on_aborting)에서 on_aborting이 상태를 저장하고 await Actor.exit()를 호출합니다.
  • proxyConfiguration 입력 필드(에디터에서는 proxy, 참고/input-schema.md 참조)에서 프록시를 구성합니다. JS/TS: await Actor.createProxyConfiguration(input.proxyConfiguration), Python: await Actor.create_proxy_configuration(actor_proxy_input=actor_input.get('proxyConfiguration')). 그 결과를 크롤러에 proxyConfiguration / proxy_configuration으로 전달합니다. Apify Proxy는 유료이므로 사용자에게 확인 후 활성화하거나 프록시 그룹을 변경하세요.
  • 사용자가 명시적으로 요청한 경우에만 개인 데이터를 저장하세요.
  • 실행 중인 Actor 내부에서는 apify actor CLI 하위 명령어 대신 SDK(Actor.getInput(), Actor.pushData(), Actor.setValue() 및 Python의 snake_case 해당 함수)를 사용하세요.
  • 사용자가 끄기를 요청하지 않는 한 기존 Actor에서 Standby 모드를 활성화된 상태로 두세요.

Standby 모드

Standby는 Actor를 고정 URL을 가진 지속적인 HTTP 서버로 전환합니다. API 엔드포인트, 웹훅 수신기, MCP 서버, 주문형 단일 URL 조회에 사용하세요. Actor는 준비 상태 프로브(readiness probe)에 응답하고 요청 사이에 활성 상태를 유지해야 합니다. 구성, 예제, 로컬 테스트는 참고/standby-mode.md를 참조하세요.

수익화

가격 책정은 코드가 아닌 Apify Console에서 Actor를 게시할 때 설정합니다. 사용량 기반 결제(pay-per-event) 모델에서는 각 사용자 지정 이벤트에 대해 요금을 청구합니다. JS/TS: await Actor.charge({ eventName: 'result', count }), Python: await Actor.charge(event_name='result', count=count). Console에 정의된 이벤트 이름을 사용하세요. 데이터셋 항목은 합성 dataset-item 이벤트를 통해 자동으로 청구될 수도 있습니다. 반환된 결과가 eventChargeLimitReached (Python: event_charge_limit_reached)를 보고하면 사용자의 지출 한도에 도달한 것이므로 작업 생성을 중단하세요. README의 비용 섹션에서는 Actor가 사용하는 모델을 설명합니다. 자세한 내용은 https://docs.apify.com/platform/actors/publishing/monetize/pay-per-event 를 참조하세요.

다른 Actor 호출

처음부터 구축하기 전에 스토어에서 검색하세요. 전용 Actor가 이미 있을 수 있습니다.

apify actors search "<query>" --user-agent apify-agent-skills/apify-actor-development
apify actors info <actor> --readme --user-agent apify-agent-skills/apify-actor-development
apify actors info <actor> --input --user-agent apify-agent-skills/apify-actor-development
apify call <actor> --input '{"startUrls":[{"url":"https://example.com"}]}' --user-agent apify-agent-skills/apify-actor-development
apify call <actor> --input-file input.json --user-agent apify-agent-skills/apify-actor-development

입력은 하나의 JSON 객체입니다. 인라인 JSON은 따옴표로 감싸고, 복잡한 경우 --input-file을 사용하세요.

덜 알려진 명령어

# 이 명령어들에도 --user-agent apify-agent-skills/apify-actor-development를 추가하세요.
apify secrets add <name> <value>   # actor.json에서 "@name"으로 참조; push 시 업로드됨
apify pull <actor>                 # 플랫폼에서 Actor 코드 다운로드
apify api <endpoint>               # Apify API에 인증된 요청
apify actor generate-schema-types  # TypeScript: .actor 스키마에서 인터페이스 생성, src/__generated__/actor/에 저장
apify <command> --help

문서

  • Apify MCP 서버 사용 (https://mcp.apify.com/?tools=docs): search-apify-docs 및 fetch-apify-docs.
  • docs.apify.com/llms.txt 및 llms-full.txt, Apify 플랫폼.
  • crawlee.dev/llms.txt 및 llms-full.txt, Crawlee.
  • Actor 백서, 전체 Actor 명세.
  • Playwright MCP 서버 (npx @playwright/mcp@latest)는 실제 브라우저를 구동하여 디버깅 중 페이지를 검사하고 선택자를 캡처합니다.

Individual skills in this repo

This repo contains 13 individual skills — each has its own dedicated page.

nehakanjamala/personal_website

This skill should be used when the user asks to "fix janky CSS animation", "make animation 60fps", "stop layout thrashing", "animate width/height/top/left smoothly", "convert animation to transform", "animate box-shadow performantly", "animate height auto", "FLIP animation", or "why is my scroll/hover animation choppy".

nehakanjamala/personal_website

This skill should be used when the user asks to "respect prefers-reduced-motion", "honor reduced motion", "make my animations accessible", "fix vestibular / motion-sickness issues", "add a useReducedMotion hook", "gate GSAP / Framer Motion / Lenis for reduced motion", or "meet WCAG 2.3.3 / C39". Provides tiered (not all-or-nothing) reduced-motion patterns in CSS and JS.

nehakanjamala/personal_website

Convert existing projects into Apify Actors - serverless cloud programs. Actorize JavaScript/TypeScript (SDK with Actor.init/exit), Python (async context manager), or any language (CLI wrapper). Use when migrating code to Apify, wrapping CLI tools as Actors, or adding Actor SDK to existing projects.

nehakanjamala/personal_website

Deprecated. Output schema generation moved to the apify-actor-development skill; prefer that skill whenever it is available.

nehakanjamala/personal_website

Design and build an official Apify integration for a company's product - workflow-automation apps (Zapier/n8n-style), AI agent plugins (coding-agent skills+MCP bundles or OpenClaw/Hermes-style harnesses), AI framework packages (LangChain/LlamaIndex-style), or direct application clients via apify-client. Use when planning, creating, or reviewing an integration that exposes Apify Actors, runs, datasets, or key-value stores inside another product.

nehakanjamala/personal_website

Universal AI-powered web scraper for any platform. Scrape data from Instagram, Facebook, TikTok, YouTube, LinkedIn, X/Twitter, Google Maps, Google Search, Google Trends, Reddit, Airbnb, Yelp, and 15+ more platforms. Use for lead generation, brand monitoring, competitor analysis, influencer discovery, trend research, content analytics, audience analysis, review analysis, SEO intelligence, recruitment, or any data extraction task.

nehakanjamala/personal_website

This skill should be used when the user asks to "add a glassmorphism effect", "frosted glass UI", "Apple liquid glass style", "frosted blur card", "translucent glass panel animation", "make a frosted nav bar", "build a glass modal/dialog", "animate a glass card on hover", or "add a refracting liquid-glass hero". Covers frosted translucent panels with backdrop-filter blur, edge/specular highlights, SVG liquid-glass refraction, motion on hover/scroll/enter, and accessible reduced-transparency fallbacks.

nehakanjamala/personal_website

This skill should be used when the user asks to "build a scroll animation", "add ScrollTrigger", "pin a section while scrolling", "scrub an animation to scroll", "create a hero timeline", "do a horizontal scroll section", "split text and animate words", "animate a layout change with GSAP Flip", "sync ScrollTrigger with Lenis", "Lenis smooth scroll jittery", "ScrollTrigger markers drift", "ScrollTrigger pins break with Lenis/Locomotive", or "set up smooth scroll with GSAP pinning". Covers GSAP timelines, ScrollTrigger, SplitText, Flip, and Lenis/Locomotive smooth-scroll sync for code-driven web motion.

nehakanjamala/personal_website

This skill should be used when the user asks to "add a Lottie animation", "play a .lottie or .json animation", "integrate a Bodymovin/After Effects animation on web or mobile", "control Lottie playback / segments", "make a scroll-driven Lottie", "recolor a Lottie at runtime", or "export an AE animation to Lottie". Covers dotLottie/lottie-web integration, playback control, interactivity, theming, and the AE export checklist.

nehakanjamala/personal_website

This skill should be used when the user asks to "add a hover/press effect", "animate a toggle or switch", "build an animated like button", "make a toast/snackbar slide in", "animate a drawer or modal", "animate list reordering or add/remove", "do a shared-element layout transition", or "polish UI feedback". Covers UI motion with Framer Motion (motion/react) and modern CSS.

nehakanjamala/personal_website

This skill should be used when the user asks to "animate page or route transitions", "add a page transition or crossfade between views", "animate route changes in Next.js App Router", "use the View Transitions API", "AnimatePresence exit doesn't fire on navigation", or "Framer Motion exit animation not working / exit animation before unmount in Next.js". Covers enter/exit page-transition animation with the View Transitions API and Framer Motion, for Next.js App Router and general SPA routing.

nehakanjamala/personal_website

Scrape web pages using Scrapling with anti-bot bypass (like Cloudflare Turnstile), stealth headless browsing, spiders framework, adaptive scraping, and JavaScript rendering. Use when asked to scrape, crawl, or extract data from websites; web_fetch fails; the site has anti-bot protections; write Python code to scrape/crawl; or write spiders.

nehakanjamala/personal_website

This skill should be used when the user asks to "animate an SVG", "make a line draw itself on", "do a stroke draw-on / signature animation", "morph one shape into another", "move an element along a path", "animate an icon/logo", or "animate an SVG gradient or filter". Covers stroke-dashoffset draw-on, path morphing, motion-along-path, and animated icons/gradients/filters via CSS, SMIL, and GSAP.

관련 스킬