Skip to content

apm plugin

Terminal window
apm plugin init [PROJECT_NAME] [-y] [--target TARGETS] [--format FORMAT | --claude-plugin] [-v]
# Example
apm plugin init my-skill --yes

apm plugin init scaffolds a publishable plugin in the current directory: a plugin.json manifest plus an apm.yml carrying a devDependencies block. The result is a working tree you can commit, tag, and reference from a marketplace.

The generated dependency block is empty so direct installs select the plugin layout. Adding an APM or MCP dependency makes apm.yml eligible and switches direct installs to the APM package layout.

apm plugin is the noun-verb home for plugin-author workflows, mirroring apm marketplace for marketplace-author verbs. Today it ships a single verb — apm plugin init. Sibling verbs live under the same namespace as they ship.

The two common repo shapes for plugin authors — single-plugin (one plugin per repo) and aggregator (one repo that ships a marketplace plus the plugins it indexes) — are not gated by flags. They emerge from composing apm plugin init and apm marketplace init in the same working tree.

Scaffold a plugin authoring project. Writes plugin.json and an apm.yml with a devDependencies block in the current directory (or under PROJECT_NAME/ if provided). The apm.yml carries a commented license: line: APM does not choose a license for you, and apm pack warns until you set one.

Terminal window
apm plugin init
apm plugin init my-skill --yes
apm plugin init my-skill --target copilot,claude --yes
FlagDescription
PROJECT_NAMEOptional positional. If provided, scaffolds into a new subdirectory of that name; otherwise writes into the current directory. Must be 1-64 lowercase letters, numbers, dots, or hyphens, begin and end with a letter or number, and not contain .. or --. If a filesystem root has no directory name, APM uses my-project.
--yes, -ySkip interactive prompts and use auto-detected defaults.
--targetComma-separated target list (e.g. copilot,claude,codex). Skips the target prompt and writes selections directly.
--claude-pluginScaffold the Claude-compatible layout. This is what apm plugin init writes with zero flags.
--format [plugin|agent-plugin|claude|claude-plugin]agent-plugin scaffolds a portable Agent Plugins v1 manifest instead; plugin, claude, and claude-plugin all select the current Claude-compatible default. Mutually exclusive with --claude-plugin.
--versionPlugin version written to apm.yml and plugin.json (default 1.0.0, or 0.1.0 with --yes).
--authorPlugin author (default: git config user.name).
--descriptionPlugin description (default: auto-detected).
--verbose, -vShow detailed output.

apm init --plugin was removed in 0.37; see Removed flags.

One repo, one plugin. Author publishes a git tag; consumers reference it as owner/repo@version.

Terminal window
mkdir my-skill && cd my-skill
apm plugin init --yes
git init && git add . && git commit -m "init"
git tag v0.1.0

One repo that ships a marketplace and the plugins it indexes side-by-side. Useful when you want one place to govern a small fleet of related plugins.

Terminal window
mkdir agents-hub && cd agents-hub
apm marketplace init
apm plugin init review-bot --yes
apm plugin init lint-bot --yes

The top-level apm.yml carries the marketplace authoring config; each plugin lives in its own subdirectory with its own plugin.json and apm.yml.

  • apm marketplace — author and publish marketplaces that index your plugins.
  • apm pack — build the Claude plugin bundle or the portable Agent Plugins v1 bundle from a scaffolded project.

Copyright (c) Microsoft Corporation. General documentation: CC-BY-4.0. Software, code examples and OpenAPM: Apache-2.0. See scope and exclusions.