Originally created by Sahaj Jain (@jnsahaj) and continued here with permission.
Each coding agent — Claude Code, Codex, Gemini CLI, Copilot, Cursor, Windsurf, Pi, OpenCode — has its own plugin system, file layout, and frontmatter rules. agent-plugin-sdk lets you define a plugin once in TypeScript and compiles it to the native installable artifacts each harness expects. No runtime, no wrapper — the output is exactly the files those harnesses load on their own.
import { definePlugin, defineSkill } from "@jalco/ap-sdk";
export default definePlugin({
id: "git-helper",
description: "Helpers for reviewing and committing changes in a git repo.",
skills: [
defineSkill({
name: "diff-review",
description:
"Summarize and risk-flag uncommitted changes. Use when the user asks what changed.",
instructions:
"Run `git diff HEAD` and summarize the changes in 2-4 bullets.",
}),
],
});ap-sdk build # → .aps-out/{claude,codex,gemini,copilot,cursor,windsurf,pi,opencode}/
ap-sdk install # → drops artifacts into your local harness dirs| Field | What it becomes |
|---|---|
instructions |
Always-on system or project guidance for every supported harness. |
skills |
Reusable skill documents with descriptions and instructions. |
commands |
Slash commands or prompt commands in harnesses that support them. |
subagents |
Named specialist agents with their own prompts, tools, and model hints. |
hooks |
Lifecycle hooks and scripts translated to each harness' event model. |
mcpServers |
MCP server config emitted in native JSON/TOML/YAML formats. |
tools |
Shared TypeScript tool implementations with per-harness glue. |
files |
Companion files copied next to the generated native artifacts. |
See the support matrix for what each harness supports.
Point ap-sdk port at an existing Claude Code, Cursor, Codex, Gemini, Copilot, Windsurf, Pi, or OpenCode layout and it generates a portable plugin.ts that loads your existing files instead of inlining them.
npx ap-sdk port ./my-plugin
npx ap-sdk check ./plugin.ts
npx ap-sdk install owner/repoRead the porting guide, or install straight from GitHub with ap-sdk install owner/repo.
pnpm add -D @jalco/ap-sdkMIT · Originally by Sahaj Jain, continued by Justin Levine.