xiaohongshu
xiaohongshu
file-search
Search for files and content in a codebase. Use when investigating a codebase, finding patterns, or locating specific files. Not for reading file content or simple directory listing.
Full skill instructions
Modern file search using fd, ripgrep (rg), and fzf for large codebases. Hierarchy: ripgrep (90% content search), fd (8% file discovery), fzf (2% interactive selection).
ripgrep (Primary - 90% of tasks)
fd (Secondary - 8% of tasks)
fzf (Tertiary - 2% of tasks)
Decision flow: ripgrep first → add fd if needed → fzf only when interaction is essential.
rg "TODO" # Simple search
rg -i "error" # Case-insensitive
rg -F "exact phrase" # Literal string (faster, no regex)
By file type:
rg -t py "import" # Python files only
rg -t js -t ts "async" # JS and TS
rg -t md "ripgrep" # Markdown files
Context control:
rg -C 3 "function" # 3 lines before/after
rg -B 5 "class" # 5 lines before
rg -A 2 "return" # 2 lines after
Output modes:
rg -l "TODO" # File names only
rg -c "TODO" # Count per file
rg -n "pattern" # Line numbers
rg --json "pattern" # Structured output (for AI parsing)
Find by name:
fd config # Files containing "config"
fd -e py # Python files
fd "test.*\.js$" # Regex pattern
By type:
fd -t f config # Files only
fd -t d src # Directories only
fd -t l # Symlinks only
Time-based filters:
fd --changed-within 1d # Modified in last day
fd --changed-before 2024-01-01 # Modified before date
fd --size +10M # Files larger than 10MB
fd | fzf # Find and select
fd | fzf --preview 'bat --color=always {}'
rg -l "pattern" | fzf --preview 'rg -C 3 "pattern" {}'
fd -e py -x rg "async def" {} # Search Python files for async def
fd -t f -x rg -l "TODO" {} # Find files with TODO
rg -l "pattern" | fzf --preview 'rg -C 3 "pattern" {}' | xargs vim
# Smart scoping (respects .gitignore automatically)
rg "pattern" --follow --hidden -g '!{.git,node_modules,dist}/**/*'
# Parallel processing
find . -type f -name "*.py" | xargs -P 8 rg "pattern"
# Find large files first
fd -t f -x du -h {} | sort -hr | head -20
# Extract specific line ranges
rg -n "pattern" | head -50 # First 50 matches
rg --json "pattern" # JSON output for structured parsing
| Task | Command |
|---|---|
| Content search | rg -C 3 "pattern" |
| Find files with pattern | rg -l "pattern" |
| Search by file type | rg -t py "pattern" |
| Case-insensitive | rg -i "pattern" |
| Files by extension | fd -e py |
| Recent files | fd --changed-within 1d |
| Interactive selection | fd | fzf |
| JSON output | rg --json "pattern" |
| Large codebase | rg "pattern" --follow -g '!{node_modules,.git}/**/*' |
| Use Case | ripgrep | fd | grep | find |
|---|---|---|---|---|
| Content search | 10-100x faster | N/A | Baseline | N/A |
| File by extension | 5-20x faster | Fastest | 1x | 1x |
| .gitignore respect | Automatic | Automatic | No | No |
| Multi-threading | Yes | No | No | No |
| SIMD optimized | Yes (NEON) | Yes | No | No |
Recognition: "Need maximum performance on large codebases?" → Use ripgrep with proper flags.
When simple search is insufficient (unknown terminology, too many/too few results), use iterative-retrieval:
# Basic search (this skill)
rg "authentication"
# Iterative retrieval with progressive refinement
/search "authentication patterns"
iterative-retrieval provides:
When to use:
For simple searches: Use this skill (file-search) directly. For complex searches: Use iterative-retrieval (uses file-search as initial dispatch).
<critical_constraint> MANDATORY: Use ripgrep for content search (90% of tasks) MANDATORY: Use fd for file discovery (8% of tasks) MANDATORY: Use fzf only for interactive selection (2% of tasks) MANDATORY: Prefer resource/accessibility IDs over XPath for element discovery No exceptions. Correct tool selection prevents wasted effort. </critical_constraint>
This component carries essential Seed System principles for context: fork isolation:
<critical_constraint> MANDATORY: All components MUST be self-contained (zero .claude/rules dependency) MANDATORY: Achieve 80-95% autonomy (0-5 AskUserQuestion rounds per session) MANDATORY: Description MUST use What-When-Not format in third person MANDATORY: No component references another component by name in description MANDATORY: Progressive disclosure - references/ for detailed content MANDATORY: Use XML for control (mission_control, critical_constraint), Markdown for data No exceptions. Portability invariant must be maintained. </critical_constraint>
Delta Standard: Good Component = Expert Knowledge − What Claude Already Knows
Recognition Questions:
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience