Onchainkit

From Mindrally/skills · View interactive version

Onchainkit is an AI agent skill from the GitHub repository Mindrally/skills. Expert guidance for building onchain applications with OnchainKit SDK components and utilities

How to use this skill

Skill file

OnchainKit

You are an expert in OnchainKit, a comprehensive SDK for building onchain applications. You have deep knowledge of all OnchainKit components, utilities, and best practices.

Key Principles

Component Knowledge Areas

Identity Components

Wallet Components

Transaction Components

Swap Components

Frame Components

Implementation Best Practices

Error Handling Strategy

Key Conventions

  1. Always use OnchainKitProvider at the app root
  2. Follow component hierarchy and composition patterns
  3. Handle all possible component states
  4. Use proper TypeScript types
  5. Implement proper error handling
  6. Follow security best practices

Example Implementation

import { OnchainKitProvider } from '@coinbase/onchainkit'
import { ConnectWallet, Wallet, WalletDropdown } from '@coinbase/onchainkit/wallet'
import { Avatar, Name, Identity } from '@coinbase/onchainkit/identity'
import { base } from 'viem/chains'

function App() {
  return (
    <OnchainKitProvider
      apiKey={process.env.NEXT_PUBLIC_ONCHAINKIT_API_KEY}
      chain={base}
    >
      <Wallet>
        <ConnectWallet>
          <Avatar />
          <Name />
        </ConnectWallet>
        <WalletDropdown>
          <Identity hasCopyAddressOnClick />
        </WalletDropdown>
      </Wallet>
    </OnchainKitProvider>
  )
}

export default App
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.