agent-plugin-template
Vendor-neutral starter for packaging agent extensions as an Open Plugins unit that ships Agent Skills.
OpenSkills is a useful catalog/installer for skills; the portable format standard is Agent Skills, and the distribution unit is Open Plugins (see ADR 0002).
Two tracks
- Flat plugin (default) — develop and load the repo root directly.
- Host adapters (optional) — build reproducible Cursor / Claude / Codex marketplaces with overlays under
adapters/.
Prerequisites
- A conformant plugin host (Cursor, Claude Code, OpenCode, …)
- Python 3.10+ for adapter builds and
scripts/validate.sh
- Optional:
skills-ref
Layout
agent-plugin-template/
├── .plugin/plugin.json # Open Plugins manifest (primary)
├── .claude-plugin/ # Claude marketplace + plugin manifests
├── .cursor-plugin/ # Cursor marketplace + plugin manifests
├── .agents/plugins/marketplace.json # Codex-native marketplace index
├── VERSION # Semver lockstep source
├── skills/hello/ # Portable Agent Skill
├── commands/ agents/ rules/ hooks/
├── scripts/lint.sh # Shipped hook helper
├── scripts/validate.sh # Authoring: lockstep + frontmatter checks
├── scripts/build_all.sh # Authoring: validate + all adapters
├── adapters/ # Optional host marketplace builders
│ ├── _build_lib.py
│ ├── _install_lib.py / _install_lib.sh
│ ├── cursor|claude|codex/ # build_plugin.py + install.sh
│ └── tests/
├── docs/adr/ # Packaging decisions
├── docs/HOST_MATRIX.md
├── dist/ # Generated (gitignored)
├── LICENSE
├── CHANGELOG.md
└── README.md
Namespaced invoke: /agent-plugin-template:hello, /agent-plugin-template:status.
Customize
- Rename the repo and update
VERSION, .plugin/plugin.json, and adapters/*/plugin.template.json together.
- Rename
skills/hello/ and keep the directory name equal to SKILL.md name.
- Replace author / description / LICENSE copyright.
- Delete example components you do not need.
- Add host-only notes in
adapters/<host>/skill-overlay.md when using adapters.
Local test (flat plugin)
claude --plugin-dir ./
/agent-plugin-template:hello
Validate
./scripts/validate.sh
python3 -m unittest discover -s adapters/tests -v
Build host marketplaces
./scripts/build_all.sh
# or one host:
python3 adapters/cursor/build_plugin.py
Outputs land in dist/<host>-marketplace/ with BUILD-MANIFEST.json and a versioned zip. Do not hand-edit dist/ — see CONTRIBUTING.md.
Install (end users)
One primary command per host. Plain install upgrades in place (replaces any prior managed install).
Root marketplace indexes for native host flows:
| Host | Root marketplace index |
|---|
| Claude Code | .claude-plugin/marketplace.json |
| Cursor | .cursor-plugin/marketplace.json |
| Codex | .agents/plugins/marketplace.json |
Claude Code
curl -fsSL https://raw.githubusercontent.com/theocarranza/agent-plugin-template/main/adapters/claude/install.sh \
| bash -s -- --repo theocarranza/agent-plugin-template --ref main
Marketplace:
/plugin marketplace add theocarranza/agent-plugin-template
/plugin install agent-plugin-template@agent-plugin-template
Uninstall: same curl pattern with adapters/claude/uninstall.sh.
Cursor
curl -fsSL https://raw.githubusercontent.com/theocarranza/agent-plugin-template/main/adapters/cursor/install.sh \
| bash -s -- --repo theocarranza/agent-plugin-template --ref main
Team marketplace: Dashboard → Plugins → Import from Repo (reads .cursor-plugin/marketplace.json).
Public marketplace: cursor.com/marketplace/publish.
Uninstall: adapters/cursor/uninstall.sh (curl pattern as above).
Codex
curl -fsSL https://raw.githubusercontent.com/theocarranza/agent-plugin-template/main/adapters/codex/install.sh \
| bash -s -- --repo theocarranza/agent-plugin-template --ref main
Marketplace:
codex plugin marketplace add theocarranza/agent-plugin-template --ref main
codex plugin add agent-plugin-template@agent-plugin-template
Uninstall: adapters/codex/uninstall.sh (curl pattern as above).
Forks: replace theocarranza/agent-plugin-template with your OWNER/REPO.
Distribute
- Push this repo to GitHub.
- Point users at the concrete curl one-liners in Install (end users) (or the matching
adapters/<host>/README.md). Forks should rewrite the repo slug.
- For multi-plugin collections, add a root
marketplace.json (not required here).