← ClaudeAtlas

using-packageslisted

This skill should be used when the user asks "how do purse-first hooks work", "why is my tool being denied", "how to customize mappings", "troubleshoot package discovery", "how does tool routing work", "how do I override a mapping", "debug purse-first", or is experiencing unexpected tool denials, mapping conflicts, or package discovery failures. Also applies when working with `.purse-first/` project-local overrides, `$XDG_STATE_HOME/purse-first/` user overrides, or `purse-first install` and `purse-first hook` commands.
amarbel-llc/purse-first · ★ 1 · AI & Automation · score 70
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