Skip to content

netresearch/file-search-skill

File Search Skill

CI Release License OpenSSF Scorecard

An AI agent skill that teaches efficient CLI-based code and file search strategies. Provides tool selection guidance, pattern recipes, and best practices for searching codebases of any size.

Tools Covered

Tool Purpose Replaces
ripgrep (rg) Ultra-fast text/regex search grep, grep -r
ast-grep (sg) Structural/syntax-aware code search complex regex hacks
semgrep (semgrep) Security/lint rules at scale with taint analysis hand-rolled regex CI checks
fd (fd) Fast file finder find
ripgrep-all (rga) Search PDFs, Office docs, archives manual text extraction
tokei Fast code statistics by language cloc, wc -l
scc Code counter with complexity analysis cloc, tokei (when complexity needed)

Key Principles

  • Use rg instead of grep for text search in source code
  • Use fd instead of find for file discovery
  • Use rga instead of rg when searching non-code files (PDFs, Office docs, archives)
  • Use sg instead of regex when matching code structure
  • Use semgrep when you want a catalog of security/lint rules (taint, registry) — not just a single pattern
  • Use tokei or scc to assess codebase size, not cloc or wc -l
  • Always start with targeted, narrow searches and widen only if needed
  • Always specify file types/languages to limit search scope
  • Count matches before viewing full results to avoid overwhelming output

Installation

Marketplace (Recommended)

Add the Netresearch marketplace once, then browse and install skills:

# Claude Code
/plugin marketplace add netresearch/claude-code-marketplace

npx (skills.sh)

Install with any Agent Skills-compatible agent:

npx skills add https://github.com/netresearch/file-search-skill --skill file-search

Download Release

Download the latest release and extract to your agent's skills directory.

Git Clone

git clone https://github.com/netresearch/file-search-skill.git

Composer (PHP Projects)

composer require netresearch/file-search-skill

Requires netresearch/composer-agent-skill-plugin.

npm (Node Projects)

npm install --save-dev \
  @netresearch/agent-skill-coordinator \
  github:netresearch/file-search-skill

Requires @netresearch/agent-skill-coordinator, which discovers the skill in node_modules and registers it in AGENTS.md via a postinstall hook. For pnpm, also allowlist the coordinator's postinstall:

{
  "pnpm": {
    "onlyBuiltDependencies": ["@netresearch/agent-skill-coordinator"]
  }
}

Skill Structure

skills/file-search/
  SKILL.md                          # Main skill file (tool selection, usage, best practices)
  evals/
    evals.json                      # Evaluation definitions for testing skill effectiveness
  references/
    ripgrep-patterns.md             # Extensive rg pattern recipes by use case
    ast-grep-patterns.md            # Structural search patterns by language
    semgrep-patterns.md             # Security/lint rules, taint mode, registry
    fd-guide.md                     # fd file finder guide
    rga-guide.md                    # ripgrep-all for non-code files
    tool-comparison.md              # Detailed comparison and decision guide
    search-strategies.md            # Search targeting strategies
    code-metrics.md                 # tokei/scc code statistics guide
    remote-handoff.md               # When to hand off to remote tools

License

This project uses split licensing:

  • Code (scripts, workflows, configs): MIT
  • Content (skill definitions, documentation, references): CC-BY-SA-4.0

See the individual license files for full terms.

About

Claude Code skill: Fast code and file search using ripgrep, ast-grep, fd, rga, tokei

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages