Sources
Sources are git repositories containing artifacts. AGPM clones sources locally and discovers available artifacts within them.
Source Formats
AGPM accepts sources in several formats:
GitHub Shorthand
The simplest format for GitHub repositories:
agpm source add anthropics/skills
This expands to https://github.com/anthropics/skills.git.
With Subpath
Specify a subdirectory within the repository:
agpm source add owner/repo#subdirectory
Useful when artifacts are in a specific folder within a larger repository.
Full URL
Use any valid git URL:
# HTTPS
agpm source add https://github.com/owner/repo.git
# SSH
agpm source add git@github.com:owner/repo.git
# GitLab, Bitbucket, etc.
agpm source add https://gitlab.com/owner/repo.git
Source Configuration
In agpm.json, sources are stored with full configuration:
{
"sources": [
{
"name": "anthropics/skills",
"url": "https://github.com/anthropics/skills.git",
"format": "auto",
"subdir": ""
}
]
}
Properties
| Property | Required | Description |
|---|---|---|
name | Yes | Display name and reference identifier |
url | Yes | Git URL for cloning |
format | No | Discovery format (defaults to auto) |
subdir | No | Subdirectory to use as root |
Discovery Formats
The format property controls how AGPM discovers artifacts:
auto- Automatically detect format (default)claude-marketplace- Looks for.claude-plugin/marketplace.jsonclaude-plugin- Looks for.claude-plugin/plugin.jsonsimple- Looks forskills/directory withSKILL.mdfiles
Storage Model
AGPM uses two directories for caching:
~/.agpm/├── repos/github.com/owner/repo/ # Full git repos (for fetching)└── cache/<sha>/ # Immutable snapshots at specific SHAs └── <full repo contents>
- repos/ - Full git repositories, used for fetching and discovering artifacts
- cache/ - Immutable snapshots at specific commits, used for reproducible installs
Managing Sources
# Add a source
agpm source add anthropics/skills
# List all sources
agpm source list
# Discover artifacts in a source
agpm source discover anthropics/skills
# Remove a source
agpm source remove anthropics/skills