agentleFS
dougcunhadougcunha/TokenHound/.agents/skills/repository-cli-efficiency/SKILL.md

repository-cli-efficiency

Skill3 starsChanged 35 days agoMITView on GitHub

Perform repository searches, grep, diff, and inspections with controlled scope and low verbosity. Mandatory when using rg, Select-String, git grep, git diff, gh api, recursive searches, or reviewing many files.

The file

We split this skill into the rules it gives an agent

10 rules. About 0 are common, 2 are distinctive, and 8 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 8

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use this skill before recursive searches, rg, Select-String, git grep, git diff, gh api, or inspections of many files.

    line 12
  2. Very specific:

    Prefer rg to Get-ChildItem -Recurse | Select-String:

    line 17
  3. Very specific:

    If only file names are needed, use -l.

    line 29
  4. Very specific:

    Use view_range for known files.

    line 31
  5. Very specific:

    Do not reread a large temporary file with a full PowerShell pipeline.

    line 32
  6. Very specific:

    Use rtk proxy only when complete output is genuinely necessary for diagnosis.

    line 34
  7. Very specific:

    Always prefix shell commands with rtk, as required by the global instructions.

    line 38
  8. Distinctive:

    Do not run multiple serial repository-wide searches for patterns that can be combined.

    line 40
  9. Very specific:

    Do not use Select-Object -Last N as a substitute for a scoped or appropriately quiet command.

    line 41
  10. Distinctive:

    Do not hide errors; reduce noise without discarding necessary context.

    line 42

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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:

    rtk rg -n -g '*.cs' -g '!**/bin/**' -g '!**/obj/**' 'pattern' <directory>
  3. Combine related patterns in one pass:

    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, and generated artifacts when the search does not need them.
  • Do not run multiple serial repository-wide searches for patterns that can be combined.
  • Do not use Select-Object -Last N as a substitute for a scoped or appropriately quiet command.
  • Do not hide errors; reduce noise without discarding necessary context.

Completion criteria

  • The search traversed only the necessary scope.
  • Related patterns were combined when possible.
  • The first diff inspection was statistical and concise.
  • Complete output was loaded only for relevant files or failures.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.