You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 5076809
Browse filesBrowse the repository at this point in the historyBrowse files
apify-plugins-bot
committed
chore: sync generated content from apify-plugins (0bf81f12)
Copy file name to clipboardExpand all lines: agents/apify.md
+24-16Lines changed: 24 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,23 +17,28 @@ For Route 1, prefer MCP tools for straightforward tasks. Only invoke the `apify-
17
17
18
18
## MCP vs CLI selection
19
19
20
-
Route 1 (use existing Actors: search, fetch details, run, get results, look up docs) is exposed through **two interchangeable transports**: the Apify MCP server and the Apify CLI. Routes 2 and 3 are CLI-only or SDK-only by nature and are unaffected by this section.
20
+
Route 1 (use existing Actors: search, fetch details, run, get results, look up docs) is exposed through **two transports**: the Apify MCP server and the Apify CLI. They are usually interchangeable, but not always — an unauthenticated MCP server can search Actors without being able to run them (see Detection). Routes 2 and 3 are CLI-only or SDK-only by nature and are unaffected by this section.
21
21
22
22
Detect available transports **once** at the start of the conversation and reuse the result for every Route 1 operation. Skills downstream (`apify-ultimate-scraper`, etc.) provide both MCP and CLI variants per step — they will not re-detect.
23
23
24
24
### Detection
25
25
26
-
1.**MCP available** if a tool named `search-actors` appears in your available tool list. (Other Apify MCP tools — `fetch-actor-details`, `run-actor`, `get-dataset-items`, `search-apify-docs`, `fetch-apify-docs` — are part of the same server.)
27
-
2.**CLI available** if `apify --help` exits 0 in the shell.
26
+
MCP state — judge by capability, not tool names:
27
+
-**full**: run Actors and tasks, read datasets and key-value stores, search Actors, fetch Actor details, search and fetch docs
28
+
-**discovery-only**: search Actors, fetch Actor details, search and fetch docs only (not authenticated)
29
+
-**none**: no Apify MCP tools present
30
+
31
+
CLI: **installed** if `apify --help` exits 0; **usable** if `apify info 2>&1` also exits 0.
28
32
29
33
### Selection rule
30
34
31
35
| MCP | CLI | Use for Route 1 |
32
36
|-----|-----|-----------------|
33
-
| yes | yes |**MCP** (no shell, no install friction, OAuth handles auth) |
34
-
| yes | no | MCP |
35
-
| no | yes | CLI |
36
-
| no | no | Offer to install the CLI (`npm install -g apify-cli`) or point the user to a host that ships the Apify MCP server (`https://mcp.apify.com`). Do not attempt Route 1 until one is available. |
37
+
| full | any |**MCP** (no shell, no install friction, auth is handled by the host) |
38
+
| discovery-only | usable |**MCP for discovery, CLI for runs and results**|
39
+
| discovery-only | not usable | Discovery over MCP. For anything authenticated there is **no transport** — report that, and see Authentication for the fix |
40
+
| none | usable | CLI |
41
+
| none | not usable | Offer to install the CLI (`npm install -g apify-cli`) or point the user to a host that ships the Apify MCP server (`https://mcp.apify.com`). Do not attempt Route 1 until one is available. |
37
42
38
43
Route 2 always requires the CLI regardless of MCP availability — `apify init`, `apify run`, and `apify push` operate on the local filesystem and have no MCP equivalent. Route 3 uses the `apify-client` package over HTTPS and needs neither.
39
44
@@ -47,16 +52,19 @@ State the chosen transport once when you start a Route 1 task ("Using MCP for th
47
52
48
53
Three auth flows exist. Use the correct one based on the route:
49
54
50
-
-**Route 1 (MCP):**OAuth. No setup needed. The user will be prompted to sign in via browser on first MCP tool call that requires auth. Do not ask for an API token.
51
-
-**Route 1 (CLI fallback) and Route 2 (CLI):**The CLI **ignores** the `APIFY_TOKEN` env var. Run `apify login --token TOKEN` once (requires `required_permissions: ["all"]` in Cursor). Credentials are stored in `~/.apify/auth.json` and reused automatically. Token from: https://console.apify.com/settings/integrations
55
+
-**Route 1 (MCP):**If your Apify MCP tools already cover authenticated operations, auth is working — say nothing. OAuth is the preferred auth method, but if the host does not support it, direct the user to set `APIFY_TOKEN`. Token from: https://console.apify.com/settings/integrations
56
+
-**Route 1 (CLI fallback) and Route 2 (CLI):**Prefer `apify login` (opens browser) — credentials persist in `~/.apify/auth.json`. In headless environments, the CLI also reads `APIFY_TOKEN` from the environment automatically. Token from: https://console.apify.com/settings/integrations
52
57
-**Route 3 (SDK):** Requires `APIFY_TOKEN` environment variable. Direct the user to **Console > Settings > Integrations** at https://console.apify.com/settings/integrations to create one. If they don't have an account, point them to https://console.apify.com/sign-up (free, no credit card).
53
58
54
59
### Apify CLI instructions:
55
-
- Before using the CLI, always check if it is installed (always check first, with short `block_until_ms` to avoid blocking the conversation):
60
+
**Rule: pass `--user-agent apify-opencode-plugin/apify` only on actor start and actor run commands (`apify actors start`, `apify actors call`). Do not add it to login, info, or other CLI commands.**
61
+
62
+
- Before using the CLI, always check if it is installed. Keep the timeout short so the check cannot stall the conversation:
56
63
```bash
57
64
apify --help
65
+
apify --version # The flag needs Apify CLI 1.5.0 or newer
58
66
```
59
-
- If the CLI is installed, check if it is logged in (always check, with short `block_until_ms` to avoid blocking the conversation):
67
+
- If the CLI is installed, check if it is logged in. Keep the timeout short so the check cannot stall the conversation:
60
68
```bash
61
69
# Auth check — do NOT pipe to /dev/null, you need to see errors
62
70
apify info 2>&1
@@ -65,15 +73,15 @@ Three auth flows exist. Use the correct one based on the route:
65
73
```bash
66
74
apify login --token TOKEN
67
75
```
68
-
- All of the APify commands needs to be run with the all permissions (depends on Agent sandbox)
69
-
- Apify commands blocks with **zero output**until the run completes. Set `block_until_ms` to at least **60000**(60s).
76
+
- Authenticated Apify CLI commands need file access to `~/.apify/`, where the CLI keeps its credentials. A host that sandboxes file access can deny this even when the login is valid — that is a sandbox problem, not a login problem, so re-running `apify login` will not fix it. Grant the CLI file access in whatever way the host offers, or authenticate MCP and run through it instead.
77
+
- Apify commands block with **zero output**until the run completes, so allow at least **60 seconds**before treating one as stuck. If your shell tool takes a timeout, raise it accordingly.
70
78
- For long/unknown runs, use the async pattern instead:
Copy file name to clipboardExpand all lines: instructions/apify-routing.md
+11-7Lines changed: 11 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ Do **not**:
10
10
11
11
- Call any `apify-*` skill directly from the slash menu without going through the `apify` subagent.
12
12
- Guess between `apify-actor-development` vs `apify-actorization` vs `apify-sdk-integration` yourself — the subagent owns that decision (the `apify` SDK package and the `apify-client` package are easy to confuse and picking wrong breaks the user's project).
13
-
- Skip the subagent for "quick" Apify questions. Even MCP tool calls (`search-actors`, `run-actor`, etc.) are routed through the subagent.
13
+
- Skip the subagent for "quick" Apify questions. Even direct Apify MCP tool calls are routed through the subagent.
14
14
15
15
If the user types a slash command for an Apify skill explicitly, still hand off to the `apify` subagent so the routing matrix and authentication guidance are applied.
16
16
@@ -19,9 +19,12 @@ If the user types a slash command for an Apify skill explicitly, still hand off
19
19
Apify exposes three very different products through its plugin: (1) using existing Actors via MCP, (2) building and deploying custom Actors with the SDK + CLI, and (3) calling Actors from an existing application via `apify-client`. Each path requires a different skill, a different authentication flow, and a different npm package. The `apify` subagent is the only place where the routing matrix and the package-naming trap are documented, so every Apify request must pass through it.
20
20
21
21
### Apify CLI instructions:
22
-
- Before using the CLI, always check if it is installed:
22
+
**Rule: pass `--user-agent apify-opencode-plugin/apify-routing` only on actor start and actor run commands (`apify actors start`, `apify actors call`). Do not add it to login, info, or other CLI commands.**
23
+
24
+
- Before using the CLI, always check if it is installed and new enough for the user-agent flag:
23
25
```bash
24
26
apify --help
27
+
apify --version # The flag needs Apify CLI 1.5.0 or newer
25
28
```
26
29
- If the CLI is installed, check if it is logged in:
27
30
```bash
@@ -32,14 +35,15 @@ Apify exposes three very different products through its plugin: (1) using existi
32
35
```bash
33
36
apify login --token TOKEN
34
37
```
35
-
- All of the APify commands needs to be run with the all permissions (depends on Agent sandbox)
36
-
- Apify commands blocks with **zero output** until the run completes. Set `block_until_ms` to at least **60000** (60s).
38
+
- In headless environments where browser login is unavailable, the CLI also reads `APIFY_TOKEN` from the environment automatically — no explicit login needed.
39
+
- Authenticated Apify CLI commands need file access to `~/.apify/`, where the CLI keeps its credentials. A host that sandboxes file access can deny this even when the login is valid — that is a sandbox problem, not a login problem, so re-running `apify login` will not fix it.
40
+
- Apify commands block with **zero output** until the run completes, so allow at least **60 seconds** before treating one as stuck. If your shell tool takes a timeout, raise it accordingly.
37
41
- For long/unknown runs, use the async pattern instead:
Copy file name to clipboardExpand all lines: skills/apify-actor-development/SKILL.md
+6-4Lines changed: 6 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,6 +22,8 @@ Actors are serverless programs inspired by the UNIX philosophy - programs that d
22
22
23
23
Before creating or modifying actors, verify that `apify` CLI is installed `apify --help`.
24
24
25
+
**Rule: pass `--user-agent apify-opencode-plugin/apify-actor-development` only on actor run commands (`apify run`). Do not add it to login, info, push, or other CLI commands.**
26
+
25
27
If it is not installed, use one of these methods (listed in order of preference):
26
28
27
29
```bash
@@ -131,10 +133,10 @@ Check `usesStandbyMode` in `.actor/actor.json` - only implement if set to `true`
131
133
## Commands
132
134
133
135
```bash
134
-
apify run # Run Actor locally
135
-
apify login # Authenticate account
136
-
apify push # Deploy to Apify platform (uses name from .actor/actor.json)
137
-
apify help# List all commands
136
+
apify run --user-agent apify-opencode-plugin/apify-actor-development# Run Actor locally
137
+
apify login # Authenticate account
138
+
apify push # Deploy to Apify platform (uses name from .actor/actor.json)
139
+
apify help# List all commands
138
140
```
139
141
140
142
**IMPORTANT:** Always use `apify run` to test actors locally. Do not use `npm run start`, `npm start`, `yarn start`, or other package manager commands - these will not properly configure the Apify environment and storage.
Copy file name to clipboardExpand all lines: skills/apify-actorization/SKILL.md
+6-3Lines changed: 6 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,10 +24,13 @@ Actorization converts existing software into reusable serverless applications co
24
24
25
25
## Prerequisites
26
26
27
-
Verify `apify` CLI is installed:
27
+
**Rule: pass `--user-agent apify-opencode-plugin/apify-actorization` only on actor run commands (`apify run`). Do not add it to login, info, init, push, or other CLI commands.**
28
+
29
+
Verify `apify` CLI is installed and new enough for the user-agent flag:
28
30
29
31
```bash
30
32
apify --help
33
+
apify --version # The flag needs Apify CLI 1.5.0 or newer
31
34
```
32
35
33
36
If not installed, use one of these methods (listed in order of preference):
@@ -139,13 +142,13 @@ See the Actor README guidelines at `skills/apify-actor-development/references/ac
139
142
Run the actor with inline input (for JS/TS and Python actors):
140
143
141
144
```bash
142
-
apify run --input '{"startUrl": "https://example.com", "maxItems": 10}'
145
+
apify run --user-agent apify-opencode-plugin/apify-actorization --input '{"startUrl": "https://example.com", "maxItems": 10}'
143
146
```
144
147
145
148
Or use an input file:
146
149
147
150
```bash
148
-
apify run --input-file ./test-input.json
151
+
apify run --user-agent apify-opencode-plugin/apify-actorization --input-file ./test-input.json
149
152
```
150
153
151
154
**Important:** Always use `apify run`, not `npm start` or `python main.py`. The CLI sets up the proper environment and storage.
Copy file name to clipboardExpand all lines: skills/apify-ultimate-scraper/SKILL.md
+12-9Lines changed: 12 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,9 +13,11 @@ This rule does **not** apply to status/auth commands (`apify info`, `apify --ver
13
13
14
14
**Exception:** if `--input` returns no data, re-run with `2>&1` to confirm whether the cause is a missing schema vs. a network/auth error.
15
15
16
+
**Rule: pass `--user-agent apify-opencode-plugin/apify-ultimate-scraper` only on actor start and actor run commands (`apify actors start`, `apify actors call`). Do not add it to login, info, search, or other CLI commands.**
17
+
16
18
## Prerequisites
17
19
18
-
- Apify CLI v1.4.0+ (`npm install -g apify-cli`)
20
+
- Apify CLI v1.5.0+ (`npm install -g apify-cli`) — older versions reject the user-agent flag
Before using the Apify CLI, always verify the local environment:
36
38
37
-
1. Check that the CLI is installed:
39
+
1. Check that the CLI is installed and is v1.5.0 or newer:
38
40
```bash
39
41
apify --help
42
+
apify --version
40
43
```
41
44
If this fails, install the CLI first:
42
45
```bash
@@ -54,20 +57,20 @@ If this fails, install the CLI first:
54
57
apify login --token TOKEN
55
58
```
56
59
57
-
3.Run Apify CLI commands with `all` permissions when needed by the agent sandbox.
60
+
3.Authenticated Apify CLI commands need file access to `~/.apify/`, where the CLI keeps its credentials. A host that sandboxes file access can deny this even when the login is valid; that is a sandbox problem, not a login problem.
58
61
59
-
4. Assume many Apify commands block with zero output until completion. For blocking runs, set `block_until_ms` to at least `60000`.
62
+
4. Assume many Apify commands block with zero output until completion, so allow at least 60 seconds before treating one as stuck. If your shell tool takes a timeout, raise it accordingly.
60
63
61
64
5. For long or unknown-duration runs, prefer the async pattern:
0 commit comments