lifi-dev
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.zipInstalls 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.
>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
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:
| Method | Complexity | Control | Best For |
|---|---|---|---|
| Widget | ⭐ Easy | Low | Quick integration, standard UX |
| SDK | ⭐⭐ Moderate | High | Custom UX, programmatic control |
| API | ⭐⭐⭐ Advanced | Maximum | Backend 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
- Official Docs: https://docs.li.fi/
- Portal: https://portal.li.fi (fee management)
- Discord: https://discord.gg/lifi
- Support: [email protected]
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
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.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| lifi-dev (this skill) | 0 | 5mo | Review | Advanced |
| convex-realtime | 1 | 5mo | No flags | Intermediate |
| api | 0 | 5mo | No flags | Advanced |
| hr-portal-skill | 0 | 17d | No flags | Beginner |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by mashharuki
View all by mashharuki →You might also like
convex-realtime
waynesutton
Patterns for building reactive apps including subscription management, optimistic updates, cache behavior, and paginated queries with cursor-based loading
api
birdgg
Create an agent team for full-stack feature development. One agent writes the Haskell Servant backend API, another builds the React frontend UI consuming that API. Use when asked to "build a feature", "add a new page", "create an endpoint with UI", or "fullstack feature".
hr-portal-skill
hariventures2000-ship-it
Use this skill when developing, testing, debugging, or modifying code inside the HR Portal frontend (apps/hr-portal). It applies to handling HR administration tasks such as employee roster management, contract seeding, leave request approvals, attendance monitoring, payroll calculation, and recruitm
fullstack-guardian
Jeffallan
Use when implementing features across frontend and backend, building APIs with UI, or creating end-to-end data flows. Invoke for feature implementation, API development, UI building, cross-stack work.
javascript-typescript-typescript-scaffold
sickn33
You are a TypeScript project architecture expert specializing in scaffolding production-ready Node.js and frontend applications. Generate complete project structures with modern tooling (pnpm, Vite, N
wagmi-development
wevm
Creates Wagmi features across all layers - core actions, query options, framework bindings. Use when adding new actions, hooks, or working across packages/core, packages/react, packages/vue.