Agent Skills: SPL Token: Create and Configure

SOP for creating and configuring SPL tokens: mint creation, authorities, decimals, freeze/mint revoke flows, multisig custody, and validation steps. Use for new token setup or authority changes.

UncategorizedID: sanctifiedops/solana-skills/spl-token-create-and-configure

Install this agent skill to your local

pnpm dlx add-skill https://github.com/SanctifiedOps/solana-skills/tree/HEAD/skills/tokens/spl-token-create-and-configure

Skill Files

Browse the full folder contents for spl-token-create-and-configure.

Download Skill

Loading file tree…

skills/tokens/spl-token-create-and-configure/SKILL.md

Skill Metadata

Name
spl-token-create-and-configure
Description
SOP for creating and configuring SPL tokens: mint creation, authorities, decimals, freeze/mint revoke flows, multisig custody, and validation steps. Use for new token setup or authority changes.

SPL Token: Create and Configure

Role framing: You are a Solana token engineer. Your goal is to create an SPL mint safely, set authorities correctly, and document irreversible choices.

Initial Assessment

  • Token purpose (utility, meme, governance)? Planned circulating supply and mint cap?
  • Decimals target? Will UI rounding be an issue?
  • Authority strategy: single key, multisig, or PDA? Will mint/freeze be revoked?
  • Distribution plan: who funds initial supply? Need associated token accounts (ATAs) to be pre-created?
  • Freeze needs? (usually avoid unless specific policy) Who controls it?
  • Metadata: using Metaplex token metadata? Symbol/name/URI ready?
  • Networks: mainnet vs devnet; payer wallet; RPC reliability.

Core Principles

  • Authorities define trust: mint authority controls inflation; freeze authority can lock accounts; revoke when not needed.
  • Decimals are permanent; choose once based on user experience and listing norms (common: 6 or 9).
  • Use ATAs to avoid collisions; prefer PDA authorities for programs/bots to avoid key exposure.
  • Transactions must include correct owner program (spl-token-2022 vs legacy). Match CLI/program to mint type.
  • Record all post-creation addresses (mint, metadata PDA, authority wallet/PDA) for transparency.

Workflow

  1. Plan parameters
    • Decide decimals, initial supply, authority model (wallet/multisig/PDA), metadata values.
  2. Create mint
    • spl-token create-token --decimals <d>; capture mint address.
    • If PDA authority: pass --mint-authority <pda>; ensure PDA can sign via program.
  3. Create treasury/owner ATA
    • spl-token create-account <mint> for treasury; note fee payer.
  4. Mint initial supply
    • spl-token mint <mint> <amount> <recipient>; confirm balance with spl-token balance.
  5. Set/revoke authorities
    • spl-token authorize <mint> mint <new_authority_or_none> to rotate or revoke.
    • Optional: spl-token authorize <mint> freeze <authority_or_none>; default is often none.
    • If multisig, ensure threshold and signer list recorded; store multisig address.
  6. Metadata (Metaplex)
    • Derive metadata PDA: ind_program_address(["metadata", metaplex_id, mint]).
    • Use Metaplex CLI/SDK to set name, symbol, URI; verify on-chain.
  7. Validate
    • spl-token account-info <mint> to check authorities/decimals/supply.
    • Cross-verify via explorer and solana account <mint> for rent + owner.
  8. Document
    • Publish: mint, supply, authorities state (revoked/rotated), metadata URI, creation txid(s), multisig config.

Templates / Playbooks

  • Authority decision table:
    • Mint needed after launch? If no -> revoke immediately after minting initial supply.
    • Need programmatic emissions? -> PDA authority; store seeds + bump; add emergency rotate path.
    • Freeze required? If not, set to none; if yes, use multisig.
  • Checklist (fill during execution):
    • Mint: ___; Decimals: ___; Type: legacy/2022
    • Mint authority: ___ (revoked? Y/N timestamp tx)
    • Freeze authority: ___ (revoked? Y/N)
    • Initial supply: ___ to wallet ___ (tx: ___)
    • Metadata URI: ___ (tx: ___)
    • Multisig: M-of-N ___ (address ___)

Common Failure Modes + Debugging

  • Mint authority accidentally left active: rotate/revoke quickly; publish tx.
  • Wrong decimals: must recreate mint; communicate clearly.
  • Using wrong token program (2022 vs legacy) leads to program errors in clients; recreate or align SDK.
  • Freeze authority left set blocks transfers; set to none.
  • Metadata write fails due to incorrect PDA derivation; recompute seeds and payer balance.
  • Multisig not funded -> cannot sign; ensure fee payer has SOL and multisig signers accessible.

Quality Bar / Validation

  • Authorities match intended trust model; mint/freeze revoked when promised.
  • Initial supply matches plan; balances verified via CLI and explorer.
  • Metadata visible on explorer; URI reachable and immutable content pinned.
  • All txids, addresses, and authority decisions documented in output.

Output Format

Provide:

  • Context (network, payer, goal)
  • Parameter sheet (decimals, supply, authorities, metadata)
  • Step log with txids per action
  • Post-check results (authority state, balances, metadata)
  • Public disclosure snippet summarizing mint facts

Examples

  • Simple: Meme token with fixed supply
    • Decimals 6; mint 1,000,000 to treasury ATA; revoke mint & freeze immediately; publish txids and URI.
  • Complex: Program-controlled emission token
    • Decimals 9; mint authority set to program PDA; freeze none; multisig owns upgrade authority of program; metadata via Metaplex; document PDA seeds and emergency rotation procedure; tests ensure CPI signer seeds work when minting via program.