Skip to content
Back to skills

Official Base Converting Minikit To Farcaster

ASecurity

Converts Mini Apps from MiniKit (OnchainKit) to native Farcaster SDK. Use when migrating from @coinbase/onchainkit/minikit, converting MiniKit hooks, removing MiniKitProvider, or when user mentions MiniKit, OnchainKit, or Farcaster SDK migration.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 24, 2026
developmenttypescriptgoreactnode

Works with

  • cli

Security analysis

A100/100

Scanned November 24, 2026

npx -y skills add iDorgham/Workspace-Factory --skill official_base_converting_minikit_to_farcaster --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Official Base Converting Minikit To Farcaster?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Official Base Converting Minikit To Farcaster
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/idorgham-official-base-converting-minikit-to-farcaster/badge)](https://www.skillsdirectory.com/skills/idorgham-official-base-converting-minikit-to-farcaster)

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

Download with Pro
SKILL.md
---
name: converting-minikit-to-farcaster
description: Converts Mini Apps from MiniKit (OnchainKit) to native Farcaster SDK. Use when migrating from @coinbase/onchainkit/minikit, converting MiniKit hooks, removing MiniKitProvider, or when user mentions MiniKit, OnchainKit, or Farcaster SDK migration.
---

# MiniKit to Farcaster SDK

## Breaking Changes (SDK v0.2.0+)

1. `sdk.context` is a **Promise** — must await
2. `sdk.isInMiniApp()` accepts **no parameters**
3. `sdk.actions.setPrimaryButton()` has no onClick callback

Check version: `npm list @farcaster/miniapp-sdk`

## Quick Reference

| MiniKit | Farcaster SDK | Notes |
|---------|---------------|-------|
| `useMiniKit().setFrameReady()` | `await sdk.actions.ready()` | |
| `useMiniKit().context` | `await sdk.context` | **Async** |
| `useMiniKit().isSDKLoaded` | `await sdk.isInMiniApp()` | No params |
| `useClose()` | `await sdk.actions.close()` | |
| `useOpenUrl(url)` | `await sdk.actions.openUrl(url)` | |
| `useViewProfile(fid)` | `await sdk.actions.viewProfile({ fid })` | |
| `useViewCast(hash)` | `await sdk.actions.viewCast({ hash })` | |
| `useComposeCast()` | `await sdk.actions.composeCast({ text, embeds })` | |
| `useAddFrame()` | `await sdk.actions.addMiniApp()` | |
| `usePrimaryButton(opts, cb)` | `await sdk.actions.setPrimaryButton(opts)` | No callback |
| `useAuthenticate()` | `sdk.quickAuth.getToken()` | See AUTH.md (`AUTH.md`) |

## Context Access Pattern

```typescript
// WRONG
const fid = sdk.context?.user?.fid;

// CORRECT
const context = await sdk.context;
const fid = context?.user?.fid;
```

In React components, use state:

```typescript
const [context, setContext] = useState(null);

useEffect(() => {
  const load = async () => {
    const ctx = await sdk.context;
    setContext(ctx);
  };
  load();
}, []);
```

## Conversion Workflow

1. Verify Node.js >= 22.11.0
2. Update dependencies — see DEPENDENCIES.md (`DEPENDENCIES.md`)
3. Replace imports: `@coinbase/onchainkit/minikit` → `@farcaster/miniapp-sdk`
4. Convert hooks using reference above
5. Add FrameProvider — see PROVIDER.md (`PROVIDER.md`)
6. Update manifest: `frame` → `miniapp` — see MANIFEST.md (`MANIFEST.md`)

## Common Errors

**"Property 'user' does not exist on type 'Promise<MiniAppContext>'"**
→ Await `sdk.context` before accessing properties

**"Expected 0 arguments, but got 1"**
→ Remove parameters from `sdk.isInMiniApp()`

**Context is null in components**
→ Ensure FrameProvider is in your provider chain

## References

- MAPPING.md (`MAPPING.md`) — Complete hook-by-hook conversion reference
- EXAMPLES.md (`EXAMPLES.md`) — Before/after code examples
- PROVIDER.md (`PROVIDER.md`) — Provider setup with FrameProvider
- PITFALLS.md (`PITFALLS.md`) — Common errors and solutions
- DEPENDENCIES.md (`DEPENDENCIES.md`) — Package updates
- AUTH.md (`AUTH.md`) — Quick Auth migration
- MANIFEST.md (`MANIFEST.md`) — farcaster.json changes

Attribution

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

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.