@onmyway133/pica
v1.0.3
Published
CLI to detect and install agents, skills, commands, and rules from any repo
Readme
pica
CLI to detect and install Claude Code agents, skills, commands, hooks, and rules from any GitHub repo or local path.
Named after Pica pica — the magpie, known for collecting shiny things.
npx @onmyway133/pica <repo>
npx @onmyway133/pica uninstall <repo>Usage
# Install — GitHub shorthand
pica onmyway133/cmon
# Install — full URL
pica https://github.com/onmyway133/cmon
# Install — local path
pica ./my-claude-setup
# Uninstall
pica uninstall onmyway133/cmon
pica remove onmyway133/cmonpica clones the repo, scans it, and walks you through an interactive prompt to pick what to install or remove, the scope (local vs global), and the mode (symlink vs copy).
Install
Prompts for:
- Which types to install (Agents, Skills, Commands, Hooks, Rules)
- Which individual items within those types
- Scope — local (
.claude/) or global (~/.claude/) - Mode — symlink or copy
Uninstall
pica uninstall <repo>pica fetches the same repo, detects what it contains, and shows only the items that are actually installed on your machine. Select what to remove and confirm.
For hooks, uninstall surgically removes only the matching entries from settings.json, leaving any other hooks you have configured untouched. Script files in .claude/hooks/ are deleted.
Scope options at uninstall time:
- Local + Global — removes from both
.claude/and~/.claude/(use this if you installed with symlink mode) - Global only — removes only from
~/.claude/
What gets detected
pica looks for five types of Claude Code config in a repo:
| Type | Detected from |
|------|--------------|
| Agent | .claude/agents/*.md |
| Skill | skills/{name}/SKILL.md or .claude/skills/{name}/SKILL.md or root SKILL.md |
| Command | .claude/commands/*.md or commands/*.md |
| Hook | hooks/hooks.json or .claude/hooks/hooks.json |
| Rule | .claude/rules/*.md |
What gets installed
Agent
An agent is a .md file that defines a Claude Code sub-agent with a specific persona and tools.
Installed to:
# local
.claude/agents/my-agent.md
# global
~/.claude/agents/my-agent.mdClaude Code picks up any .md file in agents/ automatically. No further setup needed.
Skill
A skill is a directory containing a SKILL.md file with instructions for Claude.
Installed to:
# local
.claude/skills/my-skill/SKILL.md
# global
~/.claude/skills/my-skill/SKILL.mdThe whole directory is installed (not just the .md), so skills can bundle supporting files alongside their instructions.
Command
A command is a .md file that defines a Claude Code slash command (e.g. /commit, /review).
Installed to:
# local
.claude/commands/my-command.md
# global
~/.claude/commands/my-command.mdOnce installed, the command is available in Claude Code as /my-command.
Hook
A hook repo must have a hooks/hooks.json that declares which Claude Code lifecycle events to intercept, and the scripts that handle them. The format of hooks.json mirrors the hooks block in settings.json:
{
"description": "...",
"hooks": {
"Stop": [
{
"hooks": [
{
"type": "command",
"command": "bash \"${CLAUDE_PLUGIN_ROOT}/hooks/stop-hook.sh\""
}
]
}
]
}
}Installing a hook does two things:
Copies scripts to
.claude/hooks/(and makes.shfiles executable):.claude/hooks/stop-hook.shMerges the hooks config into
.claude/settings.json, replacing${CLAUDE_PLUGIN_ROOT}with the real path:{ "hooks": { "Stop": [ { "hooks": [ { "type": "command", "command": "bash \"/your/project/.claude/hooks/stop-hook.sh\"" } ] } ] } }
Claude Code reads settings.json on startup and runs registered hooks at the matching lifecycle events. If settings.json already has hooks for that event, pica appends rather than overwrites.
Rule
A rule is a .md file placed in .claude/rules/. Claude Code loads all files in this directory as persistent instructions that apply to every session.
Installed to:
# local
.claude/rules/my-rule.md
# global
~/.claude/rules/my-rule.mdSymlink vs Copy
| Mode | What happens |
|------|-------------|
| Symlink | Files are copied to ~/.claude/ (global store), then a symlink is created from .claude/ → ~/.claude/. One source of truth — updating the global copy is reflected everywhere. |
| Copy | Files are copied directly to the chosen scope (local .claude/ or global ~/.claude/). Independent copy, no link. |
Local vs Global scope
| Scope | Base directory | Committed to repo? |
|-------|---------------|-------------------|
| Local | .claude/ in current project | Yes (if you commit it) |
| Global | ~/.claude/ | No — available in all projects |
Repo format
To make your repo work with pica, follow these conventions:
my-repo/
├── .claude/
│ ├── agents/
│ │ └── my-agent.md # sub-agent
│ ├── commands/
│ │ └── my-command.md # slash command
│ ├── rules/
│ │ └── my-rule.md # persistent rule
│ └── skills/
│ └── my-skill/
│ └── SKILL.md # skill
├── hooks/
│ ├── hooks.json # hook manifest
│ └── my-hook.sh # hook script
└── skills/
└── my-skill/
└── SKILL.md # alternative skills locationA repo can contain any combination of these. pica detects whatever is present and lets you choose what to install.
