agent-bridge

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Agent Bridge

Agent Bridge

Overview

概述

This skill adapts and transforms plugin content into the specific formats required by different AI agent environments. It ensures each runtime can see and use the plugin's capabilities in its native format.
此技能可将插件内容适配转换为不同AI Agent环境所需的特定格式,确保每个运行时都能识别并以原生格式使用插件的能力。

Prerequisite

前置要求

The auto-detect mode only targets existing directories. Create them first:
bash
mkdir .agent .github .gemini .claude
If no directories are found, the installer will print this exact error with the mkdir command.
自动检测模式仅针对已存在的目录,请先创建对应目录:
bash
mkdir .agent .github .gemini .claude
如果未找到任何目录,安装程序将输出此错误以及对应的mkdir命令。

Usage

使用方法

CRITICAL: You must never use
--target auto
. You must explicitly specify your own runtime environment (e.g.,
antigravity
,
claude
,
gemini
,
github
) to avoid polluting other IDEs.
Universal Target Support (Agent Awareness): You are a Universal Translator. You are not limited to the primary examples. If you identify your host system as ANY of the following platforms (or similar ones), you MUST invoke the installer with that specific target name (e.g.
--target roo
). Supported Environments: amp, codex, cursor, gemini cli, github copilot, kimi code cli, opencode, antigravity, augment, claude code, openclaw, cline, codebuddy, command code, continue, cortex code, crush, droid, goose, junie, iflow cli, kiko code, kiro cli, kode, mcpjam, mistral vibe, mux, openhands, pi, qoder, qwen code, roo code, trae, trae cn, windsurf, zencoder, neovate, pochi, adal.
重要警告:你绝对不能使用
--target auto
参数,必须显式指定你自己的运行时环境(例如
antigravity
claude
gemini
github
),避免污染其他IDE。
通用目标支持(Agent感知): 你相当于一个通用转换器,并不局限于上述示例。如果你识别到你的宿主系统属于以下任意平台(或类似平台),必须使用对应的目标名称调用安装程序(例如
--target roo
)。 支持的环境: amp, codex, cursor, gemini cli, github copilot, kimi code cli, opencode, antigravity, augment, claude code, openclaw, cline, codebuddy, command code, continue, cortex code, crush, droid, goose, junie, iflow cli, kiko code, kiro cli, kode, mcpjam, mistral vibe, mux, openhands, pi, qoder, qwen code, roo code, trae, trae cn, windsurf, zencoder, neovate, pochi, adal.

Bridge a Single Plugin

桥接单个插件

bash
undefined
bash
undefined

Bridge to Claude Code specifically

Bridge to Claude Code specifically

python plugins/plugin-mapper/skills/agent-bridge/scripts/bridge_installer.py --plugin <plugin-path> --target claude
python plugins/plugin-mapper/skills/agent-bridge/scripts/bridge_installer.py --plugin <plugin-path> --target claude

Bridge to Antigravity specifically

Bridge to Antigravity specifically

python plugins/plugin-mapper/skills/agent-bridge/scripts/bridge_installer.py --plugin <plugin-path> --target antigravity

**Example:**
```bash
python plugins/plugin-mapper/skills/agent-bridge/scripts/bridge_installer.py --plugin plugins/my-plugin --target antigravity
python plugins/plugin-mapper/skills/agent-bridge/scripts/bridge_installer.py --plugin <plugin-path> --target antigravity

**示例:**
```bash
python plugins/plugin-mapper/skills/agent-bridge/scripts/bridge_installer.py --plugin plugins/my-plugin --target antigravity

Bridge All Plugins (Ecosystem Sync)

桥接所有插件(生态同步)

For a standalone plugin install:
bash
python plugins/plugin-mapper/skills/agent-bridge/scripts/install_all_plugins.py --target gemini

独立插件安装场景下使用:
bash
python plugins/plugin-mapper/skills/agent-bridge/scripts/install_all_plugins.py --target gemini

Component Mapping Matrix

组件映射矩阵

The bridge intelligently maps plugin source components to the correct file extensions, directories, and architectures expected by the agent environment.
Target Environment
commands/*.md
skills/
agents/*.md
rules/
hooks/hooks.json
.mcp.json
Claude Code (
.claude/
)
commands/*.md
skills/
skills/<plugin>-<agent>/SKILL.md
Appended to
./CLAUDE.md
hooks/<plugin>-hooks.json
Merged (
./.mcp.json
)
GitHub Copilot (
.github/
)
prompts/*.prompt.md
skills/
skills/<plugin>-<agent>/SKILL.md
Appended to
.github/copilot-instructions.md
(Ignored)Merged (
./.mcp.json
)
Google Gemini (
.gemini/
)
commands/*.toml
skills/
skills/<plugin>/agents/
Appended to
./GEMINI.md
(Ignored)Merged (
./.mcp.json
)
Antigravity (
.agent/
)
workflows/*.md
skills/
skills/<plugin>-<agent>/SKILL.md
.agent/rules/
(Ignored)Merged (
./.mcp.json
)
Azure AI Foundry (
.azure/
)
(Ignored)
skills/
agents/
(Ignored)(Ignored)
.vscode/mcp.json
(Capability Hosts)
Universal Generic (
.<target>/
)
commands/*.md
skills/
skills/<plugin>/agents/
.<target>/rules/
(Ignored)Merged (
./.mcp.json
)
GitHub Copilot — Two Agent Types: The
agents/*.agent.md
column for GitHub Copilot covers two distinct use cases:
  • IDE / UI Agents:
    .github/agents/name.agent.md
    +
    .github/prompts/name.prompt.md
    — invokable by human via Copilot Chat slash command or agent dropdown in VS Code / GitHub.com.
  • CI/CD Autonomous Agents:
    .github/agents/name.agent.md
    +
    .github/workflows/name-agent.yml
    — triggered automatically by GitHub Actions on PR/push/schedule with a Kill Switch quality gate.
The
commands/*.md
prompts/*.prompt.md
mapping handles the slash-command pointer only. The full rich instruction body should live in the
.agent.md
file, not the
.prompt.md
. Use the
create-agentic-workflow
skill to scaffold either or both agent types from an existing Skill.
桥接工具会智能将插件源组件映射到Agent环境预期的正确文件扩展名、目录和架构。
目标环境
commands/*.md
skills/
agents/*.md
rules/
hooks/hooks.json
.mcp.json
Claude Code (
.claude/
)
commands/*.md
skills/
skills/<plugin>-<agent>/SKILL.md
追加到
./CLAUDE.md
hooks/<plugin>-hooks.json
合并 (
./.mcp.json
)
GitHub Copilot (
.github/
)
prompts/*.prompt.md
skills/
skills/<plugin>-<agent>/SKILL.md
追加到
.github/copilot-instructions.md
(忽略)合并 (
./.mcp.json
)
Google Gemini (
.gemini/
)
commands/*.toml
skills/
skills/<plugin>/agents/
追加到
./GEMINI.md
(忽略)合并 (
./.mcp.json
)
Antigravity (
.agent/
)
workflows/*.md
skills/
skills/<plugin>-<agent>/SKILL.md
.agent/rules/
(忽略)合并 (
./.mcp.json
)
Azure AI Foundry (
.azure/
)
(忽略)
skills/
agents/
(忽略)(忽略)
.vscode/mcp.json
(能力宿主)
通用类型 (
.<target>/
)
commands/*.md
skills/
skills/<plugin>/agents/
.<target>/rules/
(忽略)合并 (
./.mcp.json
)
GitHub Copilot — 两类Agent:GitHub Copilot对应的
agents/*.agent.md
列覆盖两种不同的使用场景:
  • IDE / UI Agent
    .github/agents/name.agent.md
    +
    .github/prompts/name.prompt.md
    — 用户可在VS Code/GitHub.com中通过Copilot Chat斜杠命令或Agent下拉菜单调用。
  • CI/CD 自主Agent
    .github/agents/name.agent.md
    +
    .github/workflows/name-agent.yml
    — 由GitHub Actions在PR/推送/定时任务时自动触发,附带Kill Switch质量门禁。
commands/*.md
prompts/*.prompt.md
的映射仅处理斜杠命令的指向,完整的富指令内容应该存放在
.agent.md
文件中,而不是
.prompt.md
。你可以使用
create-agentic-workflow
技能基于现有技能脚手架生成任意一种或两种类型的Agent。

Supported Environments (In-Depth)

支持的环境(详细说明)

Gemini TOML Format

Gemini TOML格式

Command
.md
files are wrapped in TOML. Frontmatter is parsed — the
description
field is extracted and used as the TOML
description
. The frontmatter block is stripped from the prompt body.

命令
.md
文件会被封装到TOML中。工具会解析前言部分,提取
description
字段作为TOML的
description
,前言块会从提示词正文中移除。

Skills vs Workflows (Commands) Caution

技能与工作流(命令)注意事项

CRITICAL: The bridge processes
skills/
and
commands/
(or
workflows/
in older plugins) as distinct directories. Algorithms/Logic can be deployed to either, but be careful of duplicating them!
  • skills/
    are typically for passive knowledge, tools, and persistent behavior.
  • commands/
    are for active, slash-command execution workflows.
Do not place identical markdown files in both directories within the same plugin, or the bridge will blindly duplicate the logic into the target environments (e.g. into
.agent/workflows/
and
.agent/skills/
simultaneously, causing contextual bloat).
toml
command = "plugin-name:command-name"
description = "Description from frontmatter"
prompt = """
重要警告:桥接工具会将
skills/
commands/
(旧版插件中为
workflows/
)作为独立目录处理。算法/逻辑可以部署到任意一类目录,但请注意不要重复!
  • skills/
    通常用于存放被动知识、工具和持久性行为。
  • commands/
    用于存放主动的斜杠命令执行工作流。
不要在同一个插件的两个目录中放置完全相同的markdown文件,否则桥接工具会将逻辑盲目复制到目标环境中(例如同时复制到
.agent/workflows/
.agent/skills/
,导致上下文冗余)。
toml
command = "plugin-name:command-name"
description = "Description from frontmatter"
prompt = """

Command content without frontmatter

Command content without frontmatter

... """

---
... """

---

When to Use

适用场景

  • Installing a new plugin: Run bridge after dropping a plugin into
    plugins/
    .
  • Adding a new target environment: Existing plugins need to be re-bridged after adding
    .gemini/
    etc.
  • Upgrading a plugin: Re-run bridge to overwrite with latest command content.
  • 安装新插件:将插件放入
    plugins/
    目录后运行桥接工具。
  • 新增目标环境:添加
    .gemini/
    等目录后需要重新桥接现有插件。
  • 升级插件:重新运行桥接工具,用最新的命令内容覆盖旧版本。