docs: add agent skill (SKILL.md) for the Apify CLI#1233
docs: add agent skill (SKILL.md) for the Apify CLI#1233patrikbraborec wants to merge 14 commits into
Conversation
Ships skills/apify/SKILL.md, an agent-discoverable skill that teaches coding agents how to drive the Apify CLI reliably from automation: non-interactive use, auth via APIFY_TOKEN, --json structured output, core create/run/push and call workflows, storage access, and the `apify api` escape hatch. Mirrors the layout of the gh CLI's skill. Closes #1232 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add a "Start here" section telling agents to run `apify -h` (and `apify <command> -h`) first as the source of truth for commands and flags. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add an "Agent skill" section with `npx skills add apify/apify-cli` install instructions (project-level and global). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Replace the create/run/push flow in the quick start with a single `apify call apify/hello-world --output-dataset` example so new users can run an Actor and see results immediately. The create wizard is still mentioned for building your own Actor. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Richard Solar <solar.richard@gmail.com>
Co-authored-by: Richard Solar <solar.richard@gmail.com>
|
Thanks @l2ysho! Good comments. |
Add a `--skills` flag to `apify help` that prints the bundled `skills/apify/SKILL.md`, so agents always get guidance matching the installed CLI version. Ship the `skills/` directory in the package, update the README install instructions (Claude Code, Codex/.agents), and expand the skill with Actor discovery, pricing, and scheduling workflows. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
| ARGUMENTS | ||
| commandString The command to get help for. | ||
|
|
||
| FLAGS |
There was a problem hiding this comment.
Suggestion: the --skills read as if it should list all available skills or provide a skills for a certain command. It is a bit misleading.
What about --agent-guide?
-> apify help --agent-guide
There was a problem hiding this comment.
Or, to be at least in sync with mcpc, it should be singular --skill.
https://apify.slack.com/archives/C0ANU2AFS3D/p1782748998055599?thread_ts=1782728951.631509&cid=C0ANU2AFS3D
| Executes Actor remotely using your authenticated account. | ||
| Reads input from local key-value store by default. | ||
| Inspect the input schema first with "apify actors info <actor> --input". | ||
| To inspect the input schema before creating a JSON input, use "apify actors |
There was a problem hiding this comment.
Super nit: is this really better? 🤔
There was a problem hiding this comment.
That was my suggestion, so I can answer: jumping from "executes" and "reads" to an imperative creates some dissonance. We still have human readers :D
Co-authored-by: Cursor <cursoragent@cursor.com>
| mkdir -p ~/.claude/skills/apify | ||
| apify help --skills > ~/.claude/skills/apify/SKILL.md | ||
| ``` | ||
|
|
||
| ### Codex and other agents | ||
|
|
||
| Codex and most other agents follow the [Agent Skills open standard](https://developers.openai.com/codex/skills), which loads skills from `.agents/skills` (per repo) or `~/.agents/skills` (per user): | ||
|
|
||
| ```bash | ||
| mkdir -p ~/.agents/skills/apify | ||
| apify help --skills > ~/.agents/skills/apify/SKILL.md |
There was a problem hiding this comment.
Nit: the skill should be named more specific, e.g.: ~/.claude/skills/apify-cli and ~/.agents/skills/apify-cli or even apify-cli-agentic-guide or apify-cli-agentic-help.
|
|
||
| const parent = dirname(dir); | ||
|
|
||
| if (parent === dir) { |
There was a problem hiding this comment.
Nit: worth adding a comment here that that dirname of the root (/ in UNIX and C:\) returns the root itself.
|
|
||
| ## Auth | ||
|
|
||
| - Preferred for automation: set `APIFY_TOKEN` in the environment (no `apify login` needed). Get a token at https://console.apify.com/settings/integrations. |
There was a problem hiding this comment.
Suggestion: this might be potentially dangerous. If user, for any reason, has the APIFY_TOKEN already present in their environment, it would use it implicitly and possibly silently.
Overall, we should, instead, refer to https://apify.com/auth.md here.
Additional instructions on authentication bellow are fine, but also not ideal as we are going to have 2 sources of truth. The auth.md should have a CLI section instead (working on one currently).
|
|
||
| Run `apify actors search -h` to see the available filters (pricing model, category, username, sort order, pagination) and their accepted values. | ||
|
|
||
| Pricing matters: prefer a `FREE` Actor when one covers the task. Check an Actor's pricing before running it with `apify actors info <actor> --json` (look at `currentPricingInfo`). |
There was a problem hiding this comment.
prefer a
FREEActor when one covers the task.
Might lead to agents picking FREE over well supported, popular and well rated Actors. We might need more clarification that it is a combination of all above that matters.
DaveHanns
left a comment
There was a problem hiding this comment.
Mostly nits, some suggestions (mainly the flag name).
Otherwise looks good 🚀
What
Adds
skills/apify/SKILL.md— an agent-discoverable skill for the Apify CLI, mirroring the GitHub CLI'sskills/gh/SKILL.md.It's a markdown file (YAML frontmatter + guidance) that coding agents auto-load when a task touches the Apify CLI. It doesn't change CLI behavior — it encodes the non-obvious operational knowledge needed to drive
apifyreliably from automation.Contents
create/init/loginwizards;-y/--yesconfirmations.APIFY_TOKENfor automation;apify infoto verify;apify auth token.--jsonon list/info commands;--limit/--offset;apify datasets get-items --format json.create → run → push;apify call/apify actors start;runs/builds wait,info,log.apify apiwith--list-endpoints/--describe.Every flag and command was verified against
docs/reference.md. The skill points todocs/reference.mdandapify help <command>for exhaustive detail rather than duplicating it.Notes
skills/folder — no command registration orupdate-docsregeneration needed.prettier --check).Closes #1232
🤖 Generated with Claude Code