Skip to content

avnu-labs/avnu-skill

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

avnu Skill for Claude Code

A Claude Code skill that provides AI agents with knowledge of the avnu SDK for building DeFi applications on Starknet.

What is this?

This skill teaches Claude Code how to integrate with avnu's DeFi infrastructure on Starknet:

  • Token Swaps - Best-price routing across multiple DEXs
  • DCA Orders - Dollar Cost Averaging with automated recurring buys
  • Staking - Native STRK and BTC variant staking
  • Gasless Transactions - Users pay fees in ERC-20 tokens via Paymaster
  • Gasfree Transactions - dApp sponsors gas fees on behalf of users
  • Market Data - Prices, volumes, TVL from Impulse API

Installation

npx skills add avnu-labs/avnu-skill

Usage

Once installed, Claude Code automatically uses this skill when you ask about:

  • Building swaps on Starknet
  • Integrating avnu SDK
  • DCA strategies
  • Gasless/gasfree transactions
  • Starknet DeFi

Example Prompts

"Help me build a swap from ETH to USDC using avnu"
"Create a DCA order to buy ETH weekly"
"How do I enable gasless transactions with the paymaster?"
"Sponsor gas fees for my users with gasfree mode"
"Set up STRK staking with avnu"

Skill Contents

skills/avnu/
├── SKILL.md                    # Main skill file with quick reference
├── references/
│   ├── swap-guide.md           # Detailed swap documentation
│   ├── dca-guide.md            # DCA order management
│   ├── staking-guide.md        # Staking operations
│   ├── paymaster-guide.md      # Gasless & gasfree transactions
│   ├── gasfree-frontend.md     # Frontend patterns for sponsored txs
│   ├── tokens-prices.md        # Token & price APIs
│   ├── error-handling.md       # Error taxonomy
│   └── configuration.md        # SDK configuration
└── scripts/
    ├── swap-example.ts         # Runnable swap example
    ├── dca-example.ts          # Runnable DCA example
    ├── staking-example.ts      # Runnable staking example
    ├── gasless-swap.ts         # Runnable gasless example
    └── gasfree-swap.ts         # Runnable gasfree (sponsored) example

Requirements

The skill assumes projects use:

  • @avnu/avnu-sdk - avnu SDK
  • starknet - Starknet.js v6+
  • ethers - Token amount formatting (formatUnits/parseUnits)
  • moment - Date formatting (DCA examples only)

Gasfree Mode (Optional)

To sponsor gas fees for your users, you need an API key from portal.avnu.fi:

  1. Connect with your Starknet wallet
  2. Create a new API key
  3. Fund your key with STRK on mainnet (free on Sepolia)
  4. Add to your .env file (server-side only):
AVNU_PAYMASTER_API_KEY=your-api-key-here

⚠️ Never expose this key in frontend code. Use Server Actions or API routes.

Links

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors