# Fs Grep

> Search text files under scenarios/<world_name>/fs and return match snippets.

- Skill: `bdambrosio/fs-grep` (Agent Skill, multi-file: 3 files)
- Install (CLI): `npx skillmds@latest add bdambrosio/fs-grep`
- Raw SKILL.md: https://api.skillmd.com/api/skills/bdambrosio/fs-grep/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: bdambrosio (https://skillmd.com/u/bdambrosio)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/bdambrosio/fs-grep

---


# fs-grep

Search text files for a regex pattern and return match snippets as Notes.

## Input

- `path`: Relative path under `scenarios/<world_name>/fs` (default: root)
- `pattern`: Regex pattern to search for (required)
- `recursive`: Recurse into subdirectories (default: true)
- `max_matches`: Max matches to return (default: 20)
- `context`: Context lines before/after each match (default: 0)
- `case_insensitive`: Case-insensitive regex (default: false)

## Output

Success returns:
- `resource_id`: Collection ID of match Notes
- Match Notes are text with:
  - metadata Note linked by meta Relation (path/line/pattern/context and file metadata)
  - body text snippet for the match

## Examples

```json
{"type":"fs-grep","path":"src","pattern":"TODO","recursive":true,"out":"$todos"}
{"type":"fs-grep","pattern":"error","context":2,"out":"$errors"}
```

