AI Prompts

Pre-built prompts to integrate Surf into your AI coding workflow — Claude Code, Cursor, Copilot, Codex, and more

AI Prompts

Pre-built prompts that teach AI coding assistants how to use Surf correctly. Add these to your project config files and your AI agent will automatically know how to fetch crypto data.

Integration Methods

PriorityMethodBest ForSetup
1Surf SkillAI agents (Claude Code, Codex)npx skills add asksurf-ai/surf-skills --skill surf
2Surf CLITerminal scriptingcurl -fsSL https://agent.asksurf.ai/cli/releases/install.sh | sh && surf login
3REST APIApplication codehttps://api.ask.surf/gateway with Bearer token
4Chat APIOpenAI-compatible SDKsChange base URL to Surf endpoint

Claude Code

Add to CLAUDE.md in your project root:

## Crypto Data
 
This project uses the Surf API for crypto data. The Surf skill is installed — use `/surf` to query data.
 
Examples:
- `/surf "BTC price last 30 days"`
- `/surf "top 10 DEX by volume"`
- `/surf "vitalik.eth portfolio"`

Cursor

Add to .cursor/rules/surf.md:

When the user asks about crypto data, use the Surf CLI:
 
- `surf market-price --symbol BTC -o json -f body.data`
- `surf wallet-detail --address 0x... -o json -f body.data`
- Always use `-o json -f body.data` for structured output
- Chain names must be full form: ethereum, solana, base, arbitrum (not eth, sol)
- Symbols must be uppercase: BTC, ETH, SOL

GitHub Copilot

Add to .github/copilot-instructions.md:

For crypto data, use the Surf REST API:
- Base URL: https://api.ask.surf/gateway
- Auth: Bearer token from SURF_API_KEY env var
- Docs: https://docs.asksurf.ai

Codex / OpenCode

Add to AGENTS.md:

## Surf Data API
 
Use the Surf skill for crypto data queries. Run `surf sync` before discovery,
then `surf list-operations` to find available commands.
 
LLM-optimized docs: https://docs.asksurf.ai/llms-full.txt

Naming Conventions

TypeRuleExample
ChainsFull form onlyethereum, solana, base, arbitrum, polygon, bsc
SymbolsUppercaseBTC, ETH, SOL
Time rangesStandardized7d, 30d, 365d, max

Short aliases like eth or sol for chain names are not supported — always use the full form.

REST API Example

import requests
 
resp = requests.get(
    "https://api.ask.surf/gateway/v1/market/price",
    params={"symbol": "BTC"},
    headers={"Authorization": f"Bearer {API_KEY}"}
)
data = resp.json()["data"]
print(f"BTC: ${data['price']:,.2f}")

Chat API Example

import OpenAI from "openai";
 
const client = new OpenAI({
  baseURL: "https://api.ask.surf/gateway/v1",
  apiKey: process.env.SURF_API_KEY,
});
 
const response = await client.chat.completions.create({
  model: "surf",
  messages: [{ role: "user", content: "What is the current BTC price?" }],
});

Resources