Skip to content

Author and publish APM packages

You’re here because you want to author an APM package others can install. This is the producer ramp.

Start a fresh package with apm plugin init; add a marketplace later with apm marketplace init. Two primitive postures cover most repos — ship your own plugin, or curate others into a marketplace — and they compose: one repo can do both at once. The five steps below tell you what to do between scaffolding and shipping.

Five steps, in order. Each links to the page that owns it:

#StepWhat success looks like
1Author primitivesSkills, prompts, instructions, agents, hooks, commands, MCP under .apm/
2Compile your packageapm compile writes deterministic per-target output you can git-diff
3Preview and validateapm preview and apm view confirm what consumers will receive
4Pack a bundleapm pack produces a .tar.gz you can ship offline or to a marketplace
5Publish to a marketplaceOthers install your package with apm install <owner>/<repo>

You don’t need a marketplace to start. Step 4 is enough for internal teams; the marketplace step is for public discovery.

Your situationStart here
First time — want a working package end-to-endYour first package
You have primitives in .apm/ and need to test them locallyCompile your package
You’re about to ship — want to verify what consumers will seePreview and validate
You need to ship a single file to a customer / air-gapped envPack a bundle
You want a public marketplace listingPublish to a marketplace
Your package links into other packages and you hit broken refsPackage-relative links

Once the 5-rung ladder works end to end, three pages cover the operational concerns of shipping at scale. They are independent of each other — pick what you need.

ConcernPage
Picking a repo layout before you authorRepo shapes — two starting layouts plus a hybrid composition for teams that ship their own plugin alongside a curated marketplace of others
Aligning versions across local packagesVersioning strategies
Wiring the release into any CI providerReleasing from any CI

A producer package is just a directory with:

my-package/
apm.yml # manifest -- who you are, what you depend on
.apm/
skills/ # primitives consumers can install
prompts/
instructions/
agents/
hooks/
README.md # rendered on the marketplace listing

apm compile deterministically transforms .apm/ into per-target output. apm pack zips the result and, when an apm.yml declares a marketplace: block, writes the marketplace artifact alongside the bundle. Consumers reach it with apm marketplace add. There is no separate “build pipeline” — the CLI is the build pipeline.

Every package you publish here installs through the consumer ramp’s apm install command. Test that loop yourself: install your own package in a scratch repo before declaring it shipped. The preview page walks you through the dry-run.