repository-cli-efficiencylisted
Install: claude install-skill dougcunha/TokenHound
# Efficient repository inspection
## When to use
Use this skill before recursive searches, `rg`, `Select-String`, `git grep`, `git diff`, `gh api`, or inspections of many files.
## Procedure
1. Restrict the search to the relevant directory or project.
2. Prefer `rg` to `Get-ChildItem -Recurse | Select-String`:
```powershell
rtk rg -n -g '*.cs' -g '!**/bin/**' -g '!**/obj/**' 'pattern' <directory>
```
3. Combine related patterns in one pass:
```powershell
rtk git --no-pager grep -n -I -E "ServidorCis|PortaDConnect|Historico|Observacao" -- "*.cs"
```
4. If only file names are needed, use `-l`. If few results are needed, limit output without rereading the entire repository.
5. For diffs, start with `rtk git diff --stat`, `--name-status`, and `--check`. Read the complete diff only for relevant files or sections.
6. Use `view_range` for known files. Do not format and print an entire file line by line when a range is sufficient.
7. Do not reread a large temporary file with a full PowerShell pipeline. Use `rg` with error patterns and result limits.
8. For `gh api`, prefer a known path, code search, or local data. `--jq` reduces output delivered to the agent, but a recursive endpoint still downloads and processes the entire tree.
9. Use `rtk proxy` only when complete output is genuinely necessary for diagnosis.
## Rules
- Always prefix shell commands with `rtk`, as required by the global instructions.
- Exclude at least `bin`, `obj`, `.git`, `packages`, an