use-tinyfish
The complete web toolkit for your agent. Search the web and get answers in milliseconds. Fetch any URL and get clean markdown back. Send a browser agent to navigate sites, fill forms, and extract structured data. Spin up a headless browser for full programmatic control. Use when you need to search the web, extract/scrape data from websites, handle bot-protected sites, or automate browser tasks using natural language.
What this skill does
# TinyFish CLI
The complete web toolkit — four tools, one CLI. Start with the lightest tool that can do the job and escalate only when needed.
## Pre-flight Check (REQUIRED)
Before making any TinyFish call, always run BOTH checks:
**1. CLI installed?**
```bash
which tinyfish && tinyfish --version || echo "TINYFISH_CLI_NOT_INSTALLED"
```
If not installed, stop and tell the user:
> Install the TinyFish CLI: `npm install -g @tiny-fish/cli`
**2. Authenticated?**
```bash
tinyfish auth status
```
If not authenticated, stop and tell the user:
> You need a TinyFish API key. Get one at: https://agent.tinyfish.ai/api-keys
>
> Then authenticate:
> ```
> tinyfish auth login
> ```
Do NOT proceed until both checks pass.
---
## Picking the Right Tool
```
search → fetch → agent → browser
lightest heaviest
```
| Tool | When to use | Speed | Cost |
|------|-------------|-------|------|
| **search** | You need to find URLs or get a quick answer about a topic | Fastest | Lowest |
| **fetch** | You have URLs and need their clean content (articles, docs, product pages) | Fast | Low |
| **agent** | You need to interact with a page — click, fill forms, navigate, extract structured data from dynamic sites | Slower | Higher |
| **browser** | Agent isn't enough — you need raw programmatic browser control via CDP | Slowest | Highest |
### Common Patterns
**Research: search → fetch**
Search for a topic, then fetch the best results to read their full content.
```bash
# 1. Find URLs
tinyfish search query "best React state management libraries 2026"
# 2. Read the top results
tinyfish fetch content get --format markdown "https://result1.com" "https://result2.com"
```
**Deep extraction: search → agent**
Search to find the right site, then use agent to interact with it and extract structured data.
```bash
# 1. Find the site
tinyfish search query "Nike running shoes official store"
# 2. Automate extraction on it
tinyfish agent run --url "https://nike.com/running" \
"Extract all running shoes as JSON: [{\"name\": str, \"price\": str, \"colors\": [str]}]"
```
**Escalation: fetch → agent**
Try fetch first. If the page is dynamic/JS-heavy and fetch returns empty or incomplete content, escalate to agent.
**Full control: agent → browser**
If agent can't handle a complex multi-step workflow, spin up a raw browser session and automate it yourself via CDP.
---
## Commands
### `tinyfish search query`
Web search. Returns ranked results with titles, URLs, and snippets.
```bash
tinyfish search query "<query>" [--location <hint>] [--language <hint>] [--pretty]
```
- Returns 10 results by default
- Use `--location` and `--language` for geo-targeted results
- Default output is JSON; `--pretty` for human-readable
```bash
tinyfish search query "best pho in Ho Chi Minh City" --location "Vietnam" --language "en"
```
---
### `tinyfish fetch content get`
Fetch clean, extracted content from one or more URLs. Strips ads, nav, boilerplate — returns just the content.
```bash
tinyfish fetch content get <urls...> [--format markdown|html|json] [--links] [--image-links] [--pretty]
```
- Accepts **multiple URLs** in a single call — they are fetched in parallel server-side
- `--format markdown` (default) — clean readable text
- `--format json` — structured document tree
- `--links` — include all extracted links from the page
- `--image-links` — include extracted image URLs
- Response includes: `url`, `final_url`, `title`, `language`, `author`, `published_date`, `text`, `latency_ms`
```bash
# Fetch one page as markdown
tinyfish fetch content get --format markdown "https://example.com/article"
# Fetch multiple pages with links
tinyfish fetch content get --links "https://site-a.com" "https://site-b.com" "https://site-c.com"
```
---
### `tinyfish agent run`
Run a browser automation using a natural language goal. The agent opens a real browser, navigates, clicks, fills forms, and extracts data.
```bash
tinyfish agent run --url <url> "<goal>" [--sync] [--async] [--pretty]
```
| Flag | Purpose |
|------|---------|
| `--url <url>` | Target URL (bare hostnames get `https://` auto-prepended) |
| `--sync` | Wait for full result without streaming steps |
| `--async` | Submit and return immediately |
| `--pretty` | Human-readable output |
**Output:** Default streams `data: {...}` SSE lines. The final result is the event where `type == "COMPLETE"` and `status == "COMPLETED"` — the extracted data is in the `resultJson` field. Read the raw output directly; no script-side parsing is needed.
**Always specify the JSON structure you want in the goal:**
```bash
tinyfish agent run --url "https://example.com/products" \
"Extract all products as JSON array: [{\"name\": str, \"price\": str, \"url\": str}]"
tinyfish agent run --url "https://example.com/search" \
"Search for 'wireless headphones', filter under $50, extract top 5 as JSON: [{\"name\": str, \"price\": str, \"rating\": str}]"
```
**Parallel extraction — when hitting multiple independent sites, make separate calls. Do NOT combine into one goal.**
Good — parallel calls (run simultaneously):
```bash
tinyfish agent run --url "https://pizzahut.com" \
"Extract pizza prices as JSON: [{\"name\": str, \"price\": str}]"
tinyfish agent run --url "https://dominos.com" \
"Extract pizza prices as JSON: [{\"name\": str, \"price\": str}]"
```
Bad — single combined call:
```bash
# Don't do this — less reliable and slower
tinyfish agent run --url "https://pizzahut.com" \
"Extract prices from Pizza Hut and also go to Dominos..."
```
**Managing runs:**
```bash
tinyfish agent run list [--status PENDING|RUNNING|COMPLETED|FAILED|CANCELLED] [--limit N]
tinyfish agent run get <run_id>
tinyfish agent run cancel <run_id>
```
**Batch operations** — submit many runs from a CSV file (`url,goal` columns):
```bash
tinyfish agent batch run --input runs.csv
tinyfish agent batch list
tinyfish agent batch get <batch_id>
tinyfish agent batch cancel <batch_id>
```
---
### `tinyfish browser session create`
Spin up a remote browser instance. Returns a CDP WebSocket URL for programmatic control.
```bash
tinyfish browser session create [--url <url>] [--pretty]
```
- `--url` optionally navigates to a page after creation
- Returns `session_id`, `cdp_url` (WebSocket), and `base_url`
- Use the `cdp_url` with Playwright, Puppeteer, or any CDP client
```bash
tinyfish browser session create --url "https://example.com"
# Returns: { session_id, cdp_url: "wss://...", base_url: "https://..." }
```
---
## General Notes
- **Match the user's language**: Respond in whatever language the user writes in.
- All commands support `--pretty` for human-readable output. Default is JSON.
- Use `--debug` on the root command or set `TINYFISH_DEBUG=1` to log HTTP requests to stderr.
$ARGUMENTS
Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.