richfrem/agent-plugins-skills / plugins/agent-extension-authoring/.apm/skills/packaging-with-apm
packaging-with-apm
FlaggedPackages, installs and distributes agent extensions with APM (Agent Package Manager). Use when the user wants to create a new APM package, convert or migrate an existing plugin to APM and check it installs cleanly, compile a package into AGENTS.md, CLAUDE.md or GEMINI.md, install, update, pin or roll back packages globally or per project, or create a plugin marketplace catalog (marketplace.json). Not for authoring a single skill, plugin, sub-agent or rule (use the authoring-* skills).
Packaging with APM (packaging-with-apm)
Packages agent extensions for APM without changing their source layout, installs them with backup and rollback, and publishes marketplace catalogs. Behaviour below was verified with APM 0.33.0.
Contents
- Constraints • Modes • Quick start • Workflow • Verification • References
Constraints
- Never change the source plugin to package it. Staging, manifests and bundles go under
build/; APM does not need anapm.ymlinside the plugin. - Pin APM (
apm-cli==0.33.0, seerequirements-dev.in) and pin every install to#<tag>or#<commit-sha>. - Compiled files are outputs. Never edit a generated
AGENTS.mdorGEMINI.mdwhen.apm/sources exist; change the source and recompile. - No overwrites of an existing package directory without explicit confirmation.
- Never edit deployed files in harness folders; change the source and reinstall.
Modes
Pick the mode from the request, then read its reference before running anything.
| Mode | Use when | Entry point | Reference |
|---|---|---|---|
create | New APM-native package from scratch | scripts/scaffold_apm.py | create-apm-package.md |
convert | Existing plugin to APM, or an install check | scripts/apm_build_pipeline.py | convert-plugin-to-apm.md |
compile | Single-file context hosts (Codex, Gemini, OpenCode) | apm compile | compile-apm-package.md |
install | Install, update, roll back, remove | scripts/apm_consumer.py | install-apm-package.md |
marketplace | Marketplace catalog and Gemini extension | scripts/audit_marketplace_sources.py | manage-marketplace.md |
If the target harness supports native skill directories, prefer install over compile.
Quick start
Install the pinned APM CLI once (APM does not install skill dependencies):
python3 -m pip install -r requirements-dev.txt # run in this skill folder; installs apm-cli==0.33.0
apm --version
python3 scripts/scaffold_apm.py --name <package-name> # create
python3 scripts/apm_build_pipeline.py --plugin plugins/<name> --apm <path> # convert
python3 scripts/apm_consumer.py install --plugins <name> --ref <tag-or-sha> --global # install
Workflow
- Choose the mode and read its reference (the pipeline findings and their standard fixes are in apm-alignment-fixes.md).
- Run the mode's entry point; dry-run first where the script offers it.
- Re-run until the mode's verification passes, then report the generated files or installed targets.
- On any failure follow that mode's section in fallback-tree.md.
materialize_copies.py and convert_symlinks_to_manifest.py stay in scripts/ while any plugin still uses a copy manifest; decouple_agent_paths.py rewrites hardcoded install-folder paths.
Verification
python3 scripts/validate_apm_package.py --path ./<package-name> # create
apm compile --validate # compile
python3 scripts/apm_consumer.py list-backups # install
python3 scripts/audit_marketplace_sources.py . # marketplace
Run the tests with python3 -m pytest tests (set APM_BIN to include the install and pack cases). Check the mode's section in acceptance-criteria.md.
References
- Modes: create • convert • compile • install • marketplace
- Detail: legacy-plugin-conversion-guide.md • apm-alignment-fixes.md • agent-package-manager-overview.md • marketplace.md • marketplace-schema.md • marketplace-architecture.md
- Gates: acceptance-criteria.md • fallback-tree.md
- Example: marketplace.json • Diagram: packaging-with-apm-flow.mmd
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 471k | Updated | Claude CodeCodex | Unverified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |