Provides SDK, API, and Widget integration for LI.FI cross-chain and bridge services.

Install

mkdir -p .claude/skills/lifi-dev && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/9503" && unzip -o skill.zip -d .claude/skills/lifi-dev && rm skill.zip

Installs to .claude/skills/lifi-dev

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

>
1 chars · catalog descriptionno explicit “when” trigger
Advanced

Key capabilities

  • Integrate cross-chain swap widgets
  • Implement SDK for programmatic routing
  • Fetch swap quotes via REST API
  • Configure gas subsidies and fee monetization

How it works

It provides a widget, SDK, or REST API to interact with LI.FI's cross-chain bridge and DEX aggregation infrastructure.

Inputs & outputs

You give it
Swap parameters (source/destination chain, token)
You get back
Execution route or swap quote

When to use lifi-dev

  • Adding a cross-chain swap widget to a React app
  • Integrating SDK for programmatic swap routing
  • Fetching swap quotes via REST API
  • Implementing gas subsidies for new users

About this skill

LI.FI Development Skill

Comprehensive development support for LI.FI DEX aggregator integration.

Overview

This skill provides complete guidance for building applications with LI.FI, covering:

  • Widget Integration: Drop-in UI component for swaps and bridges
  • SDK Integration: Programmatic control over routes and execution
  • API Integration: Direct REST API usage for maximum flexibility
  • Cross-chain Swaps: Multi-chain token swaps and bridges
  • Gas Subsidy: LI.Fuel implementation for cold-start problem
  • Fee Monetization: Revenue generation through integrator fees
  • Security: Best practices and security patterns

Quick Start

For Widget Integration

See widget_integration.tsx for complete examples.

import { LiFiWidget } from '@lifi/widget';

<LiFiWidget
  config={{
    integrator: 'your-app-name',
    theme: { palette: { primary: { main: '#6366f1' } } }
  }}
/>

For SDK Integration

See sdk_swap_example.ts for production-ready code.

import { LIFI } from '@lifi/sdk';

const lifi = new LIFI({ integrator: 'your-app' });
const routes = await lifi.getRoutes({ ... });

For API Integration

See api_routes_example.ts for direct API usage.

curl "https://li.quest/v1/quote?fromChain=1&toChain=137&..."

File Structure

lifi-dev/
├── skill.md                    # Main skill documentation
├── README.md                   # This file
│
├── scripts/                    # Production-ready code examples
│   ├── widget_integration.tsx  # Widget examples (React/Vue/Svelte)
│   ├── sdk_swap_example.ts     # SDK swap examples
│   ├── api_routes_example.ts   # API integration examples
│   └── gas_subsidy_example.ts  # LI.Fuel implementation
│
├── references/                 # Detailed guides
│   ├── widget-guide.md         # Widget customization
│   ├── sdk-guide.md           # SDK comprehensive guide
│   ├── api-reference.md        # Complete API documentation
│   ├── security.md             # Security best practices
│   ├── gas-subsidy-guide.md    # Gas subsidy guide
│   └── monetization-guide.md   # Revenue optimization
│
└── assets/                     # Utilities and templates
    ├── widget-theme-template.ts # Theme presets
    ├── rate-limiter.ts         # Rate limiting utility
    └── error-handler.ts        # Error handling utility

Key Features

1. Comprehensive Documentation

  • 60+ chains supported: Ethereum, Polygon, Arbitrum, Solana, and more
  • 800+ protocols integrated: Uniswap, 1inch, Stargate, Across, etc.
  • Complete API reference: All endpoints documented with examples
  • Security checklist: Production-ready security guidelines

2. Production-Ready Code

All examples are:

  • ✅ TypeScript with full type safety
  • ✅ Error handling included
  • ✅ Security best practices applied
  • ✅ Rate limiting implemented
  • ✅ Performance optimized

3. Multiple Integration Methods

Choose the best approach for your needs:

MethodComplexityControlBest For
Widget⭐ EasyLowQuick integration, standard UX
SDK⭐⭐ ModerateHighCustom UX, programmatic control
API⭐⭐⭐ AdvancedMaximumBackend integration, any language

4. Revenue Monetization

Earn fees on every swap:

  • Configure custom fee percentage
  • Track revenue in real-time
  • Withdraw to any chain
  • See monetization-guide.md

5. Gas Subsidy (LI.Fuel)

Solve the cold-start problem:

  • Users receive native gas tokens on destination chain
  • Configurable gas amount
  • No manual gas acquisition needed
  • See gas-subsidy-guide.md

Common Use Cases

Case 1: Add Swap to DeFi Dashboard

Use Widget for fastest integration:

<LiFiWidget config={{ integrator: 'my-dashboard' }} />

Time to integrate: 5 minutes

Case 2: Custom Swap Flow

Use SDK for full control:

const routes = await lifi.getRoutes({ ... });
// Custom UI to display routes
const execution = await lifi.executeRoute({ route, walletClient });

Time to integrate: 1-2 hours

Case 3: Backend Integration

Use API for server-side:

response = requests.get('https://li.quest/v1/quote', params={ ... })
route = response.json()

Time to integrate: 2-4 hours

Security Checklist

Before production deployment:

  • Slippage protection enabled
  • Token approval limits set
  • API key protected (backend only)
  • Rate limiting implemented
  • Error handling comprehensive
  • User confirmations shown
  • Transaction monitoring active

See security.md for complete checklist.

Support & Resources

Version History

  • v1.0.0 (2024): Initial release with complete Widget, SDK, and API support

License

This skill documentation is provided as-is for educational purposes. LI.FI SDK and services are subject to their respective licenses.

Contributing

Found an issue or want to improve documentation? Submit feedback through:

  • GitHub Issues (if skill is public)
  • Direct message to skill maintainer
  • LI.FI Discord community

Ready to start building? Check out skill.md for the complete guide!

When not to use it

  • When the application does not involve cross-chain functionality
  • When the project requires a non-EVM chain not supported by LI.FI

Prerequisites

API key for production

Limitations

  • Requires internet access to LI.FI API
  • Dependent on supported chain/protocol availability

How it compares

It abstracts the complexity of cross-chain routing and bridge execution into a standardized integration layer.

Compared to similar skills

lifi-dev side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
lifi-dev (this skill)05moReviewAdvanced
convex-realtime15moNo flagsIntermediate
api05moNo flagsAdvanced
hr-portal-skill017dNo flagsBeginner

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

Search skills

Search the agent skills registry