-
Notifications
You must be signed in to change notification settings - Fork 1
refactor: trim SKILL.md for token efficiency #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,49 @@ | ||||||
| # Missing Tool Resolution Workflow | ||||||
|
|
||||||
| ## Phase 1: Diagnostic (BEFORE attempting install) | ||||||
|
|
||||||
| 1. **Check if tool exists elsewhere:** | ||||||
| ```bash | ||||||
| which <tool> # Is it installed but not in PATH? | ||||||
| command -v <tool> # Alternative check | ||||||
| type -a <tool> # Show all locations | ||||||
| ``` | ||||||
|
|
||||||
| 2. **Why might it be missing?** | ||||||
| - **PATH issue**: Tool installed but shell can't find it (check `~/.local/bin`, `/usr/local/bin`) | ||||||
| - **Version conflict**: Multiple versions installed, wrong one active | ||||||
| - **Shell state**: Installed in current session but shell hash table stale (`hash -r`) | ||||||
| - **Package manager isolation**: Installed via pip/npm/cargo but not in global PATH | ||||||
|
|
||||||
| 3. **If tool exists but not in PATH:** | ||||||
| ```bash | ||||||
| # Find the binary | ||||||
| find /usr -name "<tool>" 2>/dev/null | ||||||
| find ~/.local -name "<tool>" 2>/dev/null | ||||||
|
|
||||||
| # Add to PATH temporarily | ||||||
| export PATH="$PATH:/path/to/tool/directory" | ||||||
| ``` | ||||||
|
|
||||||
| ## Phase 2: Installation | ||||||
|
|
||||||
| 1. Extract tool name from error | ||||||
| 2. Lookup in `binary_to_tool_map.md` (e.g., `rg` -> `ripgrep`) | ||||||
|
||||||
| 2. Lookup in `binary_to_tool_map.md` (e.g., `rg` -> `ripgrep`) | |
| 2. Lookup in [binary_to_tool_map.md](./binary_to_tool_map.md) (e.g., `rg` -> `ripgrep`) |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,61 @@ | ||||||
| # Troubleshooting | ||||||
|
|
||||||
| ## PATH Issues | ||||||
|
|
||||||
| When a tool installs but still shows "command not found": | ||||||
|
|
||||||
| 1. **Check where it was installed:** | ||||||
| ```bash | ||||||
| # Common install locations | ||||||
| ls -la ~/.local/bin/<tool> | ||||||
| ls -la ~/.cargo/bin/<tool> | ||||||
| ls -la ~/.npm-global/bin/<tool> | ||||||
| ls -la /usr/local/bin/<tool> | ||||||
| ``` | ||||||
|
|
||||||
| 2. **Ensure PATH includes common directories:** | ||||||
| ```bash | ||||||
| # Add to ~/.bashrc or ~/.zshrc | ||||||
| export PATH="$HOME/.local/bin:$HOME/.cargo/bin:$PATH" | ||||||
|
||||||
| export PATH="$HOME/.local/bin:$HOME/.cargo/bin:$PATH" | |
| export PATH="$HOME/.local/bin:$HOME/.cargo/bin:$HOME/.npm-global/bin:$PATH" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Running
find /usr -name "<tool>"can be very slow on many systems and may give a poor troubleshooting experience. Consider narrowing the search to common bin locations (e.g.,/usr/local/bin,/opt,$HOME/.local/bin) and/or adding guidance like-maxdepthand whensudois needed, rather than defaulting to a full/usrscan.