add
Add an artifact to your project from a source repository.
Usage
agpm add <source> [artifact[@version]]
Arguments
| Argument | Description |
|---|---|
source | Repository containing the artifact (e.g., anthropics/skills) |
artifact | Name of specific artifact to add, optionally with version |
Source Formats
The <source> argument accepts multiple formats:
owner/repo- GitHub shorthandowner/repo#subpath- With subpath for monoreposhttps://github.com/owner/repo- Full URL
Version Pinning
Artifacts can be pinned to specific versions using @ref syntax:
agpm add anthropics/skills pdf@v1.0.0 # Pin to tag
agpm add anthropics/skills pdf@main # Pin to branch
agpm add anthropics/skills pdf@abc123 # Pin to SHA
Without a version, artifacts track HEAD and update to the latest commit when you run agpm update.
Examples
Add a specific skill from a repository:
agpm add anthropics/skills pdf
Add with a version pin:
agpm add anthropics/skills pdf@v1.0.0
Add from a repository with a subpath:
agpm add owner/repo#packages/skills my-skill
What Happens
- Clones the repository to
~/.agpm/repos/(if not cached) - Discovers available artifacts in the repository
- Adds the specified artifact to your
agpm.json
After adding, run agpm install to install the artifact to your target directories.