跳到主内容
智客 ZICQ

技能库 智客分类:Agent 工作流 netlify-agent-runner

Netlify Agent Runner

运行 AI 代理任务远程在 Netlify 上使用 Claude, Codex, 或双子座. 当用户想要在他们的网站上运行一个AI代理,从另一个模型中获取第二个意见,或者授权开发任务远程运行于他们的repo时使用.

1786 安装量

官方网址:skills.sh

技能介绍

先看中文介绍;官方 description 原文单独保留,不改写 SKILL.md。

做什么

使用 Claude、Codex 或双子座远程运行 AI 代理任务

何时用

用户想要在他们的网站上运行一个AI代理,从另一个模式获取第二个意见,或者授权开发任务远程运行于他们的repo

代理如何加载

按 Agent Skills 渐进披露:启动时只加载 name 与 description(约 100 token);任务匹配后才读入整份 SKILL.md 正文;scripts/、references/、assets/ 仅在需要时再读。 本文件正文结构:Netlify Agent Runner、Prerequisites、Use only documented CLI surfaces、How Agent Tasks Run、Typical workflow、Creating Agent Tasks。 其中含规范建议的小节:分步指令。

文件分析

文件分析:除 SKILL.md 外,正文还引用了 references/,属于带资源的技能包,代理会按需再读这些文件。

官方 description(原文)

Run AI agent tasks remotely on Netlify using Claude, Codex, or Gemini. Use when the user wants to run an AI agent on their site, get a second opinion from another model, or delegate development tasks to run remotely against their repo.

Netlify Agent RunnerPrerequisitesUse only documented CLI surfacesHow Agent Tasks RunTypical workflowCreating Agent TasksRun a prompt with the default agentChoose a specific agent: claude, codex, or geminiTarget a specific branchSpecify a project by name (if not in a linked directory)Output result as JSONOptions

来源分类:skills.sh agent-skill

SKILL.md 与 Agent 调用

官方规范 ↗
name
netlify-agent-runner
description
Run AI agent tasks remotely on Netlify using Claude, Codex, or Gemini. Use when the user wants to run an AI agent on their site, get a second opinion from another model, or delegate development tasks to run remotely against their repo.
  1. 发现技能客户端向 Agent 提供名称与描述目录。
  2. 匹配与调用用户指定或任务匹配后,载入 SKILL.md 指令。
  3. 按需加载按步骤读取参考文档、使用脚本与素材。

具体调用语法与可用工具以目标 Agent 客户端为准。 查看调用机制说明 ↗

安装这个技能

Skills CLI ↗

先选择目标 Agent 和安装范围,保留技能包的附属文件,安装后检查客户端能否发现该技能。

该技能引用了附属文件,请从来源获取完整目录;仅复制 SKILL.md 可能缺少依赖。

交给 Agent 安装

复制安装指令给支持 Agent Skills 的代理,确认其中的目标目录与客户端匹配。

把 Agent Skill「netlify-agent-runner」安装到我的项目:SKILL.md 原文与官方 description 见 https://zicq.com/zh/skills/skl-45a474f41bb8e467-%E5%87%80%E5%8C%96%E4%BB%A3%E7%90%86%E8%BF%90%E8%A1%8C%E5%99%A8.html
请存为 .cursor/skills/netlify-agent-runner/SKILL.md 或 .claude/skills/netlify-agent-runner/SKILL.md,frontmatter 的 name 与 description 保持原样,不要改写。
该技能还带 scripts/、references/、assets/ 等文件,请从 https://github.com/netlify/context-and-tools 取完整目录,不要只建一个 SKILL.md。

GitHub 完整包 ↗

终端安装 · Skills CLI

需要 Node.js 与 npx。先查看仓库技能列表,确认实际名称。

npx skills add 'https://github.com/netlify/context-and-tools' --list

npx skills add 'https://github.com/netlify/context-and-tools' --skill 'netlify-agent-runner'

CLI 会交互选择目标 Agent,默认安装到项目;用户级安装使用 -g。先通过查看命令核对仓库内容,再用 npx skills list 检查已安装技能。

阅读排版
--- name: netlify-agent-runner description: Run AI agent tasks remotely on Netlify using Claude, Codex, or Gemini. Use when the user wants to run an AI agent on their site, get a second opinion from another model, or delegate development tasks to run remotely against their repo. --- # Netlify Agent Runner Run AI coding agents (Claude, Codex, Gemini) remotely on Netlify infrastructure to automate development tasks on your site. ## Prerequisites - The site must be **linked to a Netlify project** (via `netlify link` or `netlify init`). - **Or skip linking entirely:** pass `--project ` (a project ID or name) directly to `netlify agents:create` to target any Netlify site without linking first. - The Netlify CLI must be installed and authenticated - Agent runs **consume plan credits**. If the account has no available credits — or the agent/AI usage limit has been reached — `netlify agents:create` is **blocked** and the run won't start. That's an account/plan-state issue to surface to the user, not something to work around. ## Use only documented CLI surfaces Interact with agent tasks only through the documented `netlify agents:*` commands (plus `netlify --help` and the public CLI reference). Do **not** go around the CLI: - **Do not curl `https://api.netlify.com/...`** to fetch, create, or stop a task — the endpoint shapes are not part of the public contract. - **Do not run `netlify api `** as a recovery hatch when a documented command fails. - **Do not read auth tokens** out of `~/Library/Preferences/netlify/config.json` (or anywhere on disk) to authenticate side-channel calls. If a documented command fails, report the exact error and context to the user and stop — don't invent an undocumented way to reach the task. ## How Agent Tasks Run Read this before creating a task — agent tasks behave differently from running an agent locally, and the differences are easy to miss. - **Remote, not local.** Tasks run on Netlify infrastructure, not on your machine. They operate on the site's **connected repository**, not your local working tree. The remote agent only sees what has been pushed to the remote — it cannot see uncommitted or unpushed changes. - **Branch-based.** By default a task runs against the production branch (`main` or `master`). To choose a different *base* branch for the agent to start from, use `-b ` and make sure that branch has been **pushed to the remote first**, or the agent will be working from code that doesn't exist remotely. `-b` sets the base (starting) branch — not where the results are written (see the next bullet). - **Output lands on a new branch — not in place.** The agent does **not** commit its changes onto the base branch you selected. It pushes its work to a **new branch** with its own **Deploy Preview**, so your existing branch (or `main`) is never overwritten. Review the task's results on that new branch / Deploy Preview — don't expect the base branch to change directly. - **Asynchronous.** `netlify agents:create` returns as soon as the task is queued — it does **not** block until the work is finished. When the command returns, the task is still running remotely. - **No webhooks or callbacks.** Nothing notifies you when a task changes state or completes. To find out what's happening, you have to **poll** with `netlify agents:show ` or `netlify agents:list`. - **Statuses are terminal or not.** A task moves through `new` → `running` → one of `done`, `error`, or `cancelled`. Keep polling until the status is one of those last three before you act on the results. ### Typical workflow 1. **Create** a task: `netlify agents:create "" -a `. Note the task ID it returns (use `--json` to capture it reliably). 2. **Poll** for status: `netlify agents:show `. Repeat periodically — there is no completion notification — until the status is `done`, `error`, or `cancelled`. 3. **Review** the results once the task reaches `done` (or inspect the failure on `error`). ## Creating Agent Tasks ```bash # Run a prompt with the default agent netlify agents:create "Add a contact form" # Choose a specific agent: claude, codex, or gemini netlify agents:create --prompt "Add dark mode" --agent claude netlify agents:create -p "Update the README" -a codex netlify agents:create -p "Write unit tests" -a gemini # Target a specific branch netlify agents:create -p "Fix the login bug" -a claude -b feature-branch # Specify a project by name (if not in a linked directory) netlify agents:create "Add tests" --project my-site-name # Output result as JSON netlify agents:create "Add a footer" --json ``` ### Options | Flag | Description | |------|-------------| | `-a, --agent ` | Agent type: `claude`, `codex`, or `gemini` | | `-p, --prompt ` | The prompt for the agent to execute | | `-b, --branch ` | Git branch to work on | | `-m, --model ` | Model to use for the agent | | `--project ` | Project ID or name | | `--json` | Output result as JSON | ## Managing Agent Tasks All `netlify agents:*` commands are **project-scoped** — they operate on a single project (the one your directory is linked to, or the one named with `--project `), not on your whole team. `netlify agents:list` shows the tasks for that one project only; there is no team-wide command that lists tasks across all your sites. To see a different site's tasks, run from its linked directory or pass `--project ` for it. ### List tasks ```bash # List all tasks for the current site netlify agents:list # Filter by status netlify agents:list --status running netlify agents:list --status done netlify agents:list --status error # Output as JSON netlify agents:list --json ``` Status values: `new`, `running`, `done`, `error`, `cancelled`. ### Show task details ```bash netlify agents:show netlify agents:show --json ``` ### Stop a running task ```bash netlify agents:stop ``` ## Use Cases Some of the many things you can do with Agent Runners: | Category | Example prompt | |----------|---------------| | Prototyping / internal tools | "Build an internal dashboard for our HR team" | | Code reviews | "Audit the code with fresh eyes and identify areas for improvement" | | Security audits | "Do a deep security audit of our codebase to identify any potential issues" | | Feature suggestions | "Based on our current codebase & docs, what should we build next?" | | Performance improvements | "Scan our codebase for performance bottlenecks and suggest improvements" | | Telemetry & analytics | "What analytics things are we not tracking but probably should" | | SEO audit | "Audit our site for SEO issues — missing meta tags, broken links, slow pages, missing alt text" | | Copy improvements | "Rewrite our landing page copy to be more compelling and conversion-focused" | | Accessibility | "Run an accessibility audit and fix all WCAG 2.1 AA violations" | | Mobile responsiveness | "Improve the mobile responsiveness — audit every page on small viewports" | | End-to-end tests | "Add end-to-end tests for our critical user flows using Playwright" | | Unit tests | "Generate unit tests for our untested utility functions" | | Documentation | "Generate a README and contributing guide based on our codebase" | | Error handling | "Add proper error boundaries, logging, and user-friendly error states throughout the app" | | UX polish | "Add loading states, skeleton screens, & transitions to improve perceived performance" | | Form hardening | "Add form validation, rate limiting, and spam protection to our contact form" | | Edge Functions | "Add an edge function for A/B testing on our landing page" | ## Using as an Agent If you are an AI agent, you can use `netlify agents:create` to delegate work to an agent running remotely on Netlify — for example, to get a second opinion from a different model. **IMPORTANT — ask for permission first, as a distinct confirmation step.** Agent tasks run on Netlify infrastructure and cost the user credits, so a real approval gate matters. Get explicit permission before running any `netlify agents:create` command — and treat that as its own turn, separate from the user's original request. A directive-sounding prompt ("start a task…", "use the claude agent and pin it to Opus") is **not** itself the approval: it tells you what they want, but the billable command still waits for a yes. Make the permission request a concrete proposal, not a menu: - **The exact command**, filled in — e.g. `netlify agents:create -p "" -a codex` — not a `` and not a pick-one list of agents. - **One agent, already chosen** — commit to a single `-a` value and say why you picked it ("codex for a second opinion on the auth logic"), rather than offering claude/codex/gemini as interchangeable options. - **Why**, plus **what happens after "yes"**: the run is asynchronous — `agents:create` returns as soon as the task is queued, there's no callback, and you'll poll `netlify agents:show ` for the outcome. - **Even if a prerequisite is missing** (not authenticated, not linked to a site, not a git repo yet), still show the exact command and chosen agent you'll run *once it's resolved* — surface the blocker **and** the concrete proposal, rather than collapsing to only describing the blocker. Never run these commands without the user's approval. Before delegating, understand what you're handing off (see [How Agent Tasks Run](#how-agent-tasks-run) above): - **It runs remotely against the pushed branch — not your local work.** The remote agent only sees code that has been committed and pushed. Do **not** delegate work that depends on your local, in-progress changes; the remote agent can't see them and will work from stale code. If a task needs your current changes, commit and push them first (or finish the work yourself). - **It's asynchronous — delegating does not block you.** The task runs remotely while you keep working. But because there are no callbacks, you have to poll (`netlify agents:show `) to learn the outcome. Don't assume the task is done just because you delegated it — check the status before relying on or describing its results. - **It's a separate, self-contained task — not a continuation of your session.** The remote agent starts fresh from the repo and the prompt you give it. It has none of your conversation context, so write a complete, standalone prompt. Useful for: - **Cross-validation** — get a second opinion on your implementation from a different model - **Edge case discovery** — another model may catch issues you missed - **Alternative approaches** — see how a different model would solve the same problem - **Parallel work** — kick off an independent task remotely while you continue on other work, then poll for its result

相关技能

Agent 工作流

Skill Creator

创造有效技能指南。 当用户想创造出新的技能(或更新现有的技能),以专业知识,工作流程,或工具集成来扩展克洛德的能力时,应该使用这种技能.

Agent 工作流

Clawdhub

使用ClawdHub CLI搜索,安装,更新并发布从taladhub.com的代理技能. 需要获取苍蝇上的新技能时使用,将安装的技能同步到最新版本或特定版本,或者发布 npm-instainddhub CLI 的新/更新的技能文件夹.

Agent 工作流

Agent Team Orchestration

管弦乐团多代理团队,任务设定周期,交接协议,审查工作流程. 使用时间: (1)建立2+特派员队伍,具有不同专业,(2)确定任务路线和生命周期(收录框_ spec_建设_审查_完成),(3)在特派员之间制定交接协议,(4)建立审查和质量关口,(5)管理特派员之间的交流和文物共享.

Agent 工作流

Superpowers

Spec-first,TDD,子代理驱动的软件开发工作流程. 当:(1)构建任何新功能或应用——触发脑暴_计划_子代理执行回路,(2)调试出一个bug或测试失败——触发系统性的根起过程,(3)用户说"让我们构建","帮助我计划","我想添加X",或"这个被打破",(4)完成一个功…