> ## Documentation Index
> Fetch the complete documentation index at: https://daehan-base.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# OnchainKit 앱 마이그레이션

> Base 마이그레이션 스킬을 사용해 OnchainKit 앱을 wagmi와 viem으로 옮기는 방법을 안내합니다.

OnchainKit은 더 이상 유지보수되지 않습니다. 이 가이드는 Base 마이그레이션 스킬을 사용해 기존 OnchainKit 앱을 독립적인 [wagmi](https://wagmi.sh) 프로젝트로 옮기는 방법을 안내합니다.

## 개요

이 스킬은 `OnchainKitProvider`, `Wallet`, `Transaction` 세 가지 컴포넌트를 처리합니다. 각 항목마다 다음 작업을 수행합니다.

* 프로젝트에 있는 기존 OnchainKit 컴포넌트 코드를 제거합니다.
* wagmi/viem 기반의 대체 파일을 새로 생성합니다.
* 발생한 오류를 프로젝트 루트의 `mistakes.md` 파일에 기록합니다.

## 사전 준비

* OnchainKit을 사용 중인 Next.js 또는 React 프로젝트
* 스킬 실행을 지원하는 AI 코딩 도우미(Claude Code 또는 Cursor)

## 스킬 설치

```bash theme={null}
npx skills add base/base-skills
```

## 마이그레이션 프롬프트

<Warning>
  개별적으로 마이그레이션한다면 아래 `Provider` 프롬프트부터 시작하세요. 지갑과 트랜잭션 컴포넌트는 `WagmiProvider`가 먼저 구현되어 있어야 합니다.
</Warning>

### 원샷 실행(세 컴포넌트 한 번에)

```text theme={null}
Migrate my OnchainKit app to use standalone wagmi and viem. Replace the provider, wallet component, and transaction component. Remove the OnchainKit dependency entirely.
```

### Provider

```text theme={null}
Replace my OnchainKitProvider with WagmiProvider and QueryClientProvider.
```

### Wallet

```text theme={null}
Migrate my OnchainKit wallet component to a standalone wagmi-based connect button.
```

### Transaction

```text theme={null}
Migrate my OnchainKit transaction component to use wagmi hooks directly.
```

## 검증

마이그레이션이 끝나면 아래 프롬프트를 실행해 세 컴포넌트가 완전히 교체되었는지 확인하세요.

```text theme={null}
Run npm run build and confirm there are no remaining imports of OnchainKitProvider, Wallet, or Transaction from @coinbase/onchainkit in the project.
```
