Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Lifi Skill

ASecurity

v4 - Use LI.FI API for cross-chain and same-chain swaps, bridges, and contract calls. Use when quoting routes, validating chains/tokens, building transaction requests, and tracking status.

14 stars
0 votes
0 copies
1 views
Added 9/7/2026
businessgoshellbashtestinggitapi

Works with

cliapi

Security Analysis

A100/100

Scanned 9/7/2026

$npx -y skills add modbender/skill-library-mcp --skill lifi-skill --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Lifi Skill?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Lifi Skill
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/modbender-lifi-skill/badge)](https://www.skillsdirectory.com/skills/modbender-lifi-skill)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
Files
SKILL.md
---
name: lifi
description: v4 - Use LI.FI API for cross-chain and same-chain swaps, bridges, and contract calls. Use when quoting routes, validating chains/tokens, building transaction requests, and tracking status.
homepage: https://docs.li.fi/
metadata:
  {
    "openclaw":
      {
        "emoji": "🔁",
        "requires": { "env": ["LIFI_API_KEY"] },
        "primaryEnv": "LIFI_API_KEY",
      },
  }
---

# LI.FI Agent Skill

## CRITICAL RULES (read first)
1. ONLY use `curl` to call the LI.FI API. NEVER use `web_search`, `web_fetch`, or any other tool.
2. ONLY use the endpoints documented below. Do NOT guess or invent URLs.
3. Base URL is `https://li.quest/v1/`. No other base URL.
4. ALWAYS include auth header: `"x-lifi-api-key: $LIFI_API_KEY"` (double quotes, dollar sign — shell expands it).
5. ALWAYS tell the user the quote is provided by LI.FI.
6. **Default slippage: 10% (0.10).** If the user has a custom slippage in their strategy (via `defi_get_strategy`), use that instead. The agent can also adjust dynamically per-transaction if the user requests it.
7. Default deadline: 10 minutes.
8. ALWAYS add `&skipSimulation=true` to all `/v1/quote` requests. Our EIP-7702 delegated wallets have on-chain code that breaks LI.FI's simulation.
9. NEVER construct ERC-20 approve calldata (hex) yourself. ALWAYS use the `defi_approve` or `defi_approve_and_send` tools.
10. **ALL swaps, bridges, and DeFi token operations MUST go through LI.FI.** No exceptions. No manual DEX interactions.

## Transaction Links

After every transaction broadcast, **always** provide a clickable block explorer link:
- EVM: `[View tx](https://basescan.org/tx/0xHASH)` — use the correct explorer (etherscan.io, basescan.org, arbiscan.io, polygonscan.com, optimistic.etherscan.io)
- Sui: `[View tx](https://suiscan.xyz/txblock/{txDigest})`

## Sui

- **Sui chain ID: `9270000000000000`**. Use this for `fromChain` and `toChain` in LI.FI quote requests when the user wants Sui (e.g. `fromChain=9270000000000000&toChain=9270000000000000` for same-chain Sui swap).
- LI.FI supports **Sui** for same-chain swaps and bridging to/from EVM and Solana.
- For Sui quotes, use the user's **suiAddress** from `defi_get_wallet` as `fromAddress`.
- **Execute Sui quotes with `defi_send_sui_transaction`** — pass the transaction bytes (hex) from the LI.FI quote. Do **not** use `defi_send_transaction` or `defi_approve_and_send` for Sui.
- Sui does not use ERC-20 approvals; there is no approval step for Sui swaps.

## Endpoints

### GET /v1/chains — List supported chains

```bash
curl -s --request GET \
  --url https://li.quest/v1/chains \
  --header "x-lifi-api-key: $LIFI_API_KEY"
```

Use for: listing chains, testing connectivity. If user asks for a test, use this.

### GET /v1/tokens — List tokens on chains

```bash
curl -s --request GET \
  --url 'https://li.quest/v1/tokens?chains=8453' \
  --header "x-lifi-api-key: $LIFI_API_KEY"
```

Params: `chains` (comma-separated chain IDs).

### GET /v1/quote — Get swap/bridge quote with tx data

```bash
curl -s --request GET \
  --url 'https://li.quest/v1/quote?fromChain=8453&toChain=8453&fromToken=ETH&toToken=USDC&fromAddress=0xYOUR_ADDRESS&fromAmount=100000000000000&slippage=0.10&skipSimulation=true' \
  --header "x-lifi-api-key: $LIFI_API_KEY"
```

Params: `fromChain`, `toChain`, `fromToken`, `toToken`, `fromAddress`, `toAddress` (optional), `fromAmount` (in wei), `slippage` (decimal, e.g. 0.10 = 10%), `skipSimulation=true` (ALWAYS include).

Returns: `estimate` (with `toAmount`, `toAmountMin`, `approvalAddress`) and `transactionRequest` (ready for wallet submission).

After presenting a quote to the user, always include the estimated output amount, fees, and slippage. Get the user's wallet address with `defi_get_wallet` and use it as `fromAddress` in the quote.

#### Executing the quote

**Check if ERC-20 approval is needed:** If the quote's `transactionRequest.value` is `"0x0"` AND `estimate.approvalAddress` exists, the swap/bridge is using an ERC-20 token that needs approval first.

- **If approval IS needed:** Use `defi_approve_and_send` with:
  - `token`: the `action.fromToken.address` from the quote
  - `spender`: the `estimate.approvalAddress` from the quote
  - `approveAmount`: the `action.fromAmount` from the quote (or omit for unlimited)
  - `to`, `value`, `data`, `gasLimit`: from the quote's `transactionRequest`

- **If approval is NOT needed** (native ETH swap, value > 0x0): Use `defi_send_transaction` with the quote's `transactionRequest` fields: **to, value, data, chainId, and gasLimit** (ALWAYS pass `gasLimit` from the quote).

**NEVER construct approve calldata hex yourself.** The `defi_approve` and `defi_approve_and_send` tools handle ABI encoding correctly.

**Sui:** For quotes where `fromChain` or `toChain` is Sui, use `defi_send_sui_transaction` with the quote's transaction bytes. No approval step.

### POST /v1/advanced/routes — Get multiple route options

```bash
curl -s --request POST \
  --url https://li.quest/v1/advanced/routes \
  --header 'Content-Type: application/json' \
  --header "x-lifi-api-key: $LIFI_API_KEY" \
  --data '{
  "fromChainId": 8453,
  "fromAmount": "100000000000000",
  "fromTokenAddress": "0x0000000000000000000000000000000000000000",
  "toChainId": 8453,
  "toTokenAddress": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
  "options": {
    "slippage": 0.10,
    "order": "RECOMMENDED"
  }
}'
```

### POST /v1/quote/contractCalls — Multi-step contract calls (BETA)

```bash
curl -s --request POST \
  --url https://li.quest/v1/quote/contractCalls \
  --header 'Content-Type: application/json' \
  --header "x-lifi-api-key: $LIFI_API_KEY" \
  --data '{
  "fromChain": 10,
  "fromToken": "0x4200000000000000000000000000000000000042",
  "fromAddress": "0xYOUR_ADDRESS",
  "toChain": 1,
  "toToken": "ETH",
  "toAmount": "100000000000001",
  "contractCalls": []
}'
```

### GET /v1/status — Check transfer status

```bash
curl -s --request GET \
  --url 'https://li.quest/v1/status?txHash=0xYOUR_TX_HASH&fromChain=8453' \
  --header "x-lifi-api-key: $LIFI_API_KEY"
```

Pass `fromChain` to speed up the lookup.

### GET /v1/tools — List available bridges and exchanges

```bash
curl -s --request GET \
  --url 'https://li.quest/v1/tools?chains=8453' \
  --header "x-lifi-api-key: $LIFI_API_KEY"
```

## Docs
- LLM docs: https://docs.li.fi/llms.txt
- OpenAPI: https://gist.githubusercontent.com/kenny-io/7fede47200a757195000bfbe14c5baee/raw/725cf9d4a6920d5b930925b0412d766aa53c701c/lifi-openapi.yaml

Attribution

modbendermodbender
View sourceSee grades on GitHubMore from modbender →
SSkills Directory ProSkills Directory

Get any skill into Claude in one click.

Download any skill as a ZIP for Claude.ai, Claude Desktop, or .claude/skills. $9/mo.

See Pro

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills Directory ProSkills Directory

Get any skill into Claude in one click.

Download any skill as a ZIP for Claude.ai, Claude Desktop, or .claude/skills. $9/mo.

See Pro

Related Skills

Solution Architect

Designs system architecture, component specifications, and technical integration strategy. Use when: designing solutions, system architecture, technology stack, or integration approaches.

192 votes

Akorchak:Venture Assessment

Generate a comprehensive VC investment assessment report for a company

72 votes

Telegram Compose

Compose rich, readable Telegram messages using HTML formatting via direct Telegram API. Use when: (1) Sending any Telegram message beyond a simple one-line reply, (2) Creating structured messages with sections, lists, or status updates, (3) Need formatting unavailable via Clawdbot's Markdown conversion (underline, spoilers, expandable blockquotes, user mentions by ID), (4) Sending alerts, reports, summaries, or notifications to Telegram, (5) Want professional, scannable message formatting wit...

6511 votes

Stock Analysis

Analyze stocks and cryptocurrencies using Yahoo Finance data. Supports portfolio management (create, add, remove assets), crypto analysis (Top 20 by market cap), and periodic performance reports (daily/weekly/monthly/quarterly/yearly). 8 analysis dimensions for stocks, 3 for crypto. Use for stock analysis, portfolio tracking, earnings reactions, or crypto monitoring.

6511 votes

Just Fucking Cancel

Find and cancel unwanted subscriptions by analyzing bank transactions. Detects recurring charges, calculates annual waste, and helps you cancel with direct URLs and browser automation. Use when: 'cancel subscriptions', 'audit subscriptions', 'find recurring charges', 'what am I paying for', 'save money', 'subscription cleanup', 'stop wasting money'. Supports CSV import (Apple Card, Chase, Amex, Citi, Bank of America, Capital One, Mint, Copilot) OR Plaid API for automatic transaction pull. Out...

6511 votes
View all in business →