export#
Generate a starter skill scaffold from an AgentPM tool.
Overview#
agentpm export --skill resolves a tool and writes a scaffolded skill directory with progressive disclosure:
skills/<tool-name>/
SKILL.md
references/
tool-contract.md
examples.md
scripts/
run.shThis is a scaffold, not a polished final skill. It is meant to give you a strong starting point while keeping the packaged AgentPM tool as the execution source of truth.
Command synopsis#
agentpm export --skill <PACKAGE_REF> [--output <PATH>] [--manifest] [--force] [--token <PAT>]Arguments#
--skill <PACKAGE_REF>. Tool spec to export as a starter skill scaffold.--output <PATH>. Override the default output directory.--manifest. Also generate a starterkind: "skill"agent.json.--force. Overwrite an existing output directory.--token <PAT>. Optional PAT for private remote export fallback.
Examples#
Generate the default scaffold#
agentpm export --skill @zack/echo-jsonWrite the scaffold somewhere else#
agentpm export --skill @zack/echo-json --output ./generated-skills/echo-jsonGenerate a publishable starter manifest too#
agentpm export --skill @zack/echo-json --manifest --forceOverwrite an existing scaffold#
agentpm export --skill @zack/echo-json --forceBehavior#
- The command prefers installed tool metadata when the tool is already available locally.
- If the tool is not installed, the command can resolve it from the registry and scaffold from the package artifact without installing it.
- The generated
SKILL.mdstays concise and links out to deeper reference files. references/tool-contract.mdcontains manifest-derived contract details.references/examples.mdcontains generated starter examples.scripts/run.shdelegates execution back toagentpm run.--manifestadds a starteragent.jsonwith:kind: "skill"standard: {"id":"agentpm","version":"1.0.0"}and the version-pinned editor$schema- a local name ending in
-skill(the Tool name is shortened when necessary to stay within 64 characters) - the source tool pinned in top-level
tools skill.entrypoint,skill.references, andskill.scriptspointing at the generated files
- The generated manifest is a starter, not a finished package. Edit the prose, examples, and dependency metadata before publishing.
- The default output path uses only the tool name (
skills/<tool-name>). If you have packages like@zack/echo-jsonand@acme/echo-json, use--outputto avoid collisions. - Remote export fallback does not install the tool, create
.agentpmpackage directories, or mutateagent.lock/ workspace metadata.
Troubleshooting#
- Registry connection failure. Remote fallback reports that the Skill export could not reach the server, rather than presenting an internal install endpoint as the operation. Check the registry address and network, then retry;
RUST_LOG=agentpm=debugenables transport diagnostics. - Tool not found locally. That is fine if the package is available from the registry. The command will fall back to remote resolution when it can.
- Private tool export fails. Re-run with
--token <PAT>or log in first so remote fallback can access the package. - Output directory already exists. Re-run with
--forceif you want to replace the existing scaffold. - Scaffold is too generic. That is expected. Add your own workflow-specific guidance and examples after generation.