Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

swapper-integration

БесплатноБез исполняемых скриптовНе проверен

Integrate new DEX aggregators, swappers, or bridge protocols (like Bebop, Portals, Jupiter, 0x, 1inch, etc.) into ShapeShift Web. Activates when user wants to…

shapeshiftот shapeshift★ 206 звёзд на GitHub16 установок в других каталогах

Об этом скилле

Swapper Integration Skill

You are an expert at integrating DEX aggregators, swappers, and bridge protocols into ShapeShift Web. This skill guides you through the complete process from API research to production-ready implementation.

When This Skill Activates

Use this skill when the user wants to:

  • "Integrate [SwapperName] swapper"
  • "Add support for [Protocol]"
  • "Implement [DEX] integration"
  • "Add [Aggregator] as a swapper"
  • "Integrate [new swapper]"

Overview

ShapeShift Web is a decentralized crypto exchange aggregator that supports multiple swap providers through a unified interface. Each swapper implements standardized TypeScript interfaces (Swapper and SwapperApi) but has variations based on blockchain type (EVM, UTXO, Solana, Sui, Tron) and swapper model (direct transaction, deposit-to-address, gasless order-based).

Core Architecture:

  • Location: packages/swapper/src/swappers/
  • Interfaces: Swapper (execution) + SwapperApi (quotes/rates/status)
  • Rate/quote split: rates are display-only best effort; quotes are executable artifacts carrying transactionData (a TxBuildData variant) built at quote time. Execution and the public api consume the quote payload as-is — static data is set at quote time, only dynamic data (gas price, solana priority fee, nonce, blockhash) is fetched at execution.
  • Canonical shape: every swapper follows the context split — pure helpers.ts, shared getXTradeContext.ts, discriminated getXStepData.ts, thin getTradeQuote/getTradeRate arm wrappers. AcrossSwapper is the spec in code form; the authoritative conventions rubric lives in .claude/skills/swapper-rate-quote-review/SKILL.md — read it alongside this skill.
  • Feature Flags: All swappers behind runtime flags for gradual rollout

Your Role: Research → Implement → Test → Document, following battle-tested patterns from 18 existing swapper integrations.


Workflow

Phase 0: Pre-Research (Use WebFetch / WebSearch)

BEFORE asking the user for anything, proactively research the swapper online:

  1. Search for official documentation:

    Search: "[SwapperName] API documentation"
    Search: "[SwapperName] developer docs"
    Search: "[SwapperName] swagger api"
    
  2. Find their website and look for:

    • API docs link
    • Developer portal
    • GitHub repos with examples
    • Public API endpoints
    • Known integrations
  3. Fetch their API docs using WebFetch:

    • Main documentation page
    • Swagger/OpenAPI spec (if available)
    • Example requests/responses
  4. Research chain support:

    Search: "[SwapperName] supported chains"
    Search: "[SwapperName] which blockchains"
    
  5. Find existing integrations:

    Search: "github [SwapperName] integration example"
    Search: "[SwapperName] typescript sdk"
    

Then, compile what you found and ask the user ONLY for what you couldn't find or need confirmation on.


Phase 1: Information Gathering

Use the AskUserQuestion tool to gather missing information with structured prompts.

Based on your Phase 0 research, ask the user for:

  1. API Access (if needed):

    • API key for production (or staging)
    • Any authentication requirements you found
    • Confirmation of API endpoints you discovered
  2. Chain Support Confirmation:

    • Verify the chains you found are correct
    • Ask about any limitations or special requirements per chain
    • Confirm chain naming convention (ethereum vs 1 vs mainnet)
  3. Critical API Behaviors (if not clear from docs):

    • Slippage format: percentage (1=1%), decimal (0.01=1%), or basis points (100=1%)?
    • Address format: checksummed required?
    • Native token handling: marker address? which one?
    • Min/max trade amounts?
    • Quote expiration time?
  4. Brand Assets:

    • Confirm official name and capitalization
    • Request logo/icon (128x128+ PNG preferred)
  5. Known Issues:

    • Any quirks they're aware of?
    • Previous integration attempts or examples?

Example Multi-Question Prompt:

AskUserQuestion({
  questions: [
    {
      question: "Do we have an API key for [Swapper]?",
      header: "API Key",
      multiSelect: false,
      options: [
        { label: "Yes, I have it", description: "I'll provide the API key" },
        { label: "No, but we can get one", description: "I'll obtain an API key" },
        { label: "No API key needed", description: "API is public/unauthenticated" }
      ]
    },
    {
      question: "Which chains should we support initially?",
      header: "Chain Support",
      multiSelect: true,
      options: [
        { label: "Ethereum", description: "Ethereum mainnet" },
        { label: "Polygon", description: "Polygon PoS" },
        { label: "Arbitrum", description: "Arbitrum One" },
        { label: "All supported chains", description: "Enable all chains the API supports" }
      ]
    }
  ]
})

Полный SKILL.md на GitHub

Установить swapper-integration в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Read
Write
Edit
Grep
Glob
WebFetch
WebSearch
Bash(pnpm run test:*)
Bash(pnpm run lint:*)
Bash(pnpm run type-check)
Bash(pnpm run build:*)
Bash(gh pr:*)
AskUserQuestion

Вложенные файлы

NEAR_INTENTS_RESEARCH.mdcommon-gotchas.mdexamples.mdreference.md

FAQ

Что делает скилл swapper-integration?

Integrate new DEX aggregators, swappers, or bridge protocols (like Bebop, Portals, Jupiter, 0x, 1inch, etc.) into ShapeShift Web. Activates when user wants to add, integrate, or implement support for a new swapper. Guides through research, implementation, and testing following established patterns. (project)

Как установить скилл swapper-integration?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл swapper-integration запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить swapper-integration с