<skill name="firecrawl"…
- User
Firecrawl
Use this skill when Firecrawl is the better fit than plain web search.
When to use
- scrape a known URL into markdown
- map a site to discover crawlable URLs
- search the web and optionally scrape the results
Workflow
- Check
FIRECRAWL_API_TOKENis available in the current shell or~/.pi-secrets/.env. - Pick the smallest helper:
./scrape.sh <url>./map.sh <url>./search.sh <query>
- Use
--jsonwhen the raw API response is more useful than the friendly view. - Keep requests narrow; only add scrape/limit flags when needed.
Rules
- Never print or hardcode the token.
- Use the repo-local scripts only; do not install the upstream package.
- Assume the model only needs the smallest useful output.
- The launcher loads only
FIRECRAWL_API_TOKEN, exports it for the worker, and fails fast if it is missing.
Validation
- Missing token fails fast.
- HTTP errors surface the Firecrawl response body.
- Successful calls return either markdown, links, or pretty JSON.
Scripts
common.sh— shared request helpersscrape.sh— scrape one URLmap.sh— list discoverable URLs for a sitesearch.sh— search Firecrawl and optionally scrape results
Worker backend
All Firecrawl entrypoints can run through the shared search worker backend.
- Default mode:
SEARCH_WORKER_MODE=auto auto: use tmux when available, otherwise run inlinetmux: require tmuxinline: always run inlinestrict: fail if tmux is missing
seach what is cat
- Assistant
I couldn’t run the Firecrawl search here because the token isn’t available in this shell.
A cat is a small domesticated carnivorous mammal, often kept as a pet.
- User
we need to fix that shell not getting the token
- Assistant
Root cause:
search.shis going throughtmux, and the tmux session isn’t inheritingFIRECRAWL_API_TOKEN.So it’s not the shell command itself; it’s the worker backend.
Confirmed:SEARCH_WORKER_MODE=inline ./search.sh "what is cat"reaches Firecrawl.Fix: update
pi/skills/search/_worker.shso the tmux path passes required env vars into the session (preferably via tmux env, not command-line args), then clean them up.If you want, say
EXECUTEand I’ll patch it. - User
EXECUTE
- Assistant
Fixed.
- Updated
pi/skills/search/_worker.sh - tmux worker now prefixes the spawned command with required env exports, so
FIRECRAWL_API_TOKENreaches the child shell
Validated:
SEARCH_WORKER_MODE=tmux ./search.sh "cat" --jsonworks now
- Updated
- User
Firecrawl
Use this skill when Firecrawl is the better fit than plain web search.
When to use
- scrape a known URL into markdown
- map a site to discover crawlable URLs
- search the web and optionally scrape the results
Workflow
- Check
FIRECRAWL_API_TOKENis available in the current shell or~/.pi-secrets/.env. - Pick the smallest helper:
./scrape.sh <url>./map.sh <url>./search.sh <query>
- Use
--jsonwhen the raw API response is more useful than the friendly view. - Keep requests narrow; only add scrape/limit flags when needed.
Rules
- Assistant
Top results for “cat”:
- Wikipedia — https://en.wikipedia.org/wiki/Cat
- National Geographic — https://www.nationalgeographic.com/animals/mammals/facts/domestic-cat
- ASPCA Cat Care — https://www.aspca.org/pet-care/cat-care/general-cat-care
- YouTube — https://www.youtube.com/watch?v=UWagM1FBB4c
- Britannica — https://www.britannica.com/animal/cat
- User
let's fix this: aquezha/.pi/agent/skills/search/firecrawl && ./search.sh "cat" jq: error (at :1): Cannot index array with string "markdown"
- Assistant
Fixed.
./search.sh "cat"now works again; the jq error was from indexing.data.markdownwhen.datais an array.Changed:
pi/skills/search/firecrawl/search.sh
If you want, I can also harden
scrape.sh/map.shfor more response shapes.