Install the Wayfern agent skill

Give Claude Code, Codex, Cursor, Gemini CLI or any agent with a shell one SKILL.md file that teaches it to call the Wayfern REST API with curl and your token.

Updated

The Wayfern agent skill is one markdown file. It tells an agent which Wayfern endpoint to call for each job, how to send your token, what each call costs and how to handle errors. Use it when an agent can run shell commands but you do not want to add an MCP server, or when the agent runs where OAuth sign-in is not possible.

What the skill contains

The file is at https://wayfern.com/skills/wayfern/SKILL.md. It follows the common skill format: a YAML header with a name and a description, then instructions. The agent reads the description to decide when to load the skill. The body covers:

  • the base URL and the two headers each call needs,
  • a table that maps a need to an endpoint and its credit cost,
  • curl examples for scrape, search, extract, screenshot, map and crawl,
  • rules for retries, the 402 stop and costly calls.

The skill does not contain a token. It reads WAYFERN_API_TOKEN from the environment and tells the agent never to print it.

Create a token

  1. Open Tokens in the dashboard.
  2. Create a token with the web and search scopes. Add captcha only if the agent solves captchas.
  3. Copy the wf_ secret. It is shown one time.
  4. Put it in the environment where the agent runs:
export WAYFERN_API_TOKEN="wf_..."

Keep the token in your shell profile or your secret manager. Do not commit it to the repo. See API tokens and scopes.

Install the file

Each agent loads skills from its own folder. Put the file in a folder named wayfern inside it:

AgentSkills folder
Claude Code~/.claude/skills
Codex~/.agents/skills, or .agents/skills in a repo
Cursor~/.cursor/skills
Gemini CLI~/.gemini/skills
VS Code~/.copilot/skills
Grok Build~/.grok/skills

For Claude Code:

mkdir -p ~/.claude/skills/wayfern
curl -fsSL https://wayfern.com/skills/wayfern/SKILL.md -o ~/.claude/skills/wayfern/SKILL.md

Use a folder inside the repo when the whole team should get the skill. Commit the file, not the token.

Use it

Ask for a job that needs the live web. The agent loads the skill and runs curl:

Read https://example.com/pricing and list every plan with its monthly price.

The agent calls POST /api/v1/scrape and gets back markdown with "credits": 1. For a list of prices it can call POST /api/v1/extract with a JSON Schema instead.

Skill or MCP

The skill and the MCP server reach the same services at the same rates. The differences:

  • MCP needs no shell. Chat apps such as Claude and ChatGPT can only use MCP.
  • MCP signs in with OAuth. The skill needs a token in the environment.
  • The skill can use every REST field, such as crawl webhooks and custom headers. The MCP tools have a smaller set of inputs.
  • A sandbox that blocks the network blocks curl. Codex, for example, must allow network access for the skill to work.

To connect over MCP, see Connect an AI agent over MCP.

Update the skill

Run the same curl command again. The file changes when the API gains a call or a rule. Your token does not change.