Wraps existing JS/TS, Python, or CLI tools as Apify Actors with JSON input/output, Docker packaging, and deployment via apify init, SDK lifecycle, and apify push.
Ships in 10-platform. 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.
None: SKILL.md is the whole skill.
不该用的边界:
apify-ecommerce-scraper 之类的调用型技能。apify CLI 或 APIFY_TOKEN 凭据。总清单(可复制用于跟踪进度):
apify init 在项目根目录生成 Actor 结构。.actor/input_schema.json。.actor/output_schema.json(如适用)。.actor/actor.json 元数据(务必填 meta.generatedBy)。apify run 本地测试。apify push 部署构建。apify init 会生成:.actor/actor.json(配置与元数据)、.actor/input_schema.json(输入定义)、Dockerfile(若不存在)。
前置检查:
apify --help # 确认 CLI 已装;未装:brew install apify-cli 或 npm install -g apify-cli
apify info # 应返回用户名;否则 apify login(先把 APIFY_TOKEN 写入 shell/密钥管理器,勿落入命令历史)
按语言集成(核心是用 Actor 生命周期包住主代码,本地执行不变——SDK 自动识别环境):
| 语言 | 安装 | 包裹方式 |
|---|---|---|
| JS/TS | npm install apify | await Actor.init() … await Actor.exit()(两者都要 await) |
| Python | pip install apify | async with Actor:(同时管初始化与清理) |
| 其他(CLI) | 包装脚本用 CLI | apify actor:get-input / apify actor:push-data |
读输入:Actor.getInput() / Actor.get_input()。
写输出:多条表格数据用 Actor.pushData() / Actor.push_data()(每条=数据集一行);单文件/二进制用 key-value store Actor.setValue() / Actor.set_value(),再把公开 URL 塞进数据集。
本地测试(务必用 apify run,不要 npm start / python main.py——CLI 才会建好正确的存储与环境):
apify run --input '{"startUrl": "https://example.com", "maxItems": 10}'
apify run --input-file ./test-input.json
部署:apify push(上传并在平台构建)。
文档查询:若配了 MCP,用 search-apify-docs / fetch-apify-docs;否则 MCP url https://mcp.apify.com/?tools=docs。
JS/TS 主代码包裹(Crawlee 项目只需这样包一层):
import { Actor } from 'apify';
await Actor.init();
const input = await Actor.getInput();
const { startUrl = 'https://example.com', maxItems = 100 } = input ?? {};
// ... 你的爬虫/处理逻辑,结果用 await Actor.pushData({ ... });
await Actor.exit();
Python 主函数包裹:
import asyncio
from apify import Actor
async def main() -> None:
async with Actor:
actor_input = await Actor.get_input() or {}
# ... 你的逻辑,结果用 await Actor.push_data({...})
if __name__ == '__main__':
asyncio.run(main())
CLI 包装(Go/Rust/Java 等无 SDK 语言)——根目录建 start.sh,Dockerfile 末尾 CMD ["./start.sh"]:
#!/bin/bash
set -e
INPUT=$(apify actor:get-input)
MY_PARAM=$(echo "$INPUT" | jq -r '.myParam // "default"')
./your-application --param "$MY_PARAM"
# apify actor:set-value OUTPUT --contentType application/json < output.json
# apify actor:push-data '{"result": "value"}'
input_schema.json 最小骨架(命令行参数→属性、环境变量→属性或 actor.json env、配置文件→对象/数组,并尽量拍平深层结构):
{
"title": "My Actor Input", "type": "object", "schemaVersion": 1,
"properties": {
"startUrl": {"title": "Start URL", "type": "string", "editor": "textfield", "prefill": "https://example.com"},
"maxItems": {"title": "Max Items", "type": "integer", "default": 100, "minimum": 1}
},
"required": ["startUrl"]
}
actor.json 元数据(记得填 generatedBy):
{
"actorSpecification": 1, "name": "my-actor", "title": "My Actor",
"version": "1.0.0",
"meta": {"templateId": "ts_empty", "generatedBy": "Claude Code"},
"input": "./input_schema.json", "dockerfile": "../Dockerfile"
}
变现(可选,上架后在 Console > Actor > Monetization 配置):推荐 Pay Per Event(PPE)——按抓取结果/处理页数/API 调用计费,代码里 await Actor.charge('result');另有 Rental(月订阅)、Free(开源)。
actor.json(含正确 name/description,过 @apify/json_schemas 的 actor.schema.json 校验、meta.generatedBy 已填);input_schema.json 定义全部必填输入并过 input.schema.json;output_schema.json(如适用)过 output.schema.json;Dockerfile 存在且能成功构建;主代码已被 Actor.init()/exit()(JS)或 async with Actor:(Python)包裹;输入经 getInput、输出经 pushData/KV store;apify run 用测试输入跑通。@apify/json_schemas npm 包校验,别凭手感写。apify run 测不了(它要 Node/Python 入口);本地用 export INPUT='{"myParam":"test"}'; ./start.sh 直测底层程序。CLI Dockerfile 参考 apify cli-start 模板(含安装 GitHub release 二进制的 ubi),并手动装 apify-cli 与 jq。"usesStandbyMode": true 并实现就绪探针。uniqueKey/userData);断点续跑用 KV store 存 STATE(Actor.setValue('STATE', {...}) / Actor.getValue('STATE'))。apify-ecommerce-scraper —— 同属 Apify 生态,前者是「调用现成 Actor 抓电商数据」,本条是「把自己的代码做成 Actor」。docker-container-optimizer —— Actor 本质是 Docker 镜像,构建/瘦身可参考。browser-automation-builder —— 把已有的浏览器自动化/爬虫脚本 Actor 化后托管运行。本条采编自 sickn33/antigravity-awesome-skills(MIT)。
What SKILL.md sets; muted values are Claude Code's defaults
66 skills in this plugin
/agentmail-email-infra当 AI 智能体需要真实邮箱完成注册/验证码/事务通信时使用;通过 AgentMail REST API 开通账号、收发邮件、注册 Webhook、查询 karma 余额并产出可执行调用;不适用于自建/企业 SMTP/IMAP 或个人邮箱代收。触发词:AgentMail、智能体邮箱、theagentmail.net/agentphone-voice-sms-agents当需要给 AI 代理配备电话号码、发起/接听语音通话、收发短信、查看通话转写或配置 Webhook 时使用;调用 AgentPhone REST API(base=https://api.agentphone.to/v1)完成代理/号码/通话/短信/Webhook/用量的全生命周期管理,产出可直接执行的 curl 与 Webhook 处理代码;不适用于自建 Twilio/SIP/STUN 等底层电信栈或非 AgentPhone 平台。触发词:电话代理、语音通话、短信、号码、Webhook、转写。/ai-native-cli-design当设计/改造供 AI 智能体调用的命令行工具时使用;按 core/recommended/ecosystem 三层产出 JSON 优先、可校验的 CLI 契约(默认 JSON、结构化错误、退出码、护栏、agent/ 目录与自描述);不适用于纯人类交互 CLI、GUI 或库 API 设计;触发词:agent CLI、AI 友好命令行、CLI JSON 输出、退出码规范、agent/ 目录/amazon-alexa-skill-builder当需要用 ASK CLI + AWS Lambda 开发 Amazon Alexa 语音技能、并以 Claude 作为对话大脑(含 DynamoDB 记忆、Polly 语音、APL 屏显、Smart Home 控制)时使用;做交互模型/Lambda 处理器/部署脚本的搭建与产出;不适用于纯网页/移动 App 或非 Alexa 平台语音助手;触发词:Alexa、ASK CLI、语音技能、Smart Home/apify-actor-development当需要创建、修改或调试 Apify Actor(无服务器 Docker 抓取/自动化程序)时使用;引导选模板、配 input/output schema 与 actor.json、写入口逻辑、本地 apify run 测试并 apify push 部署;不适用于已有现成 Actor 直接调用(用 apify-ecommerce-scraper)、无 APIFY_TOKEN、或普通网页抓取无需打包为 Actor。触发词:apify actor、apify create、apify push、input_schema、actor.json、爬虫部署、serverless scraper、crawlee/apify-ecommerce-scraper当需要从亚马逊、沃尔玛等电商平台批量抓取商品、价格、库存、评论或卖家数据(用于比价、MAP 监控、竞品分析、评论情感/质量分析、卖家发现)时使用;调用 Apify「e-commerce-scraping-tool」Actor,按三类工作流配置输入并导出 CSV/JSON 结果与洞察;不适用于无 APIFY_TOKEN、需自建爬虫绕过反爬、或抓取非电商页面。触发词:电商抓取、商品比价、价格监控、评论分析、卖家发现、apify、ecommerce scraping、product price、review scraping/10-platform:apify-actorizationfrom 10-platform
npx claudepluginhub findscripter/everything-skills --plugin 10-platformOther plugins' skills for the same job