Git integrations
capa fetches remote capabilities from Git hosts: skills, plugins, rules, hooks, and agent instruction snippets. Public repos need no auth. Private repos use capa auth or the Web UI Integrations flow; tokens live in ~/.capa/capa.db.
Repo string grammar
Section titled “Repo string grammar”The same @ / :: grammar applies on both GitHub and GitLab (and in capabilities.yaml def.repo fields):
| Form | Meaning |
|---|---|
owner/repo@name | Recursive search for a basename (skill dir with SKILL.md, or a file basename for rules/snippets). No slashes on the right-hand side. |
owner/repo::path/inside/repo | Exact path from the repo root. No search. |
Pinning (both forms):
:tag-or-branch— e.g.@skill:v1.2.0,::rules/git.md:main#sha— commit SHA, e.g.@skill#abc1234
Resolved commits are recorded in capabilities.lock.
GitHub
Section titled “GitHub”GitHub is the default host. No prefix required.
# Search by skill folder namecapa add vercel-labs/agent-skills@web-researcher
# Exact pathcapa add my-org/skills::skills/team-a/web-researcher
# Pin tag or SHAcapa add vercel-labs/agent-skills@web-researcher:v1.2.0capa add vercel-labs/agent-skills@web-researcher#abc1234
# Tree URL (capa parses branch/tag/SHA)capa add https://github.com/vercel-labs/agent-skills/tree/v1.2.0/skills/web-researcher
# Plugincapa add --plugin slackapi/slack-mcp-plugincapa add --plugin anthropics/claude-plugins-official::plugins/frontend-designskills: - id: web-researcher type: github def: repo: vercel-labs/agent-skills@web-researcher description: Web research skill requires: - '@brave.search'
plugins: - id: frontend-design type: github def: repo: anthropics/claude-plugins-official::plugins/frontend-designPrivate GitHub
Section titled “Private GitHub”capa auth github.comor Web UI → Integrations → Connect GitHubcapa add my-org/private-skills@team-helpercapa install
Public repos need no token.
GitLab
Section titled “GitLab”Prefix CLI sources with gitlab:. Nested groups are supported (any number of path segments before the project).
# Searchcapa add gitlab:mygroup/myrepo@web-researcher
# Nested groupscapa add gitlab:mygroup/subgroup/skills@data-analyst
# Exact pathcapa add gitlab:mygroup/skills::skills/team/web-researcher
# Pincapa add gitlab:mygroup/myrepo@web-researcher:v1.2.0
# Tree URLcapa add https://gitlab.com/mygroup/myrepo/-/tree/main/skills/web-researcher
# Plugincapa add --plugin gitlab:acme/platform/team/services/devops-skills:v1.0.1skills: - id: custom-skill type: gitlab def: repo: mygroup/subgroup/myrepo@skill-name description: Skill from GitLab requires: - '@server1.tool1'In YAML, type: gitlab uses def.repo without the gitlab: CLI prefix (group/project@name).
Self-hosted GitLab
Section titled “Self-hosted GitLab”Prefer a full HTTPS URL when the host is not gitlab.com:
capa add https://gitlab.mycompany.com/mygroup/myrepo.gitOr a raw/remote skill URL with type: remote in the capabilities file when you only need a single SKILL.md.
Private GitLab
Section titled “Private GitLab”capa auth gitlab.comor Web UI → Integrations → Connect GitLabcapa add gitlab:my-org/private-skills@team-helpercapa install
Optional PAT alternative:
export GITLAB_TOKEN=glpat-yourtokencapa add gitlab:mygroup/private-skills@my-skillWhat can come from Git
Section titled “What can come from Git”| Resource | Typical def.repo / CLI |
|---|---|
| Skills | capa add owner/repo@skill |
| Plugins | capa add --plugin owner/repo |
| Rules | Usually owner/repo::path/to/rule.md |
| Agent instructions | Snippets via github / gitlab / local |
| Registries | Adapter sources from git or HTTPS |
Auth commands
Section titled “Auth commands”capa auth # default Git providercapa auth github.comcapa auth gitlab.comSee Credentials and CLI: auth.