11-19 更新 实时
首页/ AI 大模型/ 正文

如何用插件跨仓库治理编码智能体技能

AI 大模型 来源:Towards Data Science 2026-11-17 23:00 0 阅读 机器翻译
如何用插件跨仓库治理编码智能体技能

到那时,挑战就不再是提示词的编写,而是知识治理。

随着 AI 编程助手在软件开发中日益普及,团队开始寻找方法,让它们的使用更加一致,并避免因速度超越共享的工程标准而可能出现的各类技术债务[1]。挑战不再只是生成代码,而是要确保 AI 辅助的开发遵循团队已经确立的架构决策、设计模式、测试实践和编码标准。

一种自然的做法是将其中一部分知识固化到附着于开发环境的持久化指令中,例如技能、规则、防护机制和可复用的参考。结合项目脚手架工具——它们能帮助从一开始就确立架构模式和工程约定(如上一篇文章[8]所述)——这意味着新项目启动时所能获得的,不再只是预定义的文件夹结构和配置:它还可以包含指导性内容,说明代码库预期如何演进,例如遵循特定的架构模式、使用已获认可的抽象,或应用既有的测试与集成实践。

这有助于降低每位开发者以不同方式处理同类任务的风险,同时就项目应如何开发形成共识。同样重要的是,它避免了不得不反复向编程助手解释相同约定。

Agent Skills 把这一理念的一部分固化为规范。Skills 由 Anthropic 于 2025 年 10 月推出,它将指令、脚本和资源打包在一起,智能体可以在需要时发现并加载它们 [2]。但 Skills 只是如今围绕编码智能体的更广泛知识层中的一部分:规则、参考文档、专用智能体、hooks 和工具配置都会影响智能体的工作方式 [7]。图 1 展示了这些要素在项目中如何共存的简化视图,且不绑定特定工具。

图 1. 编码智能体周边知识的简化视图。.agent/ 是一个示例性的、不绑定特定工具的文件夹名称,用以代表 .codex、.claude 等。不同的编码智能体使用不同的文件名和文件夹结构。Skills 提供可复用的工作流,规则定义约定,参考文档提供支撑知识,专用智能体细化行为,hooks 在特定事件上自动执行操作。图片由作者使用 AI 生成。

随着这一知识层不断扩张,就工程标准达成一致、并记录项目应如何演进,变得比以往任何时候都更加重要。文档不再只是系统如何被构建的记录;它也成为让团队与编码智能体围绕同一套约定保持对齐的机制。

然而,可复用知识只是围绕编码智能体的更广泛基础设施的一部分。Anthropic 将智能体运行框架描述为模型周围的软件脚手架,涵盖执行循环、工具、上下文管理和防护机制,使其能够作为智能体运行 [5]。在这一架构中,技能和其他持久性指令有助于引导智能体,而渐进式上下文加载和工具发现等机制则决定了在执行期间哪些知识和能力变得可用。随着这些要素的增长,挑战不再局限于编写好的指令,而是延伸到管理智能体所依赖的知识和能力。

当这一生态系统壮大时,挑战便随之出现。

这类知识通常与代码并存,以仓库中的文件和文件夹形式存在,但不仅限于最终项目中。模板和脚手架工具可能包含关于项目应如何创建和演进的指令。共享的内部库或包可能包含自己的指导,而从模板生成的项目会继承或复制其中部分知识,并添加自己的指令。

随着仓库独立演进,指导编码智能体的知识也可能出现分歧。一旦相同的指令在多个项目和团队中被复用,另一类治理问题便开始显现:

指令漂移与重复:相同的指导被复制到各个仓库,然后独立修改。随着时间推移,团队最终要维护最初相同指令的多个略有不同的版本,使得跨项目跟踪版本并一致地分发更新变得越来越困难。

知识归属与边界:随着组织规模扩大,区分共享知识与特定领域、特定平台或特定软件包的指导内容,变得越来越重要。如果缺乏清晰的边界与归属,代码仓库就会堆积大量互不相关的指令,导致难以确定由谁负责维护这些内容、审查变更,以及判定哪个版本才是正确的版本。

兼容性:针对某个版本的库、API、框架或架构而言正确的指导内容,会随着底层软件的演进而过时。因此,可复用的知识需要与其所描述的依赖项同步演进。

上下文与 Token 开销:随着生态不断扩大,在每一次编码会话中加载过多指令、参考资料或工具定义,会推高上下文消耗与成本,即便其中只有一小部分与当前任务相关。选择性加载知识,以及按需发现和访问相关工具的机制,有助于智能体更高效地管理工作上下文。

客户端与打包方式的碎片化:不同的编码智能体和开发环境可能在技能、规则、插件或工具配置上采用不同的约定。如果缺乏可移植的打包模型,团队就要为每个客户端重复相同的集成工作,开发者也要花时间把同一份知识适配到互不兼容的格式中。

认知投降与工程判断力的侵蚀:随着编码智能体能力越来越强,团队面临一种风险——不加充分质疑就接受生成的解决方案,而不去追问其背后的架构决策或权衡取舍。由文档、技术讨论和持续演进的标准所支撑的共享工程知识,有助于保住批判性思维,以及对这些决策的集体所有权。

这里存在一个有趣的悖论。我们引入这一知识层,是为了让 AI 辅助软件开发保持一致,但随着其规模扩大,管理这些知识本身也成了一项挑战。

Skills 为组织特定任务的知识提供了一个有用的单元,但共享单个 Skill 并不能解决更广泛的治理问题。一种可能的做法是采用可复用的知识单元,把相关的 Skills、规则、参考资料、钩子、智能体与工具配置整合在一起,从而支撑起一个更广泛的共享知识与能力生态。

这正是智能体插件变得格外有意思的地方。2026 年 2 月,AWS 将智能体插件描述为把不同类型的专业能力制品打包在一起的容器,其中包括 Skills、参考资料、钩子,以及通过 MCP 与外部工具的连接 [3]。因此,插件可以作为智能体知识与能力的分发单元。插件不必要求每个项目各自维护一份副本,而是可以拥有自己的负责人、生命周期和版本,同时被多个项目作为依赖项使用。

用软件包来做类比很有帮助。当多个应用依赖同一个库时,我们通常不会把该库的源代码复制到每一个代码仓库里。我们会单独维护它、为它做版本管理,让应用把它作为依赖来使用。智能体插件把类似的模式带到了编程智能体所使用的知识与能力上。

插件也可以超越静态的指令和文档。它们可以包含配置,用于通过 Model Context Protocol(MCP)把编程智能体连接到外部工具和服务。这引出了一种重要的区分:技能和参考资料主要指导智能体如何处理任务,而通过 MCP 连接的工具则让智能体能够与外部系统交互、获取实时信息或执行操作。插件可以把这些互补的能力打包在一起,而不必自己实现那些外部工具。

但组织很少只有一个可复用的插件。不同的能力天然属于不同的单元:云基础设施方面的指导可以与后端开发实践、数据科学工作流、安全规则,或与某个特定软件包相关的知识分开维护。把这些关注点放在不同的插件中,能让每一个插件的范围、负责人和生命周期都更清晰。

原文较长,译文为节选;译文由英文原文机器翻译,术语按行业惯例统一,可在文末展开原文核对。

查看英文原文(How to Govern Coding Agent Skills Across Repos With Plugins)

At that point, the challenge is no longer prompting. It is knowledge governance.

As AI coding assistants became more common in software development, teams started looking for ways to make their use more consistent and avoid the kinds of technical debt that can emerge when speed outpaces shared engineering standards [1]. The challenge was no longer only to generate code, but to make sure that AI-assisted development followed the same architecture decisions, design patterns, testing practices, and coding standards already established by the team.

One natural approach was to capture part of that knowledge in persistent instructions attached to the development environment, such as skills, rules, guardrails, and reusable references. Combined with project scaffolders, which can help establish architectural patterns and engineering conventions from the beginning (as discussed in a previous article [8]), this meant that a new project could start with more than a predefined folder structure and configuration: it could also include guidance describing how the codebase was expected to evolve, for example by following specific architectural patterns, using approved abstractions, or applying established testing and integration practices.

This helped reduce the risk of every developer approaching the same type of task differently, while creating a shared understanding of how the project should be developed. Just as importantly, it avoided having to explain the same conventions to the coding assistant over and over again.

Agent Skills formalized part of this idea. Introduced by Anthropic in October 2025, Skills package instructions, scripts, and resources that an agent can discover and load when relevant [2]. But skills are only one part of a broader knowledge layer that now surrounds coding agents: rules, reference documentation, specialized agents, hooks, and tool configurations can all influence how the agent works [7]. Figure 1 illustrates a simplified, tool-agnostic view of how these elements can coexist within a project.

Figure 1. A simplified view of the knowledge surrounding a coding agent. .agent/ is an illustrative, tool-agnostic folder name that represents .codex, .claude, etc. Different coding agents use different file names and folder structures. Skills provide reusable workflows, rules define conventions, references provide supporting knowledge, agents specialize behavior, and hooks automate actions at specific events. Image generated with AI by the author.

As this knowledge layer grew, agreeing on engineering standards and documenting how projects should evolve became more important than ever. Documentation is no longer just a record of how a system has been built; it has also become a mechanism for keeping teams and coding agents aligned around the same conventions.

However, reusable knowledge is only one part of the broader infrastructure surrounding a coding agent. Anthropic describes an agent harness as the software scaffolding around a model, encompassing the execution loop, tools, context management, and guardrails that enable it to operate as an agent [5]. Within this architecture, skills and other persistent instructions help guide the agent, while mechanisms such as progressive context loading and tool discovery determine what knowledge and capabilities become available during execution. As these elements grow, the challenge extends beyond writing good instructions to managing the knowledge and capabilities that agents depend on.

The challenge appears when that ecosystem grows.

This knowledge often lives alongside the code, as files and folders within repositories, but not only in end projects. Templates and scaffolders may contain instructions about how projects should be created and evolved. Shared internal libraries or packages may include their own guidance, while projects generated from templates inherit or replicate part of that knowledge and add instructions of their own.

As repositories evolve independently, the knowledge that guides coding agents can diverge as well. Once the same instructions are reused across multiple projects and teams, a different class of governance problems starts to appear:

Instruction drift and duplication: the same guidance is copied across repositories, then modified independently. Over time, teams end up maintaining multiple slightly different versions of what was originally the same instruction, making it increasingly difficult to track versions and distribute updates consistently across projects.

Knowledge ownership and boundaries: as organizations grow, distinguishing shared knowledge from domain-, platform-, or package-specific guidance becomes increasingly important. Without clear boundaries and ownership, repositories can accumulate unrelated instructions, making it difficult to determine who is responsible for maintaining them, reviewing changes, and deciding which version is the right one.

Compatibility: guidance that was correct for one version of a library, API, framework, or architecture can become outdated as the underlying software evolves. Reusable knowledge therefore needs to evolve alongside the dependencies it describes.

Context and token overhead: as the ecosystem grows, loading too many instructions, references, or tool definitions into every coding session increases context consumption and cost, even when only a small fraction is relevant to the task. Selective knowledge loading and mechanisms for discovering and accessing relevant tools on demand help agents manage their working context more efficiently.

Client and packaging fragmentation: different coding agents and development environments may use different conventions for skills, rules, plugins, or tool configuration. Without a portable packaging model, teams repeat the same integration work for each client and developers spend time adapting the same knowledge to incompatible formats.

Cognitive surrender and erosion of engineering judgment: as coding agents become more capable, teams risk accepting generated solutions without sufficiently questioning the architectural decisions or trade-offs behind them. Shared engineering knowledge, supported by documentation, technical discussions, and continuously evolving standards, helps preserve critical thinking and collective ownership of those decisions.

There is an interesting paradox here. We introduced this knowledge layer to bring consistency to AI-assisted software development, but as it scales, managing that knowledge becomes a challenge of its own.

Skills provide a useful unit for organizing task-specific knowledge, but sharing individual skills does not solve the broader governance problem. One possible approach is to use reusable units of knowledge that bring together related skills, rules, references, hooks, agents, and tool configurations, enabling a broader ecosystem of shared knowledge and capabilities.

This is where agent plugins become particularly interesting. In February 2026, AWS described agent plugins as containers that package different types of expertise artifacts together, including skills, references, hooks, and connections to external tools through MCP [3]. A plugin can therefore act as a distribution unit for agent knowledge and capabilities. Instead of requiring every project to maintain its own copy, a plugin can have its own owner, lifecycle, and version, while multiple projects consume it as a dependency.

The analogy with software packages is useful. When several applications depend on the same library, we generally do not copy the library's source code into every repository. We maintain it separately, version it, and let applications consume it as a dependency. Agent plugins bring a similar model to the knowledge and capabilities used by coding agents.

Plugins can also extend beyond static instructions and documentation. They may include configurations for connecting coding agents to external tools and services through the Model Context Protocol (MCP). This introduces an important distinction: skills and references primarily guide how agents approach tasks, while MCP-connected tools allow them to interact with external systems, retrieve live information, or perform operations. A plugin can package these complementary capabilities together without necessarily implementing the external tools itself.

But organizations rarely have just one reusable plugin. Different capabilities naturally belong in different units: cloud infrastructure guidance may be maintained separately from backend development practices, data-science workflows, security rules, or knowledge tied to a particular software package. Keeping these concerns in separate plugins gives each one a clearer scope, owner, and lifecycle.

Once plugins become independent units, a mechanism is needed to organize and distribute them. This is the role of a marketplace. A marketplace acts as a catalog of available plugins: it tells coding-agent clients which plugins exist and where they can be obtained. Importantly, accessing a marketplace does not mean installing every plugin in it. Each project can select the plugins that are relevant to its own context.

This shifts the source of truth for shared agent capabilities from individual projects to independently maintained plugins, allowing multiple repositories to consume the same versioned knowledge without duplicating it. For example, a backend project might combine infrastructure, code-quality, and backend-development plugins, while a data-science project might select infrastructure, Python-quality, and data-science plugins from the same catalog.

AWS provides a useful real-world example of this model. Agent Plugins for AWS are exposed through a marketplace as separate plugins for different capabilities, allowing developers to discover and install the ones relevant to their work [3].

As the number of plugins grows, another question appears: how should this knowledge be organized? Not every plugin has the same scope or the same owner. Some knowledge is shared across the organization, some belongs to a particular engineering domain, and some needs to evolve together with a specific software package.

A practical ecosystem can therefore separate reusable knowledge according to its ownership and lifecycle. Cross plugins capture capabilities shared across projects, domain plugins contain practices owned by a particular engineering area, and package plugins keep version-aware guidance close to the software they describe. When tied to a package, plugin updates can be coordinated with package releases, helping keep agent guidance aligned with the underlying implementation.

Projects can compose these capabilities through profiles that define which plugins they consume. Marketplaces provide discovery and distribution across coding-agent clients, while validation and CI/CD workflows help enforce consistency, compatibility, and versioning as plugins evolve. MCP can complement this architecture by connecting selected plugin workflows to external tools, data, and services when needed.

Figure 2 illustrates one possible organization of this model, connecting plugin ownership, project-level composition, distribution, and automated governance.

Figure 2. An example of how reusable coding-agent knowledge can be organized and governed at scale. Plugins are separated according to scope and ownership, projects compose the capabilities they need through profiles, marketplaces provide discovery and distribution, and CI/CD validates their evolution. MCP can optionally connect selected workflows to external tools and live systems. Image generated with AI by the author.

The approach discussed above was inspired by the AWS Agent Plugins ecosystem, which makes reusable capabilities available through a plugin marketplace [3]. Developers can discover and install these plugins directly within supported coding agents, without having to copy the underlying instructions and resources into each project. AWS is used here as a practical reference, rather than as an endorsement of a particular provider or ecosystem.

To see how this works on a smaller scale, consider a simple FastAPI application and Claude Code. A developer can register the AWS plugin marketplace, install the deploy-on-aws plugin, and use its capabilities to explore deployment options for the application. The agent can access the plugin's task-specific guidance and, where configured and available, use MCP-connected tools to retrieve relevant information from AWS services.

The following demonstration (gif) illustrates this journey, from installing the plugin to using its capabilities within an existing project.

Figure 3. AWS Agent Plugins in practice. A demonstration of how Claude Code discovers, installs, and uses the deploy-on-aws plugin from the AWS marketplace, accessing reusable deployment guidance and MCP-connected tools. The example illustrates how projects can consume shared agent capabilities without maintaining their own copies. GIF recorded and edited by the author.

The important part is not the deployment recommendation itself, but the underlying distribution model: the project can consume reusable agent capabilities without maintaining its own copy of the knowledge behind them.

The same principle can inspire broader approaches to knowledge governance. Figure 2 illustrates one possible organization, where teams maintain reusable capabilities according to their scope and ownership, while projects select what they need. Profiles, marketplaces, development containers, and CI/CD processes can support this model, but the underlying goal remains the same: making shared knowledge easier to maintain, update, and reuse across projects.

Although the demonstration uses a publicly available AWS plugin, the proposed approach focuses on building and governing internal sources of organizational knowledge. Relying on external plugin repositories can introduce additional challenges around security, data privacy, uncontrolled updates, compatibility, and ownership [6]. For example, plugins may contain executable scripts, hooks, or MCP configurations that interact with external systems, potentially exposing sensitive information or performing unintended operations. A practical approach is to develop and maintain internal plugins aligned with the organization's engineering standards and security policies, while carefully reviewing the contents and updates of any third-party plugins before adoption. The goal is not to discourage external capabilities, but to ensure that organizations understand and control what their agents can access and execute.

In other words, the AWS example demonstrates how a plugin is consumed in practice. The broader governance model shows how that same approach could be organized and maintained across an engineering organization.

Generalizing the Pattern

Although this article focuses on engineering, the underlying idea extends beyond coding agents. Organizations also rely on shared operational knowledge: internal procedures, business policies, approval processes, and workflows that define how work should be performed, including the tools, systems, and mechanisms needed to carry out those activities.

What if this knowledge could be packaged as reusable capabilities that different AI agents could discover and apply, rather than being repeatedly embedded into individual assistants or applications? For example, agents supporting claims processing or underwriting could reuse shared procedures and business rules packaged into plugins, while MCP-connected tools could provide access to enterprise systems, allowing agents to retrieve policy information, check claim statuses, or perform authorized operations. Together, these capabilities could help agents move beyond answering questions to supporting and executing established business processes.

While this article has focused on plugins consumed through coding agents and development environments, the same approach could be extended to conversational AI platforms, where users interact with reusable plugin capabilities directly within chat sessions rather than through IDEs. Exploring how this model could support business workflows, combining organizational knowledge with MCP-connected tools, is an interesting direction that deserves a dedicated article.

The implementation may vary, but the underlying challenge remains remarkably similar: defining who owns organizational knowledge, how it evolves, which agents can access it, and how changes are distributed consistently.

Coding agents have introduced a new layer of knowledge into software development. Skills, rules, references, and other forms of guidance can help agents follow the engineering practices that teams have established. But when that knowledge is copied across templates, packages, and projects, maintaining it becomes increasingly difficult.

Plugins offer a different distribution model. Instead of requiring every repository to own a copy of the knowledge it needs, reusable capabilities can be maintained by the teams, organizations, or packages that own them and consumed by multiple projects.

This does not eliminate questions around compatibility, versioning, security, or governance. In fact, it makes them more explicit. Plugins and their integrations need to be reviewed, updated, and validated as the underlying knowledge, tools, and systems evolve. Access to external systems should follow appropriate security controls, including least-privilege permissions, while generated code and infrastructure still require testing, security checks, and human review.

Ultimately, the goal is to establish a sustainable governance model for reusable agent knowledge: clear ownership, explicit versioning, controlled access, and consistent distribution, while preserving human accountability for how these capabilities are used and evolved.

The architecture explored in this article illustrates one possible way to put these principles into practice, rather than prescribing a definitive solution. What matters most is the underlying shift: treating agent knowledge as a shared, maintainable resource that can evolve with the organization, instead of a collection of instructions repeatedly copied across projects. Whatever approach organizations adopt, clear governance and human accountability remain essential.

Best Practices for Governing Agent Knowledge

Regardless of how reusable agent knowledge is organized and distributed, a few principles can help organizations maintain consistency and control:

Establish clear ownership: define who is responsible for maintaining, reviewing, and approving changes to shared knowledge and capabilities.

Manage versions and compatibility: keep reusable instructions and plugins aligned with the libraries, tools, and architectures they support.

Control access and dependencies: review external plugins and integrations, apply least-privilege permissions, and validate changes before distributing them across projects.

Review generated code: validate AI-generated code and infrastructure against security, quality, cost, and resilience requirements before deployment.

Preserve engineering judgment: use plugins and shared knowledge as accelerators, not replacements for technical expertise, critical thinking, or human accountability.

[1] Gomes, E. (2026, January 15). Do you smell that? Hidden technical debt in AI development. Towards Data Science. https://towardsdatascience.com/do-you-smell-that-hidden-technical-debt-in-ai-development/

[2] Anthropic. (2025, October 16). Equipping agents for the real world with Agent Skills.https://www.anthropic.com/engineering/equipping-agents-for-the-real-world-with-agent-skills

[3] Lewis, A., Krok, A., Lewis, J., Al-Saadoon, L., Castro, S., & Schreckengaust, S. (2026, February 17). Introducing Agent Plugins for AWS. AWS Developer Tools Blog.

[4] Clark, L., & Ward, J. (2026, August 6).AWS Supports Agent Plugins: An Open Standard for Portable Agent Extensions. AWS Open Source Blog. https://aws.amazon.com/blogs/opensource/aws-supports-agent-plugins-an-open-standard-for-portable-agent-extensions/

[5] Anthropic. (2026, April 2). Agent Harness Design: 3 Patterns for Harnessing Claude’s Intelligence. Anthropic defines an agent harness as the software scaffolding around a model, including the loop, tools, context management, and guardrails that turn raw model intelligence into a working agent. https://claude.com/resources/articles/harnessing-claudes-intelligence

[6] Browning, A. (2026, June 23). Stop Treating Coding Agent Plugins Like Settings: Introducing Agent Plugins Repositories. JFrog Blog. https://jfrog.com/blog/introducing-agent-plugins-repositories/

[7] Galster, M., Mohsenimofidi, S., Lulla, J. L., Abubakar, M. A., Treude, C., & Baltes, S. (2026). Harness Engineering for Agentic AI Coding Tools: An Exploratory Study. arXiv. https://arxiv.org/abs/2602.14690

[8] Gomes, E. (2026). A Scaffold at the Gate: Building AI Applications That Can Evolve. Towards Data Science. https://towardsdatascience.com/a-scaffold-at-the-gate-building-ai-applications-that-can-evolve/

A favorite amongst those who use them... wonder why?

July 26, 20217 min read

Learning entire simplicial complex representations using higher order geometric message passing schemes

November 13, 20216 min read

Your daily dose of data science

January 25, 20211 min read

Data privacy, compliance, and trust gaps in today’s AI agent integrations

April 28, 20257 min read

Polars, Dask, RAPIDS.ai cuDF, and Numba are compared against Pandas 2.0 with pyarrow in the backend, vectorization, and itertuples()...

Without these, Claude might end up being confidently wrong.

June 14, 20267 min read

When a tool breaks, an agent can keep going and write a confident answer from nothing while the dashboard stays green.

October 25, 20268 min read

hidden cost of asynchronous systems, how tiny CPU tasks quietly became our biggest bottleneck while scaling hundreds of LLM agents.

July 23, 20269 min read

How autonomous agents broke two decades of capacity planning — and what to build instead

August 17, 202611 min read

原文为英文,正文由自动抓取并保留原文。

本文由采集器自动同步

原文发布于 Towards Data Science(How to Govern Coding Agent Skills Across Repos With Plugins),标题、摘要与正文由机器翻译,术语按行业惯例统一,未经人工逐句校订。

阅读原文 ↗