En

agent-plugin-sdk

Write Once, Run Everywhere: An AI Plugin SDK

Install & Use

Copy this prompt and send it to your AI assistant (Claude / Cursor / TRAE / Codex / WorkBuddy etc.) to auto-install:

Help me install this AI Skill: agent-plugin-sdk.
It is used for: Write Once, Run Everywhere: An AI Plugin SDK
Full Skill content: https://321skill.com/skills/agent-plugin-sdk/raw/index.md
Read that page and install it.

The prompt includes a link to the full Skill content. You can also view the full content.

This Skill addresses the pain point of repeatedly writing plugins for different AI coding agents (such as Claude Code, Codex, Cursor, etc.). Each platform has its own file layout, format, and frontmatter rules, making manual maintenance of multiple versions costly and error-prone. The agent-plugin-sdk allows you to define a plugin once in TypeScript, which is then automatically compiled into natively installable artifacts for each target platform, with no runtime or wrapper required.

Usage is straightforward: install the @jalco/ap-sdk package, then call definePlugin and defineSkill to define your skills, commands, sub-agents, and more. After that, run the ap-sdk build command to generate corresponding platform-specific folders in the .aps-out directory; running ap-sdk install will automatically deploy these artifacts to the local plugin directories of each platform. You can also use the ap-sdk port command independently to migrate existing Claude Code or Cursor plugins into a portable format.

It is ideal for teams or individuals who need to maintain plugins for multiple AI coding agents simultaneously, especially those who have built internal AI toolchains and wish to manage skill configurations uniformly. For scenarios requiring rapid deployment of a single skill set across multiple coding environments (e.g., a team using both Claude Code and Cursor), this tool significantly reduces redundant effort.

We recommend adopting this SDK uniformly within teams to manage all AI plugins and updating it regularly to support the latest platforms. Note that it primarily generates static files with no runtime dependencies, but requires Node.js version ≥18. The current list of supported platforms is limited (Claude Code, Codex, Gemini CLI, Copilot, Cursor, Windsurf, Pi, OpenCode). If a platform is not on the list, you will need to extend support yourself.

Key Features

Unlike native plugin systems for each platform, which require manually maintaining multiple codebases, the agent-plugin-sdk supports writing a TypeScript definition once, which is then automatically compiled into each platform's native format, eliminating the need for manual adaptation of directory structures and frontmatter rules.

Limitations

Requires Node.js ≥18. Currently supports only 8 platforms: Claude Code, Codex, Gemini CLI, Copilot, Cursor, Windsurf, Pi, and OpenCode. It does not cover all AI coding agents.

FAQ

How do I install the agent-plugin-sdk?

Install globally: `npm install -g @jalco/ap-sdk`, or install locally in your project and use `npx ap-sdk`.

Which AI coding platforms are supported?

Currently supports Claude Code, Codex, Gemini CLI, Copilot, Cursor, Windsurf, Pi, and OpenCode. Please refer to the official support matrix for details.

Installation guide for AI assistants

If your AI coding assistant (Claude Code, Cursor, TRAE etc.) can see this page, send it this message to auto-install:

Visit https://321skill.com/skills/agent-plugin-sdk/raw/index.md to read the original Skill definition (Markdown format) for agent-plugin-sdk, and install it according to the instructions.