Recursive find (rfind)
Use when the question is "where on this site / in these docs / among these
listings does X appear?" One rfind call replaces dozens of web_fetch calls
and returns only hit pages with short snippets, not page bodies. Headless port
of the Recursive Find Chrome extension (github.com/grtwrn/recursive-find).
Skip it for: reading one known page (web_fetch), JavaScript-rendered sites or
logged-in pages (browser), or general web questions (web_search).
Run
rfind <url> "<query>" [--depth 1] [--within /docs/] [--max-pages 100] [--mode text|word|regex] [--case] [--main] [--first] [--json]
(rfind is scripts/rfind.mjs in this skill, symlinked onto PATH; Node 18+, no dependencies. rfind --help lists every flag.)
- Start from the most specific page you know (a docs index, a category page), not a site's home page. Big home pages link to hundreds of pages and burn the page budget before reaching the right section.
- Narrow with
--within <path-prefix>whenever the content lives under one path (e.g.--within /docs/). Keep the default--depth 1; use--depth 2only with--withinor a small site. - Use
--mode wordfor short words (catwon't matchcategory),--mode regexfor patterns,--firstwhen one hit answers the question. - Add
--mainwhen the question is which pages discuss X: it searches only the main content (<main>,role="main",<article>), so "Next topic" links, sidebars and menus that merely name X don't count as hits. - Read the summary line: if it says
hit --max-pages, results are incomplete. Narrow (--within, a deeper start URL) before raising--max-pages(max 1000). It also flags pages over 32 MB that were only partly searched. Skipped non-HTML links are normal, not failures. - Matches show as
[[match]]inside snippets. Cite the page URL;web_fetchit if you need more than the snippet.
Behavior
- Same site only by default (
--any-siteto leave it); honors robots.txt (--ignore-robotsonly when the user asks); 4 parallel fetches; 10 s per page; the whole crawl stops after 120 s (--max-seconds), flagged in the summary. - Text comes from server HTML only (no JS), no cookies/login. Skips PDFs, images and other non-HTML links.
- Exit 0 = crawl ran (even with 0 hits); 1 = start page failed; 2 = bad arguments.
- Downloads
- Security audit
- Review
- Last updated
- 1mo ago
- Current version
- v1.0.0
- License
- MIT-0
