Publish to a marketplace
Use this page when you maintain several packages or plugins and want people to
find them by name instead of by repository URL. A marketplace is a published
list: a marketplace.json file in a git repository, where each entry names a
package, the repository it comes from and the version to install. You author it
in apm.yml, and apm pack writes the file each harness (agent tool) reads.
Authoring uses the marketplace: block in apm.yml, the apm marketplace init,
package, check, outdated, audit and migrate commands, and the
marketplace output of apm pack.
Create the marketplace
Section titled “Create the marketplace”Start in an empty repository for the marketplace, such as
contoso/agent-marketplace. The packages it lists stay in their own
repositories, each with its own tags.
-
Add a
marketplace:block.Terminal window apm marketplace init --owner contoso --name contosoThis adds a
marketplace:block, annotated with comments, toapm.yml, with one placeholder entry,example-package. -
Replace the placeholder with your packages.
Terminal window apm marketplace package remove example-package --yesapm marketplace package add microsoft/apm-sample-package --version "^1.0.0" --category developer-tools--versiontakes a semver range;apm packresolves it to the highest matching tag. Use--refto pin a tag or commit instead. -
Choose which harnesses get a marketplace file.
apm.yml marketplace:outputs:claude: {}copilot: {}codex: {}Codex output requires a
categoryon every package, which step 2 set. The older list form (outputs: [claude, codex]) still works;apm packandapm marketplace checkprint a deprecation warning showing this map form. -
Check that every entry resolves.
Terminal window apm marketplace checkAPM prints one row per package and
[+] All 1 entries OK. A missing tag or a range with no match fails here, before you publish. -
Build the marketplace files.
Terminal window apm pack[!] No 'license:' field in apm.yml; the SBOM will record NOASSERTION for thispackage. Add a 'license:' field to apm.yml (an SPDX expression such as MIT orApache-2.0, or UNLICENSED) to declare it.[*] Built marketplace.json [claude] (1 package(s)) -> .../.claude-plugin/marketplace.json[*] Built marketplace.json [copilot] (1 package(s)) -> .../.github/plugin/marketplace.json[*] Built marketplace.json [codex] (1 package(s)) -> .../.agents/plugins/marketplace.json...Each entry records the resolved tag and its commit SHA. Add
license:toapm.ymlto clear the warning. -
Commit and tag.
Terminal window git add apm.yml .claude-plugin/ .github/plugin/ .agents/plugins/git commit -m "Marketplace 1.0.0"git tag -a v1.0.0 -m "v1.0.0"git push --follow-tags
To try the marketplace before you push, register the local file:
apm marketplace add ./apm.yml --name contoso-devapm marketplace browse contoso-devAPM rereads apm.yml on every command; it builds and publishes nothing.
How consumers use it
Section titled “How consumers use it”APM users register the marketplace once per machine, pinned to your tag, and install by name:
apm marketplace add contoso/agent-marketplace --ref v1.0.0 --name contosoapm install apm-sample-package@contosoTheir lockfile records the package’s commit and where it was found:
discovered_via: contoso, plus constraint and resolved_tag when they
declare a range. Claude Code reads .claude-plugin/marketplace.json
(/plugin marketplace add contoso/agent-marketplace), Copilot CLI reads
.github/plugin/marketplace.json, and Codex reads
.agents/plugins/marketplace.json. That Codex catalog is separate from what
apm install writes in the same folder for plugins your repository itself
uses (.agents/plugins/<plugin>/ and .agents/plugins/.claude-plugin/marketplace.json).
The full consumer side:
Install from a marketplace.
Choose a repository shape
Section titled “Choose a repository shape”| Shape | packages: entries | Use it when |
|---|---|---|
| One repository per package, plus a marketplace repository | Remote: source: contoso/review-skills, version: "^1.0.0" | Packages release on their own schedule. The usual choice. |
| One plugin and its marketplace in one repository | Local: source: ./ | You ship a single plugin and want it listed. |
| Monorepo | Local: source: ./plugins/review, one apm.yml per plugin | Many plugins share a repository and a release. |
Add a local entry with
apm marketplace package add ./plugins/review --name review --version 0.1.0 --no-verify.
For local entries, marketplace.versioning.strategy decides how versions are
checked at release: lockstep (the default; every package version: equals the
root version:), tag_pattern or per_package.
To serve several audiences from one repository, give each its own folder with an
apm.yml, and have consumers register each file with --path. Separate files
organize discovery; they are not access control.
On GitHub Enterprise Cloud (*.ghe.com), consumers refuse an entry whose bare
owner/repo would fall back to public github.com, unless their GITHUB_HOST is the
marketplace host. An entry that points at the marketplace repository itself is always
accepted. Host-qualify every other entry, for example contoso.ghe.com/contoso/review-skills.
Keep it current
Section titled “Keep it current”apm marketplace outdatedlists packages whose repositories have newer tags than the marketplace offers.
Run apm pack again to pick them up, then tag a new marketplace release.
apm marketplace audit contoso checks a registered marketplace for packages
whose own dependencies bypass it, for example a direct owner/repo line instead
of name@contoso. Add --strict to fail CI on any finding.
Release the marketplace
Section titled “Release the marketplace”Before you tag, run the release checks. They write nothing:
apm pack --check-versions --check-clean--check-versions exits 3 when local package versions break the versioning
strategy. --check-clean exits 4 when the committed marketplace.json differs
from what apm pack would write now; run apm pack, commit, and tag again.
On GitHub Actions, microsoft/apm-action@v1 with mode: release runs these
checks and creates the release (Release a version).
Related
Section titled “Related”apm marketplace: every subcommand and option.apm pack: marketplace outputs and exit codes.- Manifest schema: every
marketplace:field.
Copyright (c) Microsoft Corporation. General documentation: CC-BY-4.0. Software, code examples and OpenAPM: Apache-2.0. See scope and exclusions.