/product-sdk:product-sdk-app-builderfrom product-sdk
Scaffolds and implements Polkadot dApps using @parity/product-sdk packages. Handles chain interactions, package selection, and project setup for both developer-guided and autonomous workflows.
Ships in product-sdk. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Orchestrator skill for building applications with the @parity/product-sdk package ecosystem.
import { getChainAPI } from "@parity/product-sdk-chain-client";
const client = await getChainAPI("paseo");
const balance = await client.assetHub.query.System.Account.getValue("5GrwvaEF...");
client.destroy();
import { createChainClient } from "@parity/product-sdk-chain-client";
import { paseo_asset_hub } from "@parity/product-sdk-descriptors/paseo-asset-hub";
const client = await createChainClient({
chains: { assetHub: paseo_asset_hub },
});
const balance = await client.assetHub.query.System.Account.getValue("5GrwvaEF...");
client.destroy();
Determine what the app needs:
Use the decision tree in references/package-selector.md.
Every app needs:
@parity/product-sdk-chain-client # Connect to chains
@parity/product-sdk-descriptors # Chain type definitions (peer dep of chain-client)
polkadot-api # Core runtime (peer dep of descriptors)
Add based on features:
| Feature | Package | Skill |
|---|---|---|
| Smart contracts (PolkaVM/Solidity) | @parity/product-sdk-contracts | product-sdk-contracts |
| Submit transactions | @parity/product-sdk-tx | product-sdk-transactions |
| Wallet connection (Talisman, Polkadot.js, Host API) | @parity/product-sdk-signer | product-sdk-transactions |
| Key derivation | @parity/product-sdk-keys | product-sdk-transactions |
| CLI sign-in (QR/mobile) + session signers | @parity/product-sdk-auth | product-sdk-transactions |
| Decentralized storage | @parity/product-sdk-cloud-storage | product-sdk-cloud-storage |
| Pub/sub messaging | @parity/product-sdk-statement-store | product-sdk-statement-store |
| Address encoding | @parity/product-sdk-address | product-sdk-utilities |
| Encryption | @parity/product-sdk-crypto | product-sdk-utilities |
| KV storage | @parity/product-sdk-local-storage | product-sdk-utilities |
| Logging | @parity/product-sdk-logger | product-sdk-utilities |
Use templates in references/project-templates.md.
mkdir my-polkadot-app && cd my-polkadot-app
npm init -y
package.json essentials:
{
"type": "module",
"dependencies": {
"@parity/product-sdk-chain-client": "latest",
"polkadot-api": "^2.0.2"
}
}
tsconfig.json essentials:
{
"compilerOptions": {
"target": "ES2022",
"module": "ESNext",
"moduleResolution": "bundler",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"resolveJsonModule": true,
"isolatedModules": true,
"outDir": "./dist",
"rootDir": "./src"
},
"include": ["src"]
}
Install:
npm install
Invoke the relevant domain skill(s) based on the selected packages:
npx tsc # Compile TypeScript
node dist/index.js # Run the app
@parity/product-sdk-chain-client offers two paths for connecting to chains:
getChainAPI (Preset) | createChainClient (BYOD) | |
|---|---|---|
| When | Known environments (paseo, polkadot, kusama) | Custom chains or a subset of chains |
| Descriptors | Built-in, lazy-loaded | You import and provide them |
| Chains | Always assetHub + bulletin + individuality | Any combination you choose |
| Bundle size | Slightly larger (all 3 chains loaded) | Minimal (only what you import) |
Use getChainAPI when you want zero-config connection to a standard environment.
Use createChainClient when you need:
Both return the same ChainClient type with .raw access for advanced use (e.g., createContractRuntime).
See references/chains.md for full details.
WARNING: Only the
"paseo"environment is currently available. Using"polkadot"or"kusama"will throw an error.
| Environment | Asset Hub | Bulletin | Individuality |
|---|---|---|---|
| paseo (testnet) | Yes | Yes | Yes |
| polkadot (mainnet) | Planned | Planned | Planned |
| kusama (canary) | Planned | Planned | Planned |
polkadot-api — It's a peer dependency of @parity/product-sdk-descriptors. Always install it.@parity/product-sdk-descriptors/paseo-bulletin, NOT @parity/product-sdk-descriptors."paseo" works. "polkadot" and "kusama" throw.await — getChainAPI() and createChainClient() return a Promise. Always await it.client.destroy() when done to give back its hold on each chain, or destroyAll() to close every chain.api.contracts — There is no .contracts property on chain clients. Create ContractRuntime yourself: createContractRuntime(client.raw.assetHub, { atBest: true }), or use ContractManager.fromClient() for convenience.createDevSigner("Alice") is testnet-only. Use SignerManager for production.CommonSignerTxCreator (tx), StatementSignerWithKey (statement-store), and SignerManager (wallet UI) are distinct.When building autonomously for a non-technical user:
When assisting a developer:
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
polkadot, dapp-scaffolding, product-sdk, chain-interaction, web3
npx claudepluginhub paritytech/product-sdk --plugin product-sdk11 skills in this plugin
/migrating-to-product-sdkUse when migrating a product codebase to @parity/product-sdk — detects legacy stacks (polkadot-apps, novasamatech, hand-rolled crypto/IPFS, polkadot-api 1.x) in the target repo, decides which migration areas apply, writes a per-repo migration spec, then hands off to writing-plans.
/product-sdk-chain-connectionUse when connecting to Polkadot chains, querying chain state, subscribing to storage, working with typed APIs, or choosing between preset and BYOD paths. Covers @parity/product-sdk-chain-client and @parity/product-sdk-descriptors.
/product-sdk-cloud-storageUse when uploading or retrieving data via Cloud Storage, working with CID-based decentralized storage, or the CloudStorageClient SDK. Covers the store() upload builder, chunked uploads, container-only reads (fetch/query), CID helpers, and authorization.
/product-sdk-contractsUse when interacting with smart contracts (PolkaVM/Solidity) on Asset Hub, using ContractManager with cdm.json manifests, createContract for ad-hoc contracts, ContractRuntime creation, or contract type codegen. Covers @parity/product-sdk-contracts.
/product-sdk-individualityUse when reading a person's personhood or membership standing on the individuality chain from a DotNS username or an account address, when reading the usernames an account holds, or when sending a transaction that must run under a person, lite-person or score-participant origin instead of an account origin. Covers readPersonhoodState, lookupUsername, the seven-state PersonhoodState union, the pure derivation without a chain client and the decode helpers for raw Score.Participants and Resources.Consumers values; the game surface, its prize draws, claiming and sign-up with its airdrop VRFs; productContext, personhoodContext, peopleRing, litePeopleRing and readScoreContext for the ring-VRF proof contexts; withAsPerson, withLiteAlias and the RestrictOrigins requirement that otherwise fails every call; the two-transaction lite personhood bind then sign-up flow with buildLiteAliasBindTx, readLiteSignUpRequirement and signUpWithLiteInviteTx; game registration in one call with registerForGame, readGameSeat, deriveSeat, bindGameSeat and the /host entry's hostGameRegistrationCapabilities; and full-personhood registration with registerMessage, Score.register and withScoreParticipant.
/product-sdk-nftsUse when reading Scarcity NFT collections or their item catalogues on Asset Hub, which collections a claim can mint into, every collection, and what one of them holds. Covers getClaimableCollections, getCollections and getCollectionItems, getApprovedCollections for the collections apps offer per network, the one storage map that separates claimable from merely existing, the chain client they require and why a TypedApi is not enough, the descriptor entries they touch and what a pruned whitelist does, the open metadata schema and the two readings of ImageRef, why a missing collection is a success value rather than an error, getClaims across the People chain and Asset Hub with the four states a credit can be in, previewClaim and why it is the item a claim will produce, getVerifiedArtwork and why bytes are withheld unless they hash to the reference, getInstanceDisplays for the display metadata of minted NFTs by instance id with Found/NotFound per instance, and the purse-scoped reads that do not exist yet.
Other plugins' skills for the same job