Agent skill

finding-files

Performs fast file discovery with parallel search and smart defaults. Use this skill when searching for files by name, pattern, or type, especially when performance matters or when working with large directories

Stars 8
Forks 0

Install this agent skill to your Project

npx add-skill https://github.com/iota9star/my-skills/tree/main/skills/fd

SKILL.md

fd: Intuitive File Search

Always invoke fd skill for fast file discovery - do not execute bash commands directly.

Use fd for fast file discovery that's 13-23x faster than find.

Default Strategy

Invoke fd skill for fast file discovery with parallel search and smart defaults. Use when searching for files by name, pattern, or type, especially when performance matters or when working with large directories.

Common workflow: fd skill → other skills (fzf, bat, ripgrep, sd) for further processing.

Key Options

  • -e ext for extension filtering
  • -t file|dir for type filtering
  • -H include hidden files
  • -I ignore .gitignore
  • --exclude pattern exclusions
  • -x exec per file, -X exec batch
  • {}, {.}, {/} placeholders

When to Use

  • Quick file searches by pattern
  • Filter by type, size, extension
  • Search with depth limits
  • Batch file operations
  • Integration with other tools

Common Workflows

  • fd → fzf → bat: Search files, select interactively, view with syntax highlighting
  • fd → sd: Find files and perform batch replacements
  • fd → xargs tool: Execute commands on found files
  • fd → ripgrep: Search within specific file types

Core Principle

Smart defaults: ignores hidden/.gitignore files, case-insensitive, parallel search - much faster than find.

Detailed Reference

For comprehensive search patterns, filtering options, execution examples, and performance tips, load fd guide when needing:

  • Advanced filtering patterns (size, time, depth)
  • Batch execution with placeholders
  • Performance optimization techniques
  • Integration with shell scripts
  • Complex exclusion patterns

The guide includes:

  • Core search patterns and file discovery
  • Extension and type filtering techniques
  • Execution and batch operation examples
  • Performance optimization strategies
  • Integration with other tools (xargs, ripgrep)
  • Advanced filtering and exclusion patterns

Skill Combinations

For Discovery Phase

  • fd → fzf: Interactive file selection with preview
  • fd → ripgrep: Search within specific file types
  • fd → jq/yq: Extract data from found config files
  • fd → extracting-code-structure: Get structure overview of found files

For Analysis Phase

  • fd → bat: View found files with syntax highlighting
  • fd → tokei: Get statistics for specific file sets
  • fd → jq/yq: Analyze configuration files in directory

For Refactoring Phase

  • fd → sd: Perform batch replacements across found files
  • fd → analyzing-code-structure: Apply structural changes to specific file types
  • fd → xargs: Execute commands on found files

Integration Examples

bash
# Find and edit source files
fd -e py | fzf --multi --preview="bat --color=always {}" | xargs vim

# Find and replace in JavaScript files
fd -e js -x sd "oldPattern" "newPattern"

Expand your agent's capabilities with these related and highly-rated skills.

iota9star/my-skills

analyzing-code

Analyzes code statistics by language for project insight, CI/CD metrics, or before refactoring. Use this skill when understanding project composition, measuring change impact, or generating CI/CD metrics

8 0
Explore
iota9star/my-skills

querying-json

Extracts specific fields from JSON files efficiently using jq instead of reading entire files, saving 80-95% context. Use this skill when querying JSON files, filtering/transforming data, or getting specific field(s) from large JSON files

8 0
Explore
iota9star/my-skills

extracting-code-structure

Extracts file structure (functions, classes, exports) efficiently without reading entire files, using ast-grep, Dart/Flutter analyzer, ctags, or other language-specific tools to get outlines and signatures. Use this skill when listing all methods, functions, or classes in a file, exploring unfamiliar code, getting API overviews, or deciding what to read selectively

8 0
Explore
iota9star/my-skills

querying-yaml

Extracts specific fields from YAML files efficiently using yq instead of reading entire files, saving 80-95% context. Use this skill when querying YAML files, filtering/transforming configuration data, or getting specific field(s) from large YAML files like docker-compose.yml or GitHub Actions workflows

8 0
Explore
iota9star/my-skills

replacing-text

Provides intuitive find & replace CLI with JavaScript regex and string-literal mode. Use this skill when performing text replacements, batch transformations, or need JavaScript-style regex syntax

8 0
Explore
iota9star/my-skills

analyzing-code-structure

Performs structural code search and refactoring by matching code structure instead of exact text. Use when editing code structure with text matching ambiguity, handling "old_string not unique" problems, or performing formatting-independent pattern matching across function signatures, method calls, and class structures

8 0
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results