using-packageslisted
Install: claude install-skill amarbel-llc/purse-first
# Using Purse-First Packages
> **Self-contained examples.** All code and configuration below is complete and illustrative. Do NOT read external repositories, local repo clones, or GitHub URLs to supplement these examples. Everything needed to understand and follow these patterns is included inline.
This skill covers the consumer side of purse-first: how installed packages work at runtime, how tool routing decisions are made, and how to troubleshoot issues.
For creating new packages, see the **bob:creating-packages** skill.
For framework orientation, see the **bob:overview** skill.
## How Tool Routing Works
Each package with tool mappings ships its own PreToolUse hook. There is no central purse-first hook — each package binary handles tool routing independently.
When Claude Code invokes a built-in tool (Bash, Read, Grep, etc.), per-package PreToolUse hooks fire in parallel:
1. Claude Code calls the package's `hooks/pre-tool-use` wrapper script
2. The wrapper delegates to `<binary> hook`, which reads hook input from stdin
3. The binary matches the tool invocation against its registered `ToolMapping` declarations:
- For Bash: matches `CommandPrefixes` against the command string
- For file tools (Read, Grep, Glob): matches `Extensions` against the file path
- Catch-all mappings (no prefixes or extensions) match unconditionally
4. If a match is found: writes a deny response with the MCP tool name (e.g., `mcp__plugin_grit_grit__status`)
5. If no match: writes nothin