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"- 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#
- 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.