Expand AI logo
DocsDocs
Glow Active
API Reference
Login

Documentation

Get Started

OverviewWhy ExpandQuickstartWays to Use Expand

Agent Quickstarts

OverviewExpand SkillClaude CodeCursorCodexOpenCodeSkill-Based AgentsOther MCP Clients

Fetch

OverviewHow Fetch WorksOutput ModelInclude OptionsBrowser BehaviorHighlightsPlayground & ReplayBatched Fetch

Reference

API ReferenceCLI CommandsMCP Tools & ResourcesTypeScript SDKPython SDK

Account & Billing

Pricing & UsageTiersFAQ

Machine-Readable Docs

start.mdllms.txtllms-full.txtDocs as Markdown
Browse docs

Get Started

OverviewWhy ExpandQuickstartWays to Use Expand

Agent Quickstarts

OverviewExpand SkillClaude CodeCursorCodexOpenCodeSkill-Based AgentsOther MCP Clients

Fetch

OverviewHow Fetch WorksOutput ModelInclude OptionsBrowser BehaviorHighlightsPlayground & ReplayBatched Fetch

Reference

API ReferenceCLI CommandsMCP Tools & ResourcesTypeScript SDKPython SDK

Account & Billing

Pricing & UsageTiersFAQ

Machine-Readable Docs

start.mdllms.txtllms-full.txtDocs as Markdown

Expand Skill

Install the Expand Skill so agents know when and how to use Fetch.

The Expand Skill teaches your agent when to fetch live pages with Expand, reuse captured snapshots, search them for more context, and return citation links instead of falling back to raw HTML.

Authenticate once, then install the skill for your agent. Project scope is the default because it keeps the setup in the repo where the agent works.

expandai login
expandai skill install codex project

Pick your agent. Both the host and the scope are required arguments.

AgentProject installRecommended full setup
Claude Code
expandai skill install claude-code project
Hook setup
Cursorexpandai skill install cursor projectSkill + MCP
Codexexpandai skill install codex projectSkill + MCP
OpenCodeexpandai skill install opencode projectHook setup

Verify it works by asking the agent:

Use Expand to fetch https://news.ycombinator.com.
Show me the first 10 lines of Markdown and confirm the Fetch succeeded.

The skill works on its own whenever your agent can run terminal commands. Add MCP when you want the agent to call Expand as native tools instead of shelling out. For Claude Code and OpenCode, the recommended full setup is a hook.

Install commands

Run the command from your project root when you use project scope, so the files land next to the code the agent works on.

Global variants make the skill available across every project:

expandai skill install claude-code global
expandai skill install cursor global
expandai skill install codex global
expandai skill install opencode global

Use project scope when the setup should travel with one repository. Use global scope when you want the same skill in every project on your machine.

Skill, MCP, and hooks

These three surfaces stack. The skill gives your agent instructions for using the Expand CLI from the shell. MCP gives it native Fetch tools. Hooks wire Expand into the host's own fetch behavior where the host supports it.

AgentSkill supportRecommended full setupWhy
Claude CodeyesHookRoutes the native WebFetch tool through Expand.
CursoryesSkill + MCPSkill teaches usage; MCP exposes direct tools.

Skill alone is enough when your agent can run terminal commands. Add MCP when you want the agent to call Expand as native tools instead of shelling out. For Cursor and Codex, the full setup is Skill + MCP. For Claude Code and OpenCode, a hook is usually the best full setup because it upgrades the host's own fetch behavior. Cursor and Codex do not have an Expand hook path.

What the skill teaches

Fetch live pages

Use expandai fetch <url> when the agent needs rendered page content instead of raw HTML. Expand renders the live page, so it handles SPAs and bot-protected sites that plain curl cannot.

expandai fetch https://docs.example.com/api
expandai fetch github.com/owner/repo

Inspect object-mode output

Use JSON output when the agent needs the page metadata, Main Markdown, and State JSON together.

expandai fetch https://docs.example.com/api --format json

In object-mode output, the reusable snapshot handle is meta.snapshotId.

Reuse snapshots

Use expandai search <snapshotId> "your query" to search a page that was already captured instead of fetching the same URL again. Expand calls this search experience Highlights.

expandai search <snapshotId> "pricing limits"
expandai search <snapshotId> "pricing limits" --format json --max-results 10 --min-score 0.5

Use expandai fetch <url> --search "query" only for a one-shot fetch and search of a URL you have not captured yet. Once the agent has a snapshotId, prefer expandai search, which reuses the existing capture.

Return citations

Search-backed claims should carry citation links. In text output, expandai search and expandai fetch --search print a public playground citation link above each snippet. MCP tool results expose citationUrl fields directly. The skill instructs the agent to return those links alongside any claim grounded in fetched content.

Ask for more context

Start with Markdown. Reach for JSON, snapshot search, and referenced artifacts only when the task needs more than the main document. This keeps the agent's first read cheap and lets it pull detail on demand.

Stay in the user's auth boundary

If Expand is not authenticated, the agent should ask the user to run expandai login rather than authenticating on the user's behalf.

expandai login

Installed locations

Most users never need these paths. Reach for them when the agent does not see the skill or when project versus global scope looks wrong.

AgentProject pathGlobal path
Claude Code<project root>/.claude/skills/expandai/~/.claude/skills/expandai/
Cursor<project root>/.cursor/skills/expandai/~/.cursor/skills/expandai/
Codex

Codex uses .agents/skills/expandai/, not .codex/skills/expandai/.

Project-scoped skill files are written into the repository. Commit them only when the team wants Expand enabled for collaborators.

Update and uninstall

There is no separate expandai skill update command. Reinstall the skill to update it. The installer overwrites the existing Expand Skill directory for the selected host and scope.

expandai skill install codex project

Uninstall removes the skill directory for that host and scope:

expandai skill uninstall codex project
expandai skill uninstall cursor global

Troubleshooting

My agent does not see the skill

  • Confirm you installed for the right host.
  • Confirm project versus global scope.
  • Restart the agent if the host does not hot-reload skills.
  • Confirm SKILL.md exists at the expected path from the table above.
  • For project scope, confirm you ran the install command from the project root.

The skill runs but Fetch fails

Run expandai login in your terminal, then ask the agent to try again. A non-zero exit with Not authenticated means the CLI has no session.

I need tools, not just instructions

Install MCP for Cursor, Codex, or another MCP-compatible client when you want the agent to call Expand tools directly instead of relying on shell commands.

expandai mcp install cursor project
expandai mcp install codex project

Read MCP Tools & Resources for the full tool list.

Next steps

  • Agent Quickstarts overview
  • Claude Code
  • Cursor
  • Codex
  • OpenCode
  • Skill-Based Agents
  • CLI Commands
PreviousOverview
NextClaude Code

On This Page

Install commandsSkill, MCP, and hooksWhat the skill teachesFetch live pagesInspect object-mode outputReuse snapshotsReturn citationsAsk for more contextStay in the user's auth boundaryInstalled locationsUpdate and uninstallTroubleshootingMy agent does not see the skillThe skill runs but Fetch failsI need tools, not just instructionsNext steps
Codex
yes
Skill + MCP
Skill teaches usage; MCP exposes direct tools.
OpenCodeyesHookRoutes native fetch through Expand.
<project root>/.agents/skills/expandai/
~/.agents/skills/expandai/
OpenCode<project root>/.opencode/skills/expandai/~/.config/opencode/skills/expandai/