Skip to main content
The Adding Builder Codes skill gives your AI coding assistant everything it needs to add ERC-8021 attribution to your app’s transactions. This lets Base attribute onchain activity to your app and enables referral fee earnings.

Install

Terminal
npx skills add base/base-skills

What the skill covers

The skill detects your stack and applies the correct integration path:
StackApproach
PrivydataSuffix plugin in PrivyProvider
WagmidataSuffix option in useWriteContract / useSendTransaction
ViemAppend suffix when calling writeContract or sendTransaction
Standard RPCManually append hex suffix to transaction calldata
The skill prioritises detection in this order: Privy → Wagmi → Viem → Standard RPC.

How it works

Builder Codes are ERC-721 NFTs on Base. Appending your code as an ERC-8021 suffix to transaction calldata attributes that transaction to your app. The gas overhead is minimal — 16 gas per non-zero byte.

Example prompts

  • “Add my builder code to all outgoing transactions”
  • “Set up builder code attribution for my Wagmi app”
  • “How do I earn referral fees on Base?”

Reference