AIsaAIsaStudio English 打开 AIsa Studio

GitHub 发布 Agent Skills 实战指南:一次编写,任意 Agent 可运行

原标题:Build once, run on any agent: A practical guide to agent skills

GitHub Blog 发布 Agent Skills 实战指南,讲解如何以 SKILL.md 为核心编写可跨 Agent 复用的技能,并用 Proof Agent(对 AI 生成代码做对抗性验证)和 Data Forge(多技能协作的数据管道)两个示例演示:用 manifest 分离项目配置、用 forge-dbx 共享执行路径、在七个阶段设置人工检查点、用打包脚本生成 Claude Code、Cursor 和 GitHub Copilot 的客户端文件,并总结把业务上下文集中在一个文件、给相关技能统一平台访问方式、用指令引导工作并用检查验证结果三项实践。

为什么值得看

原文给出 Agent Skills 的结构设计和三项可迁移实践,读者可以直接对照设计自己的可复用技能包。

阅读原文 ↗11月13日 AI 日报

本页的摘要、推荐理由与解读出自 AIsa Studio 的 AI 风向智能体,原文版权归原作者所有。

深度解读

发生了什么

2026 年 11 月 12 日,GitHub 在官方博客发布实战指南《Build once, run on any agent: A practical guide to agent skills》,作者是 GitHub 高级开发者倡导者 Andrea。文章内容源自她在 GitHub Universe 2026 上与 Procore 数据工程高级经理 Shishir Tewari 的同题演讲。

指南介绍了一种做法:把可复用的工程工作固化成 Agent Skills(代理技能),做成团队可审查、可复用的版本化文件,而工具、凭据和权限仍由运行这些技能的宿主环境提供。

关键细节

  • Agent skill 是一个以 SKILL.md 文件为核心的版本化目录,描述何时以及如何完成一个可重复任务。文章明确指出:「一个 skill 可以描述如何查询数据库,但它并不能授予对该数据库的访问权限。」
  • 第一个示例 Proof Agent 体现的核心原则是「自我验证不算验证」:它启动一个独立的验证器,对照原始请求审查 AI 生成的改动,返回 PASS、FAIL 或 PARTIAL,并在改动文件中引用证据。GitHub Actions 工作流只把原始请求和代码改动交给验证器,而不提供编码 agent 自己的评估结论。
  • 第二个示例 Data Forge 是一个支持工单指标流水线,由多个协作技能组成:forge-init 发现项目细节并写入 resolved manifest,forge-builder 协调从 issue 到 pull request 的工作,forge-dbx 提供访问数据平台的统一路径(根据 manifest 选择 Databricks 或 DuckDB 适配器),forge-lint 应用团队规范。
  • 项目配置放在 manifest 中,而不是硬编码在技能里,这样技能不必内嵌项目名称、数据库或约定。指南建议用一个问题检验可移植性:另一个团队能否用自己的 manifest 使用这些技能而不重写?
  • Data Forge 工作流共有七个阶段,每个阶段都设有人工检查点,在执行 schema 变更前要求审批。
  • 为支持多个客户端,团队以 skills//SKILL.md 作为唯一来源,用打包脚本生成客户端专属文件:Claude Code 的 .claude-plugin/plugin.json、Cursor 的 .cursor-plugin/plugin.json、GitHub Copilot 的 .github/agents/.agent.md。脚本带有供 CI 使用的检查模式:node scripts/package.mjs --check。
  • 文章结尾给出三条实践:把业务上下文放进一个文件;让相关技能通过同一路径访问平台;用指令引导工作、用检查验证工作。文中也划定了边界:技能适合有边界、可重复的工作,而需要稳定接口、共享状态、审计记录、长时运行控制或在模型之外强制权限的工作流,更适合做成应用。

为什么重要

指南针对两个常见痛点:团队反复向 agent 解释同样的任务,以及上下文「流失在聊天记录里或锁在某个人头脑中」。

通过把任务所需(固化在可审查、可版本化的文件中)与环境如何支撑(工具、凭据、权限)分开,技能得以在不同 agent 客户端之间移植。以单一来源生成各客户端专属文件的打包方式,减轻了同时支持 Claude Code、Cursor 和 GitHub Copilot 的同步负担。

其中的人工介入模式同样值得注意:每个阶段的检查点、schema 变更前的审批门槛,以及刻意不给验证器提供编码 agent 自身评估的独立验证设计。

对谁有影响

  • 正在引入编码 agent 的工程团队,尤其是需要在多个 agent 客户端间保持指令一致性的团队。
  • 数据工程团队,Data Forge 示例直接回应了「判断藏在几个人头脑里」的流水线问题。
  • 构建 AI 辅助审查或验证流程的开发者,可借鉴 Proof Agent 中「独立验证 + 引用证据」的模式。
  • 负责 CI 检查、合并规则和权限边界的平台与 DevOps 团队,指南建议把阻断性要求放在仓库规则中,而不是放在技能本身里。
全文翻译

Agent skills capture repeatable engineering work in files teams can review and reuse, while tools, project context, and permissions remain specific to the host that runs them.

November 12, 2026

|

6 minutes

Share:

How many times this week did you re-explain the same task to an agent? How many times did you ask your colleague with deep institutional knowledge how to solve a specific problem? That context shouldn’t be lost in a chat or locked in one person’s head. Agent skills let you capture repeatable instructions so you and your agents can reuse them. The skill you write for yourself tonight can later become part of a team’s pipeline.

An agent skill is a versioned directory centered on a SKILL.md file that describes when and how to do a repeatable task. You can share those instructions across agents, but the environment still needs to provide the tools, credentials, and permissions to carry them out. A skill can describe how to query a database, for example, but it doesn’t grant access to that database.

I covered this topic live with Shishir Tewari, Senior Manager, Data Engineering at Procore, during GitHub Universe 2026. Our session was titled “Build once, run on any agent: a practical guide to agent skills”.

Define one job and when it applies

A skill works best when it has a clear job, input, and output. For example, let’s say you’re building an agent that checks AI-generated changes against the original request. If the same agent assesses its own work, its explanation might influence the review. With Proof Agent, we use a separate verifier to examine the changes and provide evidence for its findings. The skill’s frontmatter names the task and describes its purpose:

---
name: proof-agent
description: Adversarial verification of AI-generated work. Spawns an independent verifier to check for false claims, broken code, and security issues.
---

At the center is a simple rule: self-verification is not verification.

The When to Verify section in Proof Agent’s SKILL.md says when to invoke the skill. The remaining instructions explain what the verifier reviews and what evidence to include in its findings.

Coordinate multiple skills for a larger workflow

When the judgment that makes a data pipeline correct lives in four different people’s heads, those four people are the roadmap. Each change to the pipeline depends on their availability and knowledge of the data. Data Forge is an example of how to capture parts of that judgment in skills that work together.

In the support-desk pipeline example, we start with a request for metrics that count incidents created and resolved. Before building the pipeline, the forge-init skill discovers details such as source tables and naming conventions, then writes them to a resolved manifest. The other skills read that manifest for the project context they need.

The forge-builder skill then coordinates the work from the issue through to a pull request. It uses forge-dbx to query the data platform and forge-lint to apply the team’s standards as it designs and builds the pipeline. A person reviews the proposed decisions along the way, and the resulting pull request contains the pipeline code, schema changes, and tests.

Each skill has a defined responsibility, and they share project context instead of rediscovering it independently. When a step changes, you can change one skill and leave the rest alone.

Skills fit bounded, repeatable work that benefits from reusable judgment, such as a checklist, release, migration, or metric pipeline. If a workflow needs a stable interface, shared state, an audit trail, long-running control, or permissions enforced outside the model, an application is a better fit.

Keep project configuration out of the skill

We don’t want to hardcode every project’s names, database, or conventions into the skills. In the Data Forge support-desk example, a manifest describes the project, metric store, and platform so the skills can use the right project details without baking them into their instructions:

project:
  name: "support-desk"
  store_name: "support_metric_store"

platform:
  engine: "duckdb"
  pipeline_framework: "spark_python"
  duckdb_dir: "warehouse"

With the discovered details in the resolved manifest, the other skills don’t have to make their own assumptions about the project.

Keep discovered project details separate from team standards. The forge-init initialization skill can inspect existing schemas and code patterns; the forge-lint skill supplies the rules to follow before code is generated. A pattern found in a repository isn’t automatically a rule to preserve, so make discovered details reviewable and let people confirm or change them where business judgment is needed. To check portability, ask: could another team use these skills with its own manifest without rewriting them?

The forge-dbx skill gives the other Data Forge skills one way to access the data platform. It reads the manifest and selects a Databricks or DuckDB adapter, so each skill doesn’t need its own connection and query logic.

The manifest can choose DuckDB for the local support-desk demo, but it can’t install the DuckDB CLI or grant database access. Those remain setup responsibilities for the environment and its user. The manifest picks the engine; the host provides the access.

Put checks and approval points in the workflow

The Data Forge support-desk workflow has seven phases, with a human checkpoint at each one. The workflow overview shows how the skills fit together. Before a phase proceeds, the workflow checks that the previous phase is complete; before schema changes run, it asks for approval.

The Proof Agent example applies the same principle to code review. A GitHub Actions workflow gives the verifier the original request and code changes, but not the coding agent’s own assessment. The verifier returns PASS, FAIL, or PARTIAL and must cite evidence in the changed files. The GitHub Action does a static review of the diff; it doesn’t execute code or run tests. In the demo workflow, we set block-on-fail: false so findings were advisory. By default, a FAIL fails the check, which blocks the merge if the check is required. The aim is to keep test results and merge requirements in your repository’s CI checks and rules.

Package for each agent client, then verify its setup

Supporting multiple clients can mean keeping several copies of the same instructions in sync. In the Data Forge example, we keep skills/*/SKILL.md as the source and use a packaging script to generate client-specific files: .claude-plugin/plugin.json for Claude Code, .cursor-plugin/plugin.json for Cursor, and .github/agents/*.agent.md for GitHub Copilot. The script also includes a check mode for CI:

node scripts/package.mjs --check

Clients can differ in their available models, tools, credentials, and permissions. After installing a skill, check that the client recognizes it for the intended task, loads its references, can use the required tools, and returns the evidence the skill calls for.

Three practices for building agent skills

  1. Put business context in one file. Keep project-specific names, schemas, and conventions in a manifest, and have each skill read it instead of duplicating those facts. This gives the team one visible place to update configuration.
  2. Give related skills one consistent way to use the platform. Have related skills use the same path to run queries, jobs, and schema changes instead of each defining its own commands and connection logic. This makes the workflow’s access easier to understand and its behavior easier to check in each client.
  3. Use instructions to guide the work, and checks to verify it. A skill can tell an agent which standards to follow and when to ask for approval. Add human review at decisions that need context or judgment, and use tests and CI checks to catch issues before a change moves forward. If a check must block a merge or deployment, configure that requirement in your repository’s rules.

Start with the task you’re tired of explaining. Write down what it needs, where it stops, and what a reviewer sees. Then try it with another agent and improve it as you learn what works.

Written by

Andrea Griffiths

Andrea is a Senior Developer Advocate at GitHub with over a decade of experience in developer tools. She combines technical depth with a mission to make advanced technologies more accessible. After transitioning from Army service and construction management to software development, she brings a unique perspective to bridging complex engineering concepts with practical implementation. She lives in Florida with her Welsh partner, two sons, and two dogs, where she continues to drive innovation and support open source through GitHub's global initiatives. Find her online @acolombiadev.

Related posts

We do newsletters, too

Discover tips, technical guides, and best practices in our biweekly newsletter just for devs.

Your email address

查看原文

Agent skills capture repeatable engineering work in files teams can review and reuse, while tools, project context, and permissions remain specific to the host that runs them.

November 12, 2026

|

6 minutes

  • Share:

How many times this week did you re-explain the same task to an agent? How many times did you ask your colleague with deep institutional knowledge how to solve a specific problem? That context shouldn’t be lost in a chat or locked in one person’s head. Agent skills let you capture repeatable instructions so you and your agents can reuse them. The skill you write for yourself tonight can later become part of a team’s pipeline.

An agent skill is a versioned directory centered on a SKILL.md file that describes when and how to do a repeatable task. You can share those instructions across agents, but the environment still needs to provide the tools, credentials, and permissions to carry them out. A skill can describe how to query a database, for example, but it doesn’t grant access to that database.

I covered this topic live with Shishir Tewari, Senior Manager, Data Engineering at Procore, during GitHub Universe 2026. Our session was titled “Build once, run on any agent: a practical guide to agent skills”.

Define one job and when it applies

A skill works best when it has a clear job, input, and output. For example, let’s say you’re building an agent that checks AI-generated changes against the original request. If the same agent assesses its own work, its explanation might influence the review. With Proof Agent, we use a separate verifier to examine the changes and provide evidence for its findings. The skill’s frontmatter names the task and describes its purpose:

---
name: proof-agent
description: Adversarial verification of AI-generated work. Spawns an independent verifier to check for false claims, broken code, and security issues.
---

At the center is a simple rule: self-verification is not verification.

The When to Verify section in Proof Agent’s SKILL.md says when to invoke the skill. The remaining instructions explain what the verifier reviews and what evidence to include in its findings.

Coordinate multiple skills for a larger workflow

When the judgment that makes a data pipeline correct lives in four different people’s heads, those four people are the roadmap. Each change to the pipeline depends on their availability and knowledge of the data. Data Forge is an example of how to capture parts of that judgment in skills that work together.

In the support-desk pipeline example, we start with a request for metrics that count incidents created and resolved. Before building the pipeline, the forge-init skill discovers details such as source tables and naming conventions, then writes them to a resolved manifest. The other skills read that manifest for the project context they need.

The forge-builder skill then coordinates the work from the issue through to a pull request. It uses forge-dbx to query the data platform and forge-lint to apply the team’s standards as it designs and builds the pipeline. A person reviews the proposed decisions along the way, and the resulting pull request contains the pipeline code, schema changes, and tests.

Each skill has a defined responsibility, and they share project context instead of rediscovering it independently. When a step changes, you can change one skill and leave the rest alone.

Skills fit bounded, repeatable work that benefits from reusable judgment, such as a checklist, release, migration, or metric pipeline. If a workflow needs a stable interface, shared state, an audit trail, long-running control, or permissions enforced outside the model, an application is a better fit.

Keep project configuration out of the skill

We don’t want to hardcode every project’s names, database, or conventions into the skills. In the Data Forge support-desk example, a manifest describes the project, metric store, and platform so the skills can use the right project details without baking them into their instructions:

project:
  name: "support-desk"
  store_name: "support_metric_store"

platform:
  engine: "duckdb"
  pipeline_framework: "spark_python"
  duckdb_dir: "warehouse"

With the discovered details in the resolved manifest, the other skills don’t have to make their own assumptions about the project.

Keep discovered project details separate from team standards. The forge-init initialization skill can inspect existing schemas and code patterns; the forge-lint skill supplies the rules to follow before code is generated. A pattern found in a repository isn’t automatically a rule to preserve, so make discovered details reviewable and let people confirm or change them where business judgment is needed. To check portability, ask: could another team use these skills with its own manifest without rewriting them?

The forge-dbx skill gives the other Data Forge skills one way to access the data platform. It reads the manifest and selects a Databricks or DuckDB adapter, so each skill doesn’t need its own connection and query logic.

The manifest can choose DuckDB for the local support-desk demo, but it can’t install the DuckDB CLI or grant database access. Those remain setup responsibilities for the environment and its user. The manifest picks the engine; the host provides the access.

Put checks and approval points in the workflow

The Data Forge support-desk workflow has seven phases, with a human checkpoint at each one. The workflow overview shows how the skills fit together. Before a phase proceeds, the workflow checks that the previous phase is complete; before schema changes run, it asks for approval.

The Proof Agent example applies the same principle to code review. A GitHub Actions workflow gives the verifier the original request and code changes, but not the coding agent’s own assessment. The verifier returns PASS, FAIL, or PARTIAL and must cite evidence in the changed files. The GitHub Action does a static review of the diff; it doesn’t execute code or run tests. In the demo workflow, we set block-on-fail: false so findings were advisory. By default, a FAIL fails the check, which blocks the merge if the check is required. The aim is to keep test results and merge requirements in your repository’s CI checks and rules.

Package for each agent client, then verify its setup

Supporting multiple clients can mean keeping several copies of the same instructions in sync. In the Data Forge example, we keep skills/*/SKILL.md as the source and use a packaging script to generate client-specific files: .claude-plugin/plugin.json for Claude Code, .cursor-plugin/plugin.json for Cursor, and .github/agents/*.agent.md for GitHub Copilot. The script also includes a check mode for CI:

node scripts/package.mjs --check

Clients can differ in their available models, tools, credentials, and permissions. After installing a skill, check that the client recognizes it for the intended task, loads its references, can use the required tools, and returns the evidence the skill calls for.

Three practices for building agent skills

  1. Put business context in one file. Keep project-specific names, schemas, and conventions in a manifest, and have each skill read it instead of duplicating those facts. This gives the team one visible place to update configuration.
  2. Give related skills one consistent way to use the platform. Have related skills use the same path to run queries, jobs, and schema changes instead of each defining its own commands and connection logic. This makes the workflow’s access easier to understand and its behavior easier to check in each client.
  3. Use instructions to guide the work, and checks to verify it. A skill can tell an agent which standards to follow and when to ask for approval. Add human review at decisions that need context or judgment, and use tests and CI checks to catch issues before a change moves forward. If a check must block a merge or deployment, configure that requirement in your repository’s rules.

Start with the task you’re tired of explaining. Write down what it needs, where it stops, and what a reviewer sees. Then try it with another agent and improve it as you learn what works.

Written by

Andrea Griffiths

Andrea is a Senior Developer Advocate at GitHub with over a decade of experience in developer tools. She combines technical depth with a mission to make advanced technologies more accessible. After transitioning from Army service and construction management to software development, she brings a unique perspective to bridging complex engineering concepts with practical implementation. She lives in Florida with her Welsh partner, two sons, and two dogs, where she continues to drive innovation and support open source through GitHub's global initiatives. Find her online @acolombiadev.

Related posts

We do newsletters, too

Discover tips, technical guides, and best practices in our biweekly newsletter just for devs.

Your email address

原文版权归 GitHub Blog · AI & ML 及原作者所有,本站转载仅供阅读。如需删除,请联系 support@aisa.one。