$npx -y skills add computerlovetech/agr --skill agr-cliInstall, share, sync, and create AI agent skills across coding tools (Claude Code, Cursor, Codex, OpenCode, Copilot, Pi) using the agr CLI. Use whenever the user mentions agr, agr.toml, agr.lock, agrx, or asks to: add a skill ("install the pdf skill", "agr add ..."), sync agent r
| 1 | # agr CLI |
| 2 | |
| 3 | agr is the package manager for AI agent skills. It installs, shares, and syncs |
| 4 | SKILL.md folders across Claude Code, Cursor, Codex, OpenCode, GitHub Copilot, |
| 5 | and Pi. This skill helps you operate the `agr` CLI on the user's |
| 6 | behalf — set up new repos, install and sync skills, manage `agr.toml` / |
| 7 | `agr.lock`, and scaffold in-repo skills under `skills/`. |
| 8 | |
| 9 | ## When to use |
| 10 | |
| 11 | Use this skill when the user wants to: |
| 12 | |
| 13 | - Install or remove a remote skill (`agr add anthropics/skills/pdf`). |
| 14 | - Sync `agr.toml` after pulling teammates' changes (`agr sync`). |
| 15 | - Upgrade an installed skill past its pinned commit (`agr upgrade`). |
| 16 | - Run a skill once without persisting it (`agrx ...`) or invoke an installed one (`agr run`). |
| 17 | - Scaffold a new skill (`agr init my-skill`) — especially as in-repo skills under `skills/`. |
| 18 | - Set up a repo from scratch to use agr (multi-tool config, instruction syncing, sources). |
| 19 | - Add a local in-repo skill to the project's dependency list. |
| 20 | - Inspect, edit, or troubleshoot `agr.toml` / `agr.lock` / `agr config`. |
| 21 | - Or whenever `agr.toml` is present and the user is doing resource-management work. |
| 22 | |
| 23 | Do NOT use this skill for: |
| 24 | |
| 25 | - Authoring the *body* of a SKILL.md. This skill scaffolds and registers; for |
| 26 | writing effective skill instructions, defer to the user or to a dedicated |
| 27 | authoring skill such as `anthropics/skills/skill-creator`. |
| 28 | - Iterating on an existing skill based on session feedback or a retrospective. |
| 29 | That's a separate workflow — listen, propose, edit, commit, re-install. If |
| 30 | the user has a dedicated debrief / improvement skill installed (e.g. |
| 31 | `skill-debrief`), use it; otherwise just do the workflow directly. |
| 32 | |
| 33 | ## Prerequisites |
| 34 | |
| 35 | Before running anything, verify agr is installed: |
| 36 | |
| 37 | ```bash |
| 38 | agr --version |
| 39 | ``` |
| 40 | |
| 41 | If missing, the standard install is `uv tool install agr`. **Do not install agr |
| 42 | without checking with the user first** — they may prefer pipx, brew, or a |
| 43 | pinned version in CI. |
| 44 | |
| 45 | ## Mental model — read first |
| 46 | |
| 47 | - A **skill** is a folder containing a `SKILL.md`. agr copies the whole folder |
| 48 | into each configured AI tool's skills directory (`.claude/skills/`, |
| 49 | `.cursor/skills/`, `.opencode/skills/`, `.agents/skills/`, etc.). |
| 50 | - A **handle** identifies a remote skill: `user/skill` (assumes a repo named |
| 51 | `skills`), `user/repo/skill` (any repo), or `./local/path` (on disk). |
| 52 | - `agr.toml` is the **manifest** (hand-edited or written by `agr add`). |
| 53 | `agr.lock` is the **lockfile** (auto-generated, pins commit SHAs and content |
| 54 | hashes — never edit by hand). |
| 55 | - **Project-local** vs **global** scope: every command takes `-g` to operate on |
| 56 | `~/.agr/agr.toml` and global tool dirs. |
| 57 | - `agr sync` only installs *missing* deps. To move past a pinned commit, use |
| 58 | `agr upgrade`. |
| 59 | - Resource types: **skill** (consumed by AI tools), **ralph** (autonomous |
| 60 | agent loop), **package** (a folder with its own `agr.toml`, expanded |
| 61 | transitively). `agr add` auto-detects the type. |
| 62 | |
| 63 | For the full conceptual model: [references/handles.md](references/handles.md). |
| 64 | |
| 65 | ## Workflows |
| 66 | |
| 67 | ### 1. Set up a new repo for agr |
| 68 | |
| 69 | When the user wants to start using agr in a project that has none configured: |
| 70 | |
| 71 | 1. Run `agr init`. agr auto-detects which AI tools the repo uses |
| 72 | (`.claude/`, `CLAUDE.md`, `.cursor/`, `.cursorrules`, `.codex/`, `.opencode/`, |
| 73 | `.github/copilot-instructions.md`, `.pi/`, `.agents/`) and writes `agr.toml`. |
| 74 | 2. Confirm or adjust the detected tools. For multi-tool: |
| 75 | `agr config set tools claude codex opencode`. |
| 76 | 3. If the user maintains a canonical instruction file (e.g. `CLAUDE.md`) and |
| 77 | wants it mirrored to others (`AGENTS.md`), enable instruction |
| 78 | syncing: `agr config set sync_instructions true` then |
| 79 | `agr config set canonical_instructions CLAUDE.md`. |
| 80 | 4. Commit `agr.toml`. (`agr.lock` will appear after the first `agr add` or |
| 81 | `agr sync` — commit it too.) |
| 82 | |
| 83 | Full details: [references/setup.md](references/setup.md). |
| 84 | |
| 85 | ### 2. Install a skill |
| 86 | |
| 87 | ```bash |
| 88 | agr add anthropics/skills/pdf |
| 89 | ``` |
| 90 | |
| 91 | Notes: |
| 92 | |
| 93 | - Multi: `agr add user/skill1 user/skill2` (skills from the same repo are |
| 94 | batched into one download). |
| 95 | - `--overwrite` / `-o` to replace. |
| 96 | - `-g` for global (available in every project). |
| 97 | - `agr add` auto-creates `agr.toml` if missing — no need to `agr init` first. |
| 98 | |
| 99 | For handle formats and private repos: [references/handles.md](references/handles.md) |
| 100 | and [references/installing-skil |