This skill guides you to create NEAR dApps, integrate wallet connections, and build frontend interactions for NEAR smart contracts.
npx playbooks add skill near/agent-skills --skill near-dapp
@hot-labs/near-connect connector used hereauction, auction-adv; --help is authoritative)Determine which path to follow:
User wants to create a new NEAR dApp from scratch.
npx create-near-app@latest
Or with arguments:
npx create-near-app my-app --frontend vite-react --contract rs --install
Framework options: vite-react | next-app | next-page
Contract options: rs (Rust) | ts (TypeScript)
User wants to add NEAR wallet connection to an existing React app.
Quick setup:
npm install near-connect-hooks @hot-labs/near-connect near-api-js
// 1. Wrap app root with NearProvider
import { NearProvider } from 'near-connect-hooks';
<NearProvider config={{ network: 'mainnet' }}>
<App />
</NearProvider>
// 2. Use hook in components
import { useNearWallet } from 'near-connect-hooks';
const { signedAccountId, signIn, signOut, viewFunction, callFunction } = useNearWallet();
Use @hot-labs/near-connect directly without React hooks.
npm install @hot-labs/near-connect
import { NearConnector } from "@hot-labs/near-connect";
const connector = new NearConnector({ network: "mainnet" });
connector.on("wallet:signIn", async (t) => {
const wallet = await connector.wallet();
const address = t.accounts[0].accountId;
});
await connector.connect();
viewFunction({ contractId, method, args })callFunction({ contractId, method, args, deposit })transfer({ receiverId, amount })nearToYocto() / yoctoToNear() from near-api-js"1000000000000000000000000" yoctoNEAR"30000000000000" (30 TGas)Weekly roundup of top Claude Code skills, MCP servers, and AI coding tips.