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
| Priority | Method | Best For | Setup |
|---|---|---|---|
| 1 | Surf Skill | AI agents (Claude Code, Codex) | npx skills add asksurf-ai/surf-skills --skill surf |
| 2 | Surf CLI | Terminal scripting | curl -fsSL https://agent.asksurf.ai/cli/releases/install.sh | sh && surf login |
| 3 | REST API | Application code | https://api.ask.surf/gateway with Bearer token |
| 4 | Chat API | OpenAI-compatible SDKs | Change 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, SOLGitHub 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.aiCodex / 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.txtNaming Conventions
| Type | Rule | Example |
|---|---|---|
| Chains | Full form only | ethereum, solana, base, arbitrum, polygon, bsc |
| Symbols | Uppercase | BTC, ETH, SOL |
| Time ranges | Standardized | 7d, 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
- Full documentation: docs.asksurf.ai
- LLM-optimized: docs.asksurf.ai/llms-full.txt
- Skill install:
npx skills add asksurf-ai/surf-skills --skill surf