agentleFS
EskyeeEskyee/agentbot-opensource/skills/trails/SKILL.md

trails

Skill17 starsChanged 5 months agoMITView on GitHub

name: trails description: Trails — Cross-chain swap, bridge, and DeFi orchestration via Sequence. Use when an agent wants to swap tokens across chains, bridge assets, fund a Bankr wallet from any chain, deposit into yield vaults (Aave, Morpho), get token prices, discover earn pools, or quote cross-chain routes. Integrates with Bankr submit() for on-chain execution. Also use when asked about Trails, Sequence swaps, cross-chain bridging, or DeFi yield deposits. Cross-chain swap, bridge, and DeFi orchestration powered by Sequence. Agents specify…

  • Reads credentials

3 other projects use a version of this, 2 of them edited.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

4 rules. 0 are common, 0 are distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use the Trails widget URL with the Bankr wallet address as toAddress.

    line 61
  2. Very specific:

    Use GetTokenList (body: {"chainIds": [137]}) or GetChains.

    line 80
  3. Very specific:

    Use "0x000...000" for native token addresses

    line 114
  4. Very specific:

    Add "destinationToAddress" to QuoteIntent to send output to a different wallet than the payer

    line 116

“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

name: trails description: Trails — Cross-chain swap, bridge, and DeFi orchestration via Sequence. Use when an agent wants to swap tokens across chains, bridge assets, fund a Bankr wallet from any chain, deposit into yield vaults (Aave, Morpho), get token prices, discover earn pools, or quote cross-chain routes. Integrates with Bankr submit() for on-chain execution. Also use when asked about Trails, Sequence swaps, cross-chain bridging, or DeFi yield deposits.

Trails

Cross-chain swap, bridge, and DeFi orchestration powered by Sequence. Agents specify the action — Trails automatically determines the optimal multi-step path across chains.

API Base: https://trails-api.sequence.app/rpc/Trails/<MethodName> Auth Header: X-Access-Key: $TRAILS_API Widget: https://demo.trails.build/ Bankr Integration: submit() from @bankr/cli broadcasts on-chain transactions

Environment Variables

export TRAILS_API=<your-sequence-project-access-key>   # from https://sequence.build
export BANKR_API_KEY=<your-bankr-key>                  # from bankr.bot/api

Quick Start

Get a swap quote (USDC on Polygon -> ETH on Base)

BANKR_WALLET=$(curl -s https://api.bankr.bot/agent/me \
  -H "X-API-Key: $BANKR_API_KEY" \
  | jq -r '.wallets[] | select(.chain == "evm") | .address')

curl -s https://trails-api.sequence.app/rpc/Trails/QuoteIntent \
  -H "Content-Type: application/json" \
  -H "X-Access-Key: $TRAILS_API" \
  -d "{
    \"ownerAddress\": \"$BANKR_WALLET\",
    \"originChainId\": 137,
    \"originTokenAddress\": \"0x3c499c542cef5e3811e1192ce70d8cC03d5c3359\",
    \"originTokenAmount\": \"10000000\",
    \"destinationChainId\": 8453,
    \"destinationTokenAddress\": \"0x0000000000000000000000000000000000000000\",
    \"destinationTokenAmount\": \"0\",
    \"tradeType\": \"EXACT_INPUT\",
    \"options\": { \"slippageTolerance\": 0.005 }
  }" | jq '.intent.quote'

Discover yield pools

curl -s https://trails-api.sequence.app/rpc/Trails/GetEarnPools \
  -H "Content-Type: application/json" \
  -H "X-Access-Key: $TRAILS_API" \
  -d '{"chainIds": [137]}' \
  | jq '[.pools[] | select(.isActive and .token.symbol == "USDC")] | sort_by(-.tvl) | .[0]'

Task Guide

When the user wants to fund a Bankr wallet

Use the Trails widget URL with the Bankr wallet address as toAddress. See references/trails.md Recipe 1.

When the user wants to swap tokens (same-chain or cross-chain)

1. Get Bankr wallet address 2. QuoteIntent -> CommitIntent -> submit depositTransaction via Bankr -> ExecuteIntent -> WaitIntentReceipt

See references/trails.md Recipe 2.

When the user wants to deposit into a yield vault

1. GetEarnPools to discover pool addresses and APYs 2. Approve the pool contract via Bankr submit() 3. Deposit via Bankr submit()

See references/trails.md Recipe 3.

When the user asks about supported tokens or chains

Use GetTokenList (body: {"chainIds": [137]}) or GetChains.

When the user asks about token prices

Use GetTokenPrices.

API Methods

GroupMethodDescription
Intent lifecycleQuoteIntentGet quote + depositTransaction for a swap/bridge
CommitIntentLock the intent, receive intentId
ExecuteIntentNotify Trails the deposit tx is mined
WaitIntentReceiptPoll until intent is complete
Intent managementGetIntentLook up intent by ID
GetIntentReceiptGet final receipt
SearchIntentsList intents by owner/status
GetIntentHistoryPaginated history
AbortIntentCancel a pending intent
DiscoveryGetEarnPoolsActive yield pools with APY, TVL, depositAddress
GetChainsSupported chains
GetTokenListTokens per chain
GetTokenPricesUSD prices
GetExactInputRoutesPreview routes for exact-in
GetExactOutputRoutesPreview routes for exact-out
ReferenceGetExchangeRateFiat conversion
GetTrailsContractsContract addresses per chain
UtilityPing / RuntimeStatus / ClockHealth + server time

Key Notes

- originTokenAmount is in base units (e.g. 10000000 = 10 USDC with 6 decimals) - Use "0x000...000" for native token addresses - submit must be imported from @bankr/cli/dist/lib/api.js (not re-exported from main entry) - Add "destinationToAddress" to QuoteIntent to send output to a different wallet than the payer

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.