用一个API安装代理技能和MCP
概览
用一个API安装代理技能和MCP。 支持Claude Code、Cursor、Codex、OpenCode以及40+其他编码代理。可以写入每个代理的原生配置(技能目录、MCP JSON/JSONC/YAML/TOML、AGENTS.md),这样你的CLI或构建脚本就不用学习十种不同格式。还附带一个小型代理安装CLI供一次性使用。 或者直接使用CLI而不安装: Node API 按表面(skill、mcp、agentsMd)命名,使用与 CLI 相匹配的动词(add、list、remove、setSection、removeSection、read)。 一个包裹 Node API 的薄包裹器,用于一次性安装、脚本和 CI。 你也可以从每个表面的子路径导入: 技能是一个 SKILL.md 文件,代理会取用它来触发行为。skill.add 解析源代码(本地路径、GitHub 仓库或 URL),获取它,并将发现的每个 SKILL.md 安装到每个选定的代理中。 MCP。
概述(AI 翻译)
用一个API安装代理技能和MCP。
支持Claude Code、Cursor、Codex、OpenCode以及40+其他编码代理。写入每个程序的原生配置(技能目录、MCP JØL/JSONC/YAML/TOML、AGENTS.md),这样你的CLI或构建脚本就不用学十种不同格式。还附带一个小型agent-install的CLI供一次性使用。
安装
作为图书馆:
或者直接使用CLI而不安装:
快速开始
Node API 中的同样三个操作:
节点API按表面命名(skill、mcp、agentsMd),使用与CLI相匹配的动词(add、list、remove、setSection、removeSection、read)。
CLI
一个包裹 Node API 的薄包裹器,用于一次性安装、脚本和 CI。
技能
MCP 服务器
AGENTS.md
节点 API
你也可以从每个表面的子路径导入:
技能
技能是一个SKILL.md文件,代理会获取它来触发行为。skill.add解析源代码(本地路径、GitHub仓库或URL),获取它,并将发现的每个SKILL.md安装到每个选定代理中。
其他有用的出口:
MCP 服务器
'MCP。
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
agent-install
Install agent skills and MCPs with one API.
Works with Claude Code, Cursor, Codex, OpenCode, and 40+ other coding agents. Writes to each one’s native config (skills directory, MCP JSON/JSONC/YAML/TOML, AGENTS.md) so your CLI or build script doesn’t have to learn ten different formats. A small agent-install CLI is also included for one-off use.
Install
As a library:
npm install agent-install
Or use the CLI directly without installing:
npx agent-install@latest --help
Quick start
npx agent-install@latest skill add owner/repo -a cursor
npx agent-install@latest mcp add https://mcp.context7.com/mcp -a cursor
npx agent-install@latest agents-md set-section "Testing" --body "Run pnpm test"
Same three actions from the Node API:
import { skill, mcp, agentsMd } from "agent-install";
await skill.add({ source: "owner/repo", agents: ["cursor"] });
mcp.add({ source: "https://mcp.context7.com/mcp", agents: ["cursor"], name: "context7" });
agentsMd.setSection({ heading: "Testing", body: "Run pnpm test" });
The Node API is namespaced by surface (skill, mcp, agentsMd) using verbs that match the CLI (add, list, remove, setSection, removeSection, read).
CLI
A thin wrapper around the Node API for one-off installs, scripts, and CI.
Skills
npx agent-install@latest skill add ./skills/react-grab
npx agent-install@latest skill add owner/repo
npx agent-install@latest skill add https://github.com/owner/repo/tree/main/skills/foo
npx agent-install@latest skill init [name] # create a new SKILL.md
npx agent-install@latest skill list # list installed skills
npx agent-install@latest skill remove [skills] # remove installed skills
MCP servers
npx agent-install@latest mcp add https://mcp.context7.com/mcp -a cursor
npx agent-install@latest mcp add @modelcontextprotocol/server-postgres -a claude-code --env "DATABASE_URL=..."
npx agent-install@latest mcp list # list installed MCP servers
npx agent-install@latest mcp remove # remove by server name
AGENTS.md
npx agent-install@latest agents-md init
npx agent-install@latest agents-md set-section "Testing" --body "Run pnpm test"
npx agent-install@latest agents-md remove-section "Testing"
npx agent-install@latest agents-md symlink-claude
npx agent-install@latest agents-md read
Node API
You can also import each surface from its own subpath:
import * as skill from "agent-install/skill";
import * as mcp from "agent-install/mcp";
推荐工具
换一个关键词,或者移除筛选条件。
安装
npx skillfish add millionco/agent-install