> ## Documentation Index
> Fetch the complete documentation index at: https://www.zkcompression.com/llms.txt
> Use this file to discover all available pages before exploring further.

# The Light Token Program

> High-performance token standard that is functionally equivalent to SPL while reducing account creation cost by 200x and being more CU efficient on hot paths. The Light Token SDK keeps code changes minimal and is a superset of the SPL-token API.

export const lightCreateAtaMacroCode = ["#[light_account(", "    init,", "    associated_token::authority = ata_owner,", "    associated_token::mint = ata_mint,", "    associated_token::bump = params.ata_bump", ")]", "pub ata: UncheckedAccount<'info>,"].join("\n");

export const splCreateAtaMacroCode = ["#[account(", "    init,", "    payer = fee_payer,", "    associated_token::mint = mint,", "    associated_token::authority = owner,", ")]", "pub ata: Account<'info, TokenAccount>,"].join("\n");

export const lightCreateAtaCpiCode = ["use light_token::instruction::CreateAssociatedAccountCpi;", "", "CreateAssociatedAccountCpi {", "    payer: payer.clone(),", "    owner: owner.clone(),", "    mint: mint.clone(),", "    ata: associated_token_account.clone(),", "    bump,", "}", ".rent_free(", "    compressible_config.clone(),", "    rent_sponsor.clone(),", "    system_program.clone(),", ")", ".invoke()?"].join("\n");

export const splCreateAtaCpiCode = ["use spl_associated_token_account::instruction::create_associated_token_account;", "", "let ix = create_associated_token_account(", "    &payer.pubkey(),", "    &owner.pubkey(),", "    &mint,", "    &spl_token::id(),", ");", "", "invoke(&ix, &[payer, owner, mint])?;"].join("\n");

export const lightCreateAtaRustCode = ["use light_token::instruction::CreateAssociatedTokenAccount;", "", "let ix = CreateAssociatedTokenAccount::new(", "    payer.pubkey(),", "    owner.pubkey(),", "    mint,", ")", ".instruction()?;"].join("\n");

export const splCreateAtaRustCode = ["use spl_associated_token_account::instruction::create_associated_token_account;", "", "let ix = create_associated_token_account(", "    &payer.pubkey(),", "    &owner.pubkey(),", "    &mint,", "    &spl_token::id(),", ");"].join("\n");

export const lightCreateAtaCode = ['import { getOrCreateAtaInterface } from "@lightprotocol/compressed-token/unified";', "", "const ata = await getOrCreateAtaInterface(", "  rpc,", "  payer,", "  mint,", "  owner", ");"].join("\n");

export const splCreateAtaCode = ['import { getOrCreateAssociatedTokenAccount } from "@solana/spl-token";', "", "const ata = await getOrCreateAssociatedTokenAccount(", "  connection,", "  payer,", "  mint,", "  owner", ");"].join("\n");

export const lightCreateMintMacroCode = ["#[light_account(init,", "    mint::signer = mint_signer,", "    mint::authority = fee_payer,", "    mint::decimals = 9,", "    mint::seeds = &[MINT_SIGNER_SEED, self.authority.to_account_info().key.as_ref()],", "    mint::bump = params.mint_signer_bump", ")]", "pub mint: UncheckedAccount<'info>,"].join("\n");

export const splCreateMintMacroCode = ["#[account(", "    init,", "    payer = fee_payer,", "    mint::decimals = 9,", "    mint::authority = fee_payer,", ")]", "pub mint: InterfaceAccount<'info, Mint>,"].join("\n");

export const lightCreateMintCpiCode = ["use light_token::instruction::CreateMintCpi;", "", "CreateMintCpi {", "    mint_seed: mint_seed.clone(),", "    authority: authority.clone(),", "    payer: payer.clone(),", "    address_tree: address_tree.clone(),", "    output_queue: output_queue.clone(),", "    compressible_config: compressible_config.clone(),", "    mint: mint.clone(),", "    rent_sponsor: rent_sponsor.clone(),", "    system_accounts,", "    cpi_context: None,", "    cpi_context_account: None,", "    params,", "}", ".invoke()?"].join("\n");

export const splCreateMintCpiCode = ["use spl_token::instruction::initialize_mint;", "", "let ix = initialize_mint(", "    &spl_token::id(),", "    &mint.pubkey(),", "    &mint_authority,", "    Some(&freeze_authority),", "    decimals,", ")?;", "", "invoke(&ix, &[mint, rent_sysvar])?;"].join("\n");

export const lightCreateMintRustCode = ["use light_token::instruction::CreateMint;", "", "let ix = CreateMint::new(", "    params,", "    mint_seed.pubkey(),", "    payer.pubkey(),", "    address_tree.tree,", "    output_queue,", ")", ".instruction()?;"].join("\n");

export const splCreateMintRustCode = ["use spl_token::instruction::initialize_mint;", "", "let ix = initialize_mint(", "    &spl_token::id(),", "    &mint.pubkey(),", "    &mint_authority,", "    Some(&freeze_authority),", "    decimals,", ")?;"].join("\n");

export const lightCreateMintCode = ['import { createMintInterface } from "@lightprotocol/compressed-token";', "", "const { mint } = await createMintInterface(", "  rpc,", "  payer,", "  mintAuthority,", "  freezeAuthority,", "  decimals,", "  mintKeypair", ");"].join("\n");

export const splCreateMintCode = ['import { createMint } from "@solana/spl-token";', "", "const mint = await createMint(", "  connection,", "  payer,", "  mintAuthority,", "  freezeAuthority,", "  decimals", ");"].join("\n");

export const CodeCompare = ({firstCode = "", secondCode = "", firstLabel = "Light Token", secondLabel = "SPL", language = "javascript"}) => {
  const [sliderPercent, setSliderPercent] = useState(100);
  const [isDragging, setIsDragging] = useState(false);
  const [isAnimating, setIsAnimating] = useState(false);
  const [copied, setCopied] = useState(false);
  const containerRef = useRef(null);
  const animationRef = useRef(null);
  const firstPreRef = useRef(null);
  const secondPreRef = useRef(null);
  const [containerHeight, setContainerHeight] = useState(null);
  const showingFirst = sliderPercent > 50;
  const handleCopy = async () => {
    const codeToCopy = showingFirst ? firstCode : secondCode;
    await navigator.clipboard.writeText(codeToCopy);
    setCopied(true);
    setTimeout(() => setCopied(false), 2000);
  };
  const highlightCode = code => {
    let escaped = code.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
    if (language === "rust") {
      const rustPattern = /(\/\/.*$)|(["'])(?:(?!\2)[^\\]|\\.)*?\2|\b(use|let|mut|pub|fn|struct|impl|enum|mod|const|static|trait|type|where|for|in|if|else|match|loop|while|return|self|Self|true|false|Some|None|Ok|Err|Result|Option|vec!)\b|::([a-zA-Z_][a-zA-Z0-9_]*)|&amp;([a-zA-Z_][a-zA-Z0-9_]*)|\b([a-zA-Z_][a-zA-Z0-9_]*)\s*(?=\()|(\?)/gm;
      return escaped.replace(rustPattern, (match, comment, stringQuote, keyword, pathSegment, reference, func, questionMark) => {
        if (comment) return `<span style="color:#6b7280;font-style:italic">${match}</span>`;
        if (stringQuote) return `<span style="color:#059669">${match}</span>`;
        if (keyword) return `<span style="color:#db2777">${match}</span>`;
        if (pathSegment) return `::<span style="color:#0891b2">${pathSegment}</span>`;
        if (reference) return `&amp;<span style="color:#6366f1">${reference}</span>`;
        if (func) return `<span style="color:#2563eb">${match}</span>`;
        if (questionMark) return `<span style="color:#db2777">?</span>`;
        return match;
      });
    }
    const pattern = /(\/\/.*$)|(["'`])(?:(?!\2)[^\\]|\\.)*?\2|\b(const|let|var|await|async|import|from|export|return|if|else|function|class|new|throw|try|catch)\b|\.([a-zA-Z_][a-zA-Z0-9_]*)\b|\b([a-zA-Z_][a-zA-Z0-9_]*)\s*(?=\()/gm;
    return escaped.replace(pattern, (match, comment, stringQuote, keyword, property, func) => {
      if (comment) return `<span style="color:#6b7280;font-style:italic">${match}</span>`;
      if (stringQuote) return `<span style="color:#059669">${match}</span>`;
      if (keyword) return `<span style="color:#db2777">${match}</span>`;
      if (property) return `.<span style="color:#0891b2">${property}</span>`;
      if (func) return `<span style="color:#2563eb">${match}</span>`;
      return match;
    });
  };
  const animateTo = target => {
    if (animationRef.current) cancelAnimationFrame(animationRef.current);
    setIsAnimating(true);
    const start = sliderPercent;
    const startTime = performance.now();
    const duration = 400;
    const animate = currentTime => {
      const elapsed = currentTime - startTime;
      const progress = Math.min(elapsed / duration, 1);
      const eased = 1 - Math.pow(1 - progress, 3);
      const current = start + (target - start) * eased;
      setSliderPercent(current);
      if (progress < 1) {
        animationRef.current = requestAnimationFrame(animate);
      } else {
        setSliderPercent(target);
        setIsAnimating(false);
        animationRef.current = null;
      }
    };
    animationRef.current = requestAnimationFrame(animate);
  };
  const handleToggle = () => {
    animateTo(showingFirst ? 0 : 100);
  };
  const handleMouseDown = e => {
    if (isAnimating) {
      cancelAnimationFrame(animationRef.current);
      setIsAnimating(false);
    }
    e.preventDefault();
    setIsDragging(true);
  };
  const handleMouseUp = () => {
    setIsDragging(false);
  };
  const handleMouseMove = e => {
    if (!isDragging || !containerRef.current) return;
    const rect = containerRef.current.getBoundingClientRect();
    const x = e.clientX - rect.left;
    const percent = Math.max(0, Math.min(100, x / rect.width * 100));
    setSliderPercent(percent);
  };
  const handleTouchMove = e => {
    if (!containerRef.current) return;
    if (isAnimating) {
      cancelAnimationFrame(animationRef.current);
      setIsAnimating(false);
    }
    const rect = containerRef.current.getBoundingClientRect();
    const x = e.touches[0].clientX - rect.left;
    const percent = Math.max(0, Math.min(100, x / rect.width * 100));
    setSliderPercent(percent);
  };
  const handleKeyDown = e => {
    if (e.key === "ArrowLeft") {
      setSliderPercent(p => Math.max(0, p - 5));
    } else if (e.key === "ArrowRight") {
      setSliderPercent(p => Math.min(100, p + 5));
    }
  };
  useEffect(() => {
    if (isDragging) {
      document.addEventListener("mousemove", handleMouseMove);
      document.addEventListener("mouseup", handleMouseUp);
      return () => {
        document.removeEventListener("mousemove", handleMouseMove);
        document.removeEventListener("mouseup", handleMouseUp);
      };
    }
  }, [isDragging]);
  useEffect(() => {
    return () => {
      if (animationRef.current) cancelAnimationFrame(animationRef.current);
    };
  }, []);
  useEffect(() => {
    const activeRef = showingFirst ? firstPreRef : secondPreRef;
    if (activeRef.current) {
      setContainerHeight(activeRef.current.scrollHeight);
    }
  }, [showingFirst]);
  return <>
      <div className="rounded-3xl not-prose mt-4 backdrop-blur-xl border overflow-hidden border-zinc-300 dark:border-zinc-700" style={{
    fontFamily: "Inter, sans-serif"
  }}>
        {}
        <div className="flex items-center justify-between px-4 py-3 border-b border-zinc-200 dark:border-zinc-700 bg-gray-50 dark:bg-zinc-900">
          <span className="text-sm font-medium text-zinc-600 dark:text-zinc-300">
            {showingFirst ? firstLabel : secondLabel}
          </span>

          <div className="flex items-center gap-3">
            {}
            <button onClick={handleCopy} className="p-1.5 rounded hover:bg-zinc-200 dark:hover:bg-zinc-700 transition-colors text-zinc-500 dark:text-zinc-400" title="Copy code" style={{
    background: "transparent",
    border: "none",
    cursor: "pointer"
  }}>
              {copied ? <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="#22c55e" strokeWidth="2">
                  <path d="M20 6L9 17l-5-5" />
                </svg> : <svg width="18" height="18" viewBox="0 0 18 18" fill="none">
                  <path d="M14.25 5.25H7.25C6.14543 5.25 5.25 6.14543 5.25 7.25V14.25C5.25 15.3546 6.14543 16.25 7.25 16.25H14.25C15.3546 16.25 16.25 15.3546 16.25 14.25V7.25C16.25 6.14543 15.3546 5.25 14.25 5.25Z" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
                  <path d="M2.80103 11.998L1.77203 5.07397C1.61003 3.98097 2.36403 2.96397 3.45603 2.80197L10.38 1.77297C11.313 1.63397 12.19 2.16297 12.528 3.00097" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
                </svg>}
            </button>

            {}
            <div onClick={handleToggle} className="bg-zinc-200 dark:bg-zinc-600" style={{
    position: "relative",
    width: "56px",
    height: "28px",
    borderRadius: "14px",
    boxShadow: "inset -2px -2px 4px rgba(255,255,255,0.3), inset 2px 2px 4px rgba(0,0,0,0.1)",
    cursor: "pointer",
    transition: "all 0.3s ease"
  }}>
              {}
              <div className="bg-white dark:bg-zinc-300" style={{
    position: "absolute",
    width: "24px",
    height: "24px",
    borderRadius: "12px",
    top: "2px",
    left: showingFirst ? "30px" : "2px",
    boxShadow: "0 2px 4px rgba(0,0,0,0.2)",
    transition: "all 0.3s ease-in-out",
    display: "flex",
    alignItems: "center",
    justifyContent: "center"
  }}>
                {}
                <div style={{
    width: "6px",
    height: "6px",
    background: showingFirst ? "#0066ff" : "#999",
    borderRadius: "50%",
    boxShadow: showingFirst ? "0 0 5px 1px rgba(0, 102, 255, 0.6)" : "0 0 4px 1px rgba(0, 0, 0, 0.1)",
    transition: "all 0.3s ease-in-out"
  }} />
              </div>
            </div>
          </div>
        </div>

        {}
        <div ref={containerRef} className="p-0" style={{
    cursor: isDragging ? "grabbing" : "default"
  }} onTouchMove={handleTouchMove} tabIndex={0} onKeyDown={handleKeyDown} role="slider" aria-valuenow={sliderPercent} aria-valuemin={0} aria-valuemax={100} aria-label="Code comparison slider">
          <div className="relative" style={{
    minHeight: "140px",
    overflow: "hidden",
    height: containerHeight ? `${containerHeight}px` : "auto",
    transition: "height 0.3s ease"
  }}>
            <div style={{
    position: "relative"
  }}>
              {}
              <pre ref={secondPreRef} className="m-0 p-4 text-zinc-700 dark:text-white/80 bg-transparent" style={{
    position: showingFirst ? "absolute" : "relative",
    top: 0,
    left: 0,
    right: 0,
    fontFamily: "ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",
    fontSize: "13px",
    lineHeight: "1.6",
    whiteSpace: "pre",
    zIndex: 1
  }} dangerouslySetInnerHTML={{
    __html: highlightCode(secondCode)
  }} />

              {}
              <pre ref={firstPreRef} className="m-0 p-4 text-zinc-700 dark:text-white/80 bg-white dark:bg-zinc-900" style={{
    position: showingFirst ? "relative" : "absolute",
    top: 0,
    left: 0,
    right: 0,
    fontFamily: "ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",
    fontSize: "13px",
    lineHeight: "1.6",
    whiteSpace: "pre",
    zIndex: 2,
    clipPath: `inset(0 ${100 - sliderPercent}% 0 0)`
  }} dangerouslySetInnerHTML={{
    __html: highlightCode(firstCode)
  }} />
            </div>

            {}
            <div className="absolute top-0 bottom-0 flex items-center justify-center pointer-events-none" style={{
    left: `${sliderPercent}%`,
    transform: "translateX(-50%)",
    zIndex: 30
  }}>
              <div className="absolute top-0 bottom-0 w-px bg-zinc-400 dark:bg-white/30" />

              <div className="absolute top-0 bottom-0" style={{
    right: "50%",
    width: "60px",
    background: "linear-gradient(to left, rgba(0, 102, 255, 0.15) 0%, transparent 100%)"
  }} />

              {}
              <div onMouseDown={handleMouseDown} className="pointer-events-auto cursor-grab flex items-center justify-center gap-px transition-transform" style={{
    width: "20px",
    height: "32px",
    borderRadius: "4px",
    background: "#f8fafc",
    border: "1px solid #d1d5db",
    boxShadow: "0 1px 2px rgba(0,0,0,0.05)",
    transform: isDragging ? "scale(1.08)" : "scale(1)"
  }}>
                <div className="flex flex-col gap-0.5">
                  {[0, 1, 2].map(i => <div key={i} style={{
    width: "3px",
    height: "3px",
    borderRadius: "50%",
    background: "#0066ff"
  }} />)}
                </div>
                <div className="flex flex-col gap-0.5">
                  {[0, 1, 2].map(i => <div key={i} style={{
    width: "3px",
    height: "3px",
    borderRadius: "50%",
    background: "#0066ff"
  }} />)}
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </>;
};

### Mint Accounts

Light-mint accounts represent a unique mint and optionally can store token-metadata.
Functionally equivalent to SPL mints.

| Creation Cost    |      Light Token |  SPL-Token |
| :--------------- | ---------------: | ---------: |
| **Mint Account** | **0.000091 SOL** | 0.0015 SOL |

<Accordion title="Compare to SPL">
  <Tabs>
    <Tab title="TypeScript Client">
      <CodeCompare firstCode={lightCreateMintCode} secondCode={splCreateMintCode} firstLabel="light-token" secondLabel="SPL" />
    </Tab>

    <Tab title="Rust Client">
      <CodeCompare firstCode={lightCreateMintRustCode} secondCode={splCreateMintRustCode} firstLabel="light-token" secondLabel="SPL" language="rust" />
    </Tab>

    <Tab title="Anchor Macro">
      <CodeCompare firstCode={lightCreateMintMacroCode} secondCode={splCreateMintMacroCode} firstLabel="light-token" secondLabel="SPL" language="rust" />
    </Tab>

    <Tab title="CPI">
      <CodeCompare firstCode={lightCreateMintCpiCode} secondCode={splCreateMintCpiCode} firstLabel="light-token" secondLabel="SPL" language="rust" />
    </Tab>
  </Tabs>

  View the [guide](/light-token/cookbook/create-mint) to create Light Token mints, or enable interoperability for existing SPL and Token 2022 mints.
</Accordion>

### Token Accounts

Light-token accounts can hold balances from any light, SPL, or Token-2022 mint, without the need
to pay rent-exemption.

| Creation Cost     |      Light Token |  SPL-Token |
| :---------------- | ---------------: | ---------: |
| **Token Account** | **0.000017 SOL** | 0.0029 SOL |

<Accordion title="Compare to SPL">
  <Tabs>
    <Tab title="TypeScript Client">
      <CodeCompare firstCode={lightCreateAtaCode} secondCode={splCreateAtaCode} firstLabel="light-token" secondLabel="SPL" />
    </Tab>

    <Tab title="Rust Client">
      <CodeCompare firstCode={lightCreateAtaRustCode} secondCode={splCreateAtaRustCode} firstLabel="light-token" secondLabel="SPL" language="rust" />
    </Tab>

    <Tab title="Anchor Macro">
      <CodeCompare firstCode={lightCreateAtaMacroCode} secondCode={splCreateAtaMacroCode} firstLabel="light-token" secondLabel="SPL" language="rust" />
    </Tab>

    <Tab title="CPI">
      <CodeCompare firstCode={lightCreateAtaCpiCode} secondCode={splCreateAtaCpiCode} firstLabel="light-token" secondLabel="SPL" language="rust" />
    </Tab>
  </Tabs>

  View the [guide](/light-token/cookbook/create-ata) to create associated token accounts.
</Accordion>

| CU Performance           | Light Token | SPL-Token |
| :----------------------- | ----------: | --------: |
| **ATA Creation**         |   **4,348** |    14,194 |
| **Transfer**             |     **312** |     4,645 |
| **Transfer** (rent-free) |   **1,885** |     4,645 |

<Card title="Learn how the Light Token Program works" icon="chevron-right" color="#0066ff" href="/faq" horizontal />

# Quickstart

<Steps>
  <Step>
    ### Installation

    <Tabs>
      <Tab title="npm">
        Install packages in your working directory:

        ```bash theme={null}
        npm install @lightprotocol/stateless.js@^0.23.0 \
                    @lightprotocol/compressed-token@^0.23.0
        ```

        Install the CLI globally:

        ```bash theme={null}
        npm install -g @lightprotocol/zk-compression-cli
        ```
      </Tab>

      <Tab title="yarn">
        Install packages in your working directory:

        ```bash theme={null}
        yarn add @lightprotocol/stateless.js@^0.23.0 \
                 @lightprotocol/compressed-token@^0.23.0
        ```

        Install the CLI globally:

        ```bash theme={null}
        yarn global add @lightprotocol/zk-compression-cli
        ```
      </Tab>

      <Tab title="pnpm">
        Install packages in your working directory:

        ```bash theme={null}
        pnpm add @lightprotocol/stateless.js@^0.23.0 \
                 @lightprotocol/compressed-token@^0.23.0
        ```

        Install the CLI globally:

        ```bash theme={null}
        pnpm add -g @lightprotocol/zk-compression-cli
        ```
      </Tab>

      <Tab title="SDK 2.0 (token-interface)">
        Install packages in your working directory:

        ```bash theme={null}
        # npm
        npm install @lightprotocol/stateless.js@^0.23.0 \
                    @lightprotocol/token-interface@^0.1.2

        # yarn
        yarn add @lightprotocol/stateless.js@^0.23.0 \
                 @lightprotocol/token-interface@^0.1.2

        # pnpm
        pnpm add @lightprotocol/stateless.js@^0.23.0 \
                 @lightprotocol/token-interface@^0.1.2
        ```

        Install the CLI globally:

        ```bash theme={null}
        npm install -g @lightprotocol/zk-compression-cli
        ```
      </Tab>
    </Tabs>
  </Step>

  <Step>
    ### Get Started
  </Step>
</Steps>

<Tabs>
  <Tab title="Stablecoin Payments and Wallets">
    ### Payment Skill for Agents

    <Accordion title="Agent skill">
      Use the [payments](https://github.com/Lightprotocol/skills/tree/main/skills/payments) agent skill to add light-token payment support to your project:

      ```
      npx skills add Lightprotocol/skills
      ```

      For orchestration, install the [general skill](https://zkcompression.com/skill.md):

      ```bash theme={null}
      npx skills add https://zkcompression.com
      ```
    </Accordion>

    ### Payment Flows

    <Card title="Overview to Stablecoin Payments with Light Token" icon="credit-card" href="/light-token/payments/overview" horizontal />

    <CardGroup cols={2}>
      <Card title="Basic payment" icon="arrow-right" href="/light-token/payments/basic-payment" horizontal />

      <Card title="Batch payments" icon="layer-group" href="/light-token/payments/batch-payments" horizontal />

      <Card title="Receive payments" icon="arrow-down" href="/light-token/payments/receive-payments" horizontal />

      <Card title="Payment with memo" icon="memo" href="/light-token/payments/payment-with-memo" horizontal />

      <Card title="Get Balance and Transaction History" icon="magnifying-glass" href="/light-token/payments/verify-payments" horizontal />

      <Card title="Verify Recipients Address" icon="shield-check" href="/light-token/payments/verify-recipient-address" horizontal />

      <Card title="Configure Spend Permissions" icon="check" href="/light-token/payments/spend-permissions" horizontal />

      <Card title="Wrap and Unwrap to or from SPL / Token 2022" icon="rotate" href="/light-token/payments/wrap-unwrap" horizontal />

      <Card title="Nullifier PDA" icon="code-commit" href="/pda/compressed-pdas/nullifier-pda" horizontal />
    </CardGroup>

    ### Fee Abstraction

    <Card title="Gasless transactions" icon="hand-holding-dollar" href="/light-token/wallets/gasless-transactions" horizontal />

    ### Signing

    <Card title="When using Privy Wallets" icon="key" href="/light-token/wallets/privy" horizontal />

    <Card title="When using Wallet Adapter" icon="wallet" href="/light-token/wallets/wallet-adapter" horizontal />

    ### Go to Production

    <Card title="Checklist" icon="rocket" href="/light-token/payments/production-readiness" horizontal />
  </Tab>

  <Tab title="DeFi">
    ### Agent Skill for DeFi

    <Accordion title="Agent skill">
      Use the [light-sdk](https://github.com/Lightprotocol/skills/tree/main/skills/light-sdk) agent skill to build rent-free DeFi programs:

      ```
      npx skills add Lightprotocol/skills
      ```

      For orchestration, install the [general skill](https://zkcompression.com/skill.md):

      ```bash theme={null}
      npx skills add https://zkcompression.com
      ```
    </Accordion>

    ### Guides

    <CardGroup cols={2}>
      <Card title="Program Integration" icon="cube" href="/light-token/defi/programs">
        Build rent-free AMMs and DeFi programs.
      </Card>

      <Card title="Router Integration" icon="route" href="/light-token/defi/routers">
        Add support for rent-free AMMs to your aggregator.
      </Card>

      <Card title="Pinocchio Programs" icon="feather" href="/light-token/defi/programs-pinocchio">
        High-performance DeFi programs with Pinocchio.
      </Card>
    </CardGroup>
  </Tab>

  <Tab title="Data Streaming">
    ### Agent Skill for Data Streaming

    <Accordion title="Agent skill">
      Use the [data-streaming](https://github.com/Lightprotocol/skills/tree/main/skills/data-streaming) agent skill to add Laserstream support to your project:

      ```
      npx skills add Lightprotocol/skills
      ```

      For orchestration, install the [general skill](https://zkcompression.com/skill.md):

      ```bash theme={null}
      npx skills add https://zkcompression.com
      ```
    </Accordion>

    ### Guides

    <CardGroup cols={2}>
      <Card title="Mint Accounts" icon="bolt" href="/light-token/streaming/mints">
        Stream mint events from the network in real-time.
      </Card>

      <Card title="Token Accounts" icon="stream" href="/light-token/streaming/tokens">
        Stream token events from the network in real-time.
      </Card>
    </CardGroup>
  </Tab>

  <Tab title="Basics and Examples">
    ### Agent Skills for Tokens

    <Accordion title="Agent skill">
      Install or view [dedicated agent skills](/ai-tools/overview#agent-skills).

      ```
      npx skills add Lightprotocol/skills
      ```

      Install orchestrator agent skill or view [skill.md](https://www.zkcompression.com/skill.md):

      ```bash theme={null}
      npx skills add https://zkcompression.com
      ```
    </Accordion>

    ## Cookbook

    <table>
      <colgroup>
        <col style={{ width: "30%" }} />

        <col style={{ width: "70%" }} />
      </colgroup>

      <thead>
        <tr>
          <th />

          <th />
        </tr>
      </thead>

      <tbody>
        <tr>
          <td>
            <a href="/light-token/cookbook/create-mint">Create Mint</a>
          </td>

          <td>Create a Light mint with token metadata, or create SPL and Token 2022 mints with interface PDA for interoperability</td>
        </tr>

        <tr>
          <td>
            <a href="/light-token/cookbook/add-interface-pda">Add Interface PDA</a>
          </td>

          <td>Add an interface PDA to an existing SPL or Token 2022 mint for interoperability with Light Token</td>
        </tr>

        <tr>
          <td>
            <a href="/light-token/cookbook/create-ata">Create ATA</a>
          </td>

          <td>Create associated light-token accounts</td>
        </tr>

        <tr>
          <td>
            <a href="/light-token/cookbook/create-token-account">Create Token Account</a>
          </td>

          <td>Create light-token accounts</td>
        </tr>

        <tr>
          <td>
            <a href="/light-token/cookbook/mint-to">Mint To</a>
          </td>

          <td>Mint tokens to light-token accounts</td>
        </tr>

        <tr>
          <td>
            <a href="/light-token/cookbook/transfer-interface">Transfer</a>
          </td>

          <td>Transfer between Light Token, SPL and Token 2022 accounts</td>
        </tr>

        <tr>
          <td>
            <a href="/light-token/cookbook/transfer-checked">Transfer Checked</a>
          </td>

          <td>Transfer between Light Token accounts with decimals verification</td>
        </tr>

        <tr>
          <td>
            <a href="/light-token/cookbook/approve-revoke">Approve & Revoke</a>
          </td>

          <td>Delegate and revoke token authority</td>
        </tr>

        <tr>
          <td>
            <a href="/light-token/cookbook/transfer-delegated">Transfer Delegated</a>
          </td>

          <td>Transfer tokens as an approved delegate</td>
        </tr>

        <tr>
          <td>
            <a href="/light-token/cookbook/freeze-thaw">Freeze & Thaw</a>
          </td>

          <td>Freeze and thaw light-token accounts</td>
        </tr>

        <tr>
          <td>
            <a href="/light-token/cookbook/wrap-unwrap">Wrap & Unwrap</a>
          </td>

          <td>Convert between SPL/Token 2022 and light-token</td>
        </tr>

        <tr>
          <td>
            <a href="/light-token/cookbook/load-ata">Load ATA</a>
          </td>

          <td>Load cold light-token accounts to hot balance for transfers in one instruction</td>
        </tr>

        <tr>
          <td>
            <a href="/light-token/cookbook/close-token-account">Close Token Account</a>
          </td>

          <td>Close token account to reclaim remaining lamports</td>
        </tr>

        <tr>
          <td>
            <a href="/light-token/cookbook/burn">Burn</a>
          </td>

          <td>Burn tokens from light-token accounts</td>
        </tr>
      </tbody>
    </table>

    ## Examples

    ### Client

    |                                                           |                                                             |
    | :-------------------------------------------------------- | :---------------------------------------------------------- |
    | [**Toolkits**](/light-token/examples/client#toolkits)     | Payments, wallets, Privy integration, SPL-to-Light transfer |
    | [**TypeScript**](/light-token/examples/client#typescript) | Actions and instructions for all token operations           |
    | [**Rust**](/light-token/examples/client#rust)             | Actions and instructions for all token operations           |

    ### Program

    |                                                                |                                                                                 |
    | :------------------------------------------------------------- | :------------------------------------------------------------------------------ |
    | [**Examples**](/light-token/examples/program#examples)         | AMM reference, CPI create-and-transfer, Pinocchio swap                          |
    | [**Macros**](/light-token/examples/program#macros)             | Counter PDA, ATA, mint, and token account creation                              |
    | [**Instructions**](/light-token/examples/program#instructions) | All CPI instructions: approve, burn, close, freeze, mint-to, transfer, and more |
  </Tab>

  <Tab title="AI Prompts">
    {/* defi - routers */}

    {/* toolkits */}

    ## Stablecoin Payments

    <Accordion title="Stablecoin payments integration">
      Copy the prompt below or view the [guide](/light-token/payments/overview).

      <Prompt description="Integrate light-token APIs for stablecoin payments" actions={["copy", "cursor"]}>
        {`---
                description: Integrate light-token APIs for stablecoin payments
                allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
                ---

                ## Integrate light-token APIs for stablecoin payments

                Context:
                - Guide: https://zkcompression.com/light-token/payments/overview
                - Skills and resources index: https://zkcompression.com/skill.md
                - SPL to Light reference: https://zkcompression.com/api-reference/solana-to-light-comparison
                - Dedicated skill: https://github.com/Lightprotocol/skills/tree/main/skills/payments
                - Packages: @lightprotocol/compressed-token, @lightprotocol/stateless.js
                - Import from @lightprotocol/compressed-token/unified for all interface APIs

                SPL → Light Token API mapping:
                | Operation    | SPL                               | Light Token                              |
                | Receive      | getOrCreateAssociatedTokenAccount() | createLoadAtaInstructions() / loadAta()  |
                | Transfer     | createTransferInstruction()        | createTransferInterfaceInstructions()    |
                | Delegated Transfer | transfer() (delegate signs)  | transferInterface(..., ownerPubkey, delegateSigner, ...) |
                | Get Balance  | getAccount()                      | getAtaInterface()                        |
                | Tx History   | getSignaturesForAddress()         | getSignaturesForOwnerInterface()         |
                | Wrap SPL     | N/A                               | createWrapInstruction() / wrap()         |
                | Unwrap       | N/A                               | createUnwrapInstructions() / unwrap()    |

                ### 1. Index project
                - Grep \`@solana/spl-token|@lightprotocol|createTransferInstruction|getAccount|Connection|Keypair|stablecoin|payment\` across src/
                - Glob \`**/*.ts\` and \`**/*.tsx\` for project structure
                - Identify: RPC setup, existing token operations, payment flow, wallet signing pattern
                - Check package.json for existing @lightprotocol/* or @solana/spl-token dependencies
                - Task subagent (Grep/Read/WebFetch) if project has multiple packages to scan in parallel

                ### 2. Read references
                - WebFetch the guide above — review Instruction and Action tabs for each operation
                - WebFetch skill.md — check for a dedicated skill and resources matching this task
                - TaskCreate one todo per phase below to track progress

                ### 3. Clarify intention
                - AskUserQuestion: what is the goal? (new payment integration, migrate existing SPL payment flow, add alongside existing SPL)
                - AskUserQuestion: which operations? (receive, send, balance, history, wrap, unwrap — or all)
                - AskUserQuestion: instruction-level API (build your own transactions) or action-level API (high-level, fewer lines)?
                - Summarize findings and wait for user confirmation before implementing

                ### 4. Create plan
                - Based on steps 1–3, draft an implementation plan: which files to modify, what code to add, dependency changes
                - Verify existing connection/signer setup is compatible (createRpc with ZK Compression endpoint)
                - Key pattern: import from \`@lightprotocol/compressed-token/unified\` for all interface APIs
                - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
                - Present the plan to the user for approval before proceeding

                ### 5. Implement
                - Add deps if missing: Bash \`npm install @lightprotocol/compressed-token @lightprotocol/stateless.js\`
                - Set up RPC: \`createRpc(RPC_ENDPOINT)\` with a ZK Compression endpoint (Helius, Triton)
                - Import from \`@lightprotocol/compressed-token/unified\` for the interface APIs
                - Follow the guide and the approved plan
                - Write/Edit to create or modify files
                - TaskUpdate to mark each step done

                ### 6. Verify
                - Bash \`tsc --noEmit\`
                - Bash run existing test suite if present
                - TaskUpdate to mark complete

                ### Tools
                - mcp__zkcompression__SearchLightProtocol("<query>") for API details
                - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
                - Task subagent with Grep/Read/WebFetch for parallel lookups
                - TaskList to check remaining work

                ### Resources

                Guides:
                - Basic payment: https://zkcompression.com/light-token/payments/basic-payment
                - Batch payments: https://zkcompression.com/light-token/payments/batch-payments
                - Payment with memo: https://zkcompression.com/light-token/payments/payment-with-memo
                - Receive payments: https://zkcompression.com/light-token/payments/receive-payments
                - Verify payments: https://zkcompression.com/light-token/payments/verify-payments
                - Verify recipient address: https://zkcompression.com/light-token/payments/verify-recipient-address
                - Spend permissions: https://zkcompression.com/light-token/payments/spend-permissions
                - Wrap and unwrap: https://zkcompression.com/light-token/payments/wrap-unwrap
                - Production readiness: https://zkcompression.com/light-token/payments/production-readiness
                - FAQ: https://zkcompression.com/faq
                - Sign with Privy: https://zkcompression.com/light-token/wallets/privy
                - Sign with Wallet Adapter: https://zkcompression.com/light-token/wallets/wallet-adapter
                - Gasless transactions: https://zkcompression.com/light-token/wallets/gasless-transactions

                Examples:
                - All payments: https://github.com/Lightprotocol/examples-light-token/tree/main/toolkits/payments
                - Send (instruction): https://github.com/Lightprotocol/examples-light-token/blob/main/toolkits/payments/send/basic-send-instruction.ts
                - Send (action): https://github.com/Lightprotocol/examples-light-token/blob/main/toolkits/payments/send/basic-send-action.ts
                - Batch send: https://github.com/Lightprotocol/examples-light-token/blob/main/toolkits/payments/send/batch-send.ts
                - Payment with memo: https://github.com/Lightprotocol/examples-light-token/blob/main/toolkits/payments/send/payment-with-memo.ts
                - Receive: https://github.com/Lightprotocol/examples-light-token/blob/main/toolkits/payments/receive/receive.ts
                - Get balance: https://github.com/Lightprotocol/examples-light-token/blob/main/toolkits/payments/verify/get-balance.ts
                - Get history: https://github.com/Lightprotocol/examples-light-token/blob/main/toolkits/payments/verify/get-history.ts
                - Verify address: https://github.com/Lightprotocol/examples-light-token/blob/main/toolkits/payments/verify/verify-address.ts
                - Wrap: https://github.com/Lightprotocol/examples-light-token/blob/main/toolkits/payments/interop/wrap.ts
                - Unwrap: https://github.com/Lightprotocol/examples-light-token/blob/main/toolkits/payments/interop/unwrap.ts
                - Privy (Node.js): https://github.com/Lightprotocol/examples-light-token/tree/main/toolkits/sign-with-privy/nodejs
                - Privy (React): https://github.com/Lightprotocol/examples-light-token/tree/main/toolkits/sign-with-privy/react
                - Wallet Adapter (React): https://github.com/Lightprotocol/examples-light-token/tree/main/toolkits/sign-with-wallet-adapter/react
                - Gasless transfer: https://github.com/Lightprotocol/examples-light-token/blob/main/toolkits/gasless-transactions/typescript/gasless-transfer.ts`}
      </Prompt>

      ```text theme={null}
      ---
      description: Integrate light-token APIs for stablecoin payments
      allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
      ---

      ## Integrate light-token APIs for stablecoin payments

      Context:
      - Guide: https://zkcompression.com/light-token/payments/overview
      - Skills and resources index: https://zkcompression.com/skill.md
      - SPL to Light reference: https://zkcompression.com/api-reference/solana-to-light-comparison
      - Dedicated skill: https://github.com/Lightprotocol/skills/tree/main/skills/payments
      - Packages: @lightprotocol/compressed-token, @lightprotocol/stateless.js
      - Import from @lightprotocol/compressed-token/unified for all interface APIs

      SPL → Light Token API mapping:
      | Operation    | SPL                               | Light Token                              |
      | Receive      | getOrCreateAssociatedTokenAccount() | createLoadAtaInstructions() / loadAta()  |
      | Transfer     | createTransferInstruction()        | createTransferInterfaceInstructions()    |
      | Delegated Transfer | transfer() (delegate signs)  | transferInterface(..., ownerPubkey, delegateSigner, ...) |
      | Get Balance  | getAccount()                      | getAtaInterface()                        |
      | Tx History   | getSignaturesForAddress()         | getSignaturesForOwnerInterface()         |
      | Wrap SPL     | N/A                               | createWrapInstruction() / wrap()         |
      | Unwrap       | N/A                               | createUnwrapInstructions() / unwrap()    |

      ### 1. Index project
      - Grep `@solana/spl-token|@lightprotocol|createTransferInstruction|getAccount|Connection|Keypair|stablecoin|payment` across src/
      - Glob `**/*.ts` and `**/*.tsx` for project structure
      - Identify: RPC setup, existing token operations, payment flow, wallet signing pattern
      - Check package.json for existing @lightprotocol/* or @solana/spl-token dependencies
      - Task subagent (Grep/Read/WebFetch) if project has multiple packages to scan in parallel

      ### 2. Read references
      - WebFetch the guide above — review Instruction and Action tabs for each operation
      - WebFetch skill.md — check for a dedicated skill and resources matching this task
      - TaskCreate one todo per phase below to track progress

      ### 3. Clarify intention
      - AskUserQuestion: what is the goal? (new payment integration, migrate existing SPL payment flow, add alongside existing SPL)
      - AskUserQuestion: which operations? (receive, send, balance, history, wrap, unwrap — or all)
      - AskUserQuestion: instruction-level API (build your own transactions) or action-level API (high-level, fewer lines)?
      - Summarize findings and wait for user confirmation before implementing

      ### 4. Create plan
      - Based on steps 1–3, draft an implementation plan: which files to modify, what code to add, dependency changes
      - Verify existing connection/signer setup is compatible (createRpc with ZK Compression endpoint)
      - Key pattern: import from `@lightprotocol/compressed-token/unified` for all interface APIs
      - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
      - Present the plan to the user for approval before proceeding

      ### 5. Implement
      - Add deps if missing: Bash `npm install @lightprotocol/compressed-token @lightprotocol/stateless.js`
      - Set up RPC: `createRpc(RPC_ENDPOINT)` with a ZK Compression endpoint (Helius, Triton)
      - Import from `@lightprotocol/compressed-token/unified` for the interface APIs
      - Follow the guide and the approved plan
      - Write/Edit to create or modify files
      - TaskUpdate to mark each step done

      ### 6. Verify
      - Bash `tsc --noEmit`
      - Bash run existing test suite if present
      - TaskUpdate to mark complete

      ### Tools
      - mcp__zkcompression__SearchLightProtocol("<query>") for API details
      - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
      - Task subagent with Grep/Read/WebFetch for parallel lookups
      - TaskList to check remaining work

      ### Resources

      Guides:
      - Basic payment: https://zkcompression.com/light-token/payments/basic-payment
      - Batch payments: https://zkcompression.com/light-token/payments/batch-payments
      - Payment with memo: https://zkcompression.com/light-token/payments/payment-with-memo
      - Receive payments: https://zkcompression.com/light-token/payments/receive-payments
      - Verify payments: https://zkcompression.com/light-token/payments/verify-payments
      - Verify recipient address: https://zkcompression.com/light-token/payments/verify-recipient-address
      - Spend permissions: https://zkcompression.com/light-token/payments/spend-permissions
      - Wrap and unwrap: https://zkcompression.com/light-token/payments/wrap-unwrap
      - Production readiness: https://zkcompression.com/light-token/payments/production-readiness
      - FAQ: https://zkcompression.com/faq
      - Sign with Privy: https://zkcompression.com/light-token/wallets/privy
      - Sign with Wallet Adapter: https://zkcompression.com/light-token/wallets/wallet-adapter
      - Gasless transactions: https://zkcompression.com/light-token/wallets/gasless-transactions

      Examples:
      - All payments: https://github.com/Lightprotocol/examples-light-token/tree/main/toolkits/payments
      - Send (instruction): https://github.com/Lightprotocol/examples-light-token/blob/main/toolkits/payments/send/basic-send-instruction.ts
      - Send (action): https://github.com/Lightprotocol/examples-light-token/blob/main/toolkits/payments/send/basic-send-action.ts
      - Batch send: https://github.com/Lightprotocol/examples-light-token/blob/main/toolkits/payments/send/batch-send.ts
      - Payment with memo: https://github.com/Lightprotocol/examples-light-token/blob/main/toolkits/payments/send/payment-with-memo.ts
      - Receive: https://github.com/Lightprotocol/examples-light-token/blob/main/toolkits/payments/receive/receive.ts
      - Get balance: https://github.com/Lightprotocol/examples-light-token/blob/main/toolkits/payments/verify/get-balance.ts
      - Get history: https://github.com/Lightprotocol/examples-light-token/blob/main/toolkits/payments/verify/get-history.ts
      - Verify address: https://github.com/Lightprotocol/examples-light-token/blob/main/toolkits/payments/verify/verify-address.ts
      - Wrap: https://github.com/Lightprotocol/examples-light-token/blob/main/toolkits/payments/interop/wrap.ts
      - Unwrap: https://github.com/Lightprotocol/examples-light-token/blob/main/toolkits/payments/interop/unwrap.ts
      - Privy (Node.js): https://github.com/Lightprotocol/examples-light-token/tree/main/toolkits/sign-with-privy/nodejs
      - Privy (React): https://github.com/Lightprotocol/examples-light-token/tree/main/toolkits/sign-with-privy/react
      - Wallet Adapter (React): https://github.com/Lightprotocol/examples-light-token/tree/main/toolkits/sign-with-wallet-adapter/react
      - Gasless transfer: https://github.com/Lightprotocol/examples-light-token/blob/main/toolkits/gasless-transactions/typescript/gasless-transfer.ts
      ```
    </Accordion>

    <Accordion title="Sign with Wallet Adapter">
      Copy the prompt below or view the [guide](/light-token/wallets/wallet-adapter).

      <Prompt description="Integrate light-token with Solana Wallet Adapter" actions={["copy", "cursor"]}>
        {`---
                description: Integrate light-token with Solana Wallet Adapter
                allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
                ---

                ## Integrate light-token with Solana Wallet Adapter

                Context:
                - Guide: https://zkcompression.com/light-token/wallets/wallet-adapter
                - Skills and resources index: https://zkcompression.com/skill.md
                - SPL to Light reference: https://zkcompression.com/api-reference/solana-to-light-comparison
                - Dedicated skill: https://github.com/Lightprotocol/skills/tree/main/skills/payments
                - Packages: @lightprotocol/compressed-token, @lightprotocol/stateless.js
                - React example: https://github.com/Lightprotocol/examples-light-token/tree/main/toolkits/sign-with-wallet-adapter/react

                SPL → Light Token API mapping:
                | Operation        | SPL                          | Light Token                              |
                | Transfer         | createTransferInstruction()  | createTransferInterfaceInstructions()    |
                | Wrap SPL→Light   | N/A                          | createWrapInstruction()                  |
                | Unwrap Light→SPL | N/A                          | createUnwrapInstructions()               |
                | Get balance      | getAccount()                 | getAtaInterface()                        |
                | Tx history       | getSignaturesForAddress()    | getSignaturesForOwnerInterface()         |

                ### 1. Index project
                - Grep \`wallet-adapter|useWallet|WalletProvider|useConnection|createTransferInstruction|@solana/spl-token|Connection\` across src/
                - Glob \`**/*.ts\` and \`**/*.tsx\` for project structure
                - Identify: wallet adapter packages, existing wallet setup, RPC config, token operations
                - Check package.json for existing @lightprotocol/* or @solana/spl-token dependencies
                - Task subagent (Grep/Read/WebFetch) if project has multiple packages to scan in parallel

                ### 2. Read references
                - WebFetch the guide above — review the React code examples
                - WebFetch skill.md — check for a dedicated skill and resources matching this task
                - TaskCreate one todo per phase below to track progress

                ### 3. Clarify intention
                - AskUserQuestion: what is the goal? (new wallet adapter integration, migrate existing wallet-adapter+SPL code, add light-token alongside existing SPL)
                - AskUserQuestion: which operations? (transfer, wrap, unwrap, balances, tx history — or all)
                - Summarize findings and wait for user confirmation before implementing

                ### 4. Create plan
                - Based on steps 1–3, draft an implementation plan: which files to modify, what code to add, dependency changes
                - Verify existing wallet adapter setup is compatible (signTransaction pattern from useWallet)
                - Key integration pattern: build unsigned tx with light-token SDK → sign with \`signTransaction\` from \`useWallet()\` → send to RPC
                - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
                - Present the plan to the user for approval before proceeding

                ### 5. Implement
                - Add deps if missing: Bash \`npm install @lightprotocol/compressed-token @lightprotocol/stateless.js\`
                - Set up RPC: \`createRpc(RPC_ENDPOINT)\` with a ZK Compression endpoint (Helius, Triton)
                - Import from \`@lightprotocol/compressed-token/unified\` for the interface APIs
                - Use \`useWallet()\` to get \`publicKey\` and \`signTransaction\`
                - Follow the guide and the approved plan
                - Write/Edit to create or modify files
                - TaskUpdate to mark each step done

                ### 6. Verify
                - Bash \`tsc --noEmit\`
                - Bash run existing test suite if present
                - TaskUpdate to mark complete

                ### Tools
                - mcp__zkcompression__SearchLightProtocol("<query>") for API details
                - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
                - Task subagent with Grep/Read/WebFetch for parallel lookups
                - TaskList to check remaining work`}
      </Prompt>

      ```text theme={null}
      ---
      description: Integrate light-token with Solana Wallet Adapter
      allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
      ---

      ## Integrate light-token with Solana Wallet Adapter

      Context:
      - Guide: https://zkcompression.com/light-token/wallets/wallet-adapter
      - Skills and resources index: https://zkcompression.com/skill.md
      - SPL to Light reference: https://zkcompression.com/api-reference/solana-to-light-comparison
      - Dedicated skill: https://github.com/Lightprotocol/skills/tree/main/skills/payments
      - Packages: @lightprotocol/compressed-token, @lightprotocol/stateless.js
      - React example: https://github.com/Lightprotocol/examples-light-token/tree/main/toolkits/sign-with-wallet-adapter/react

      SPL → Light Token API mapping:
      | Operation        | SPL                          | Light Token                              |
      | Transfer         | createTransferInstruction()  | createTransferInterfaceInstructions()    |
      | Wrap SPL→Light   | N/A                          | createWrapInstruction()                  |
      | Unwrap Light→SPL | N/A                          | createUnwrapInstructions()               |
      | Get balance      | getAccount()                 | getAtaInterface()                        |
      | Tx history       | getSignaturesForAddress()    | getSignaturesForOwnerInterface()         |

      ### 1. Index project
      - Grep `wallet-adapter|useWallet|WalletProvider|useConnection|createTransferInstruction|@solana/spl-token|Connection` across src/
      - Glob `**/*.ts` and `**/*.tsx` for project structure
      - Identify: wallet adapter packages, existing wallet setup, RPC config, token operations
      - Check package.json for existing @lightprotocol/* or @solana/spl-token dependencies
      - Task subagent (Grep/Read/WebFetch) if project has multiple packages to scan in parallel

      ### 2. Read references
      - WebFetch the guide above — review the React code examples
      - WebFetch skill.md — check for a dedicated skill and resources matching this task
      - TaskCreate one todo per phase below to track progress

      ### 3. Clarify intention
      - AskUserQuestion: what is the goal? (new wallet adapter integration, migrate existing wallet-adapter+SPL code, add light-token alongside existing SPL)
      - AskUserQuestion: which operations? (transfer, wrap, unwrap, balances, tx history — or all)
      - Summarize findings and wait for user confirmation before implementing

      ### 4. Create plan
      - Based on steps 1–3, draft an implementation plan: which files to modify, what code to add, dependency changes
      - Verify existing wallet adapter setup is compatible (signTransaction pattern from useWallet)
      - Key integration pattern: build unsigned tx with light-token SDK → sign with `signTransaction` from `useWallet()` → send to RPC
      - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
      - Present the plan to the user for approval before proceeding

      ### 5. Implement
      - Add deps if missing: Bash `npm install @lightprotocol/compressed-token @lightprotocol/stateless.js`
      - Set up RPC: `createRpc(RPC_ENDPOINT)` with a ZK Compression endpoint (Helius, Triton)
      - Import from `@lightprotocol/compressed-token/unified` for the interface APIs
      - Use `useWallet()` to get `publicKey` and `signTransaction`
      - Follow the guide and the approved plan
      - Write/Edit to create or modify files
      - TaskUpdate to mark each step done

      ### 6. Verify
      - Bash `tsc --noEmit`
      - Bash run existing test suite if present
      - TaskUpdate to mark complete

      ### Tools
      - mcp__zkcompression__SearchLightProtocol("<query>") for API details
      - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
      - Task subagent with Grep/Read/WebFetch for parallel lookups
      - TaskList to check remaining work
      ```
    </Accordion>

    <Accordion title="Sign with Privy">
      Copy the prompt below or view the [guide](/light-token/wallets/privy).

      <Prompt description="Integrate light-token with Privy embedded wallets" actions={["copy", "cursor"]}>
        {`---
                description: Integrate light-token with Privy embedded wallets
                allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
                ---

                ## Integrate light-token with Privy embedded wallets

                Context:
                - Guide: https://zkcompression.com/light-token/wallets/privy
                - Skills and resources index: https://zkcompression.com/skill.md
                - SPL to Light reference: https://zkcompression.com/api-reference/solana-to-light-comparison
                - Dedicated skill: https://github.com/Lightprotocol/skills/tree/main/skills/payments
                - Packages: @lightprotocol/compressed-token, @lightprotocol/stateless.js
                - Node.js example: https://github.com/Lightprotocol/examples-light-token/tree/main/toolkits/sign-with-privy/nodejs
                - React example: https://github.com/Lightprotocol/examples-light-token/tree/main/toolkits/sign-with-privy/react

                SPL → Light Token API mapping:
                | Operation        | SPL                          | Light Token                              |
                | Transfer         | createTransferInstruction()  | createTransferInterfaceInstructions()    |
                | Receive          | getOrCreateAssociatedTokenAccount() | createLoadAtaInstructions()       |
                | Wrap SPL→Light   | N/A                          | createWrapInstruction()                  |
                | Unwrap Light→SPL | N/A                          | createUnwrapInstructions()               |
                | Get balance      | getAccount()                 | getAtaInterface()                        |
                | Tx history       | getSignaturesForAddress()    | getSignaturesForOwnerInterface()         |

                ### 1. Index project
                - Grep \`privy|@privy-io|usePrivy|PrivyProvider|createTransferInstruction|@solana/spl-token|Connection\` across src/
                - Glob \`**/*.ts\` and \`**/*.tsx\` for project structure
                - Identify: Privy SDK version, existing wallet setup, RPC config, token operations
                - Check package.json for existing @lightprotocol/* or @solana/spl-token dependencies
                - Task subagent (Grep/Read/WebFetch) if project has multiple packages to scan in parallel

                ### 2. Read references
                - WebFetch the guide above — review both Node.js and React code examples
                - WebFetch skill.md — check for a dedicated skill and resources matching this task
                - TaskCreate one todo per phase below to track progress

                ### 3. Clarify intention
                - AskUserQuestion: Node.js or React?
                - AskUserQuestion: what is the goal? (new Privy integration, migrate existing Privy+SPL code, add light-token alongside existing SPL)
                - AskUserQuestion: which operations? (transfer, wrap, unwrap, balances, tx history — or all)
                - Summarize findings and wait for user confirmation before implementing

                ### 4. Create plan
                - Based on steps 1–3, draft an implementation plan: which files to modify, what code to add, dependency changes
                - Verify existing Privy wallet setup is compatible (signTransaction or sendTransaction pattern)
                - Key integration pattern: build unsigned tx with light-token SDK → sign with Privy → send to RPC
                - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
                - Present the plan to the user for approval before proceeding

                ### 5. Implement
                - Add deps if missing: Bash \`npm install @lightprotocol/compressed-token @lightprotocol/stateless.js\`
                - Set up RPC: \`createRpc(RPC_ENDPOINT)\` with a ZK Compression endpoint (Helius, Triton)
                - Import from \`@lightprotocol/compressed-token/unified\` for the interface APIs
                - Follow the guide and the approved plan
                - Write/Edit to create or modify files
                - TaskUpdate to mark each step done

                ### 6. Verify
                - Bash \`tsc --noEmit\`
                - Bash run existing test suite if present
                - TaskUpdate to mark complete

                ### Tools
                - mcp__zkcompression__SearchLightProtocol("<query>") for API details
                - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
                - Task subagent with Grep/Read/WebFetch for parallel lookups
                - TaskList to check remaining work`}
      </Prompt>

      ```text theme={null}
      ---
      description: Integrate light-token with Privy embedded wallets
      allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
      ---

      ## Integrate light-token with Privy embedded wallets

      Context:
      - Guide: https://zkcompression.com/light-token/wallets/privy
      - Skills and resources index: https://zkcompression.com/skill.md
      - SPL to Light reference: https://zkcompression.com/api-reference/solana-to-light-comparison
      - Dedicated skill: https://github.com/Lightprotocol/skills/tree/main/skills/payments
      - Packages: @lightprotocol/compressed-token, @lightprotocol/stateless.js
      - Node.js example: https://github.com/Lightprotocol/examples-light-token/tree/main/toolkits/sign-with-privy/nodejs
      - React example: https://github.com/Lightprotocol/examples-light-token/tree/main/toolkits/sign-with-privy/react

      SPL → Light Token API mapping:
      | Operation        | SPL                          | Light Token                              |
      | Transfer         | createTransferInstruction()  | createTransferInterfaceInstructions()    |
      | Receive          | getOrCreateAssociatedTokenAccount() | createLoadAtaInstructions()       |
      | Wrap SPL→Light   | N/A                          | createWrapInstruction()                  |
      | Unwrap Light→SPL | N/A                          | createUnwrapInstructions()               |
      | Get balance      | getAccount()                 | getAtaInterface()                        |
      | Tx history       | getSignaturesForAddress()    | getSignaturesForOwnerInterface()         |

      ### 1. Index project
      - Grep `privy|@privy-io|usePrivy|PrivyProvider|createTransferInstruction|@solana/spl-token|Connection` across src/
      - Glob `**/*.ts` and `**/*.tsx` for project structure
      - Identify: Privy SDK version, existing wallet setup, RPC config, token operations
      - Check package.json for existing @lightprotocol/* or @solana/spl-token dependencies
      - Task subagent (Grep/Read/WebFetch) if project has multiple packages to scan in parallel

      ### 2. Read references
      - WebFetch the guide above — review both Node.js and React code examples
      - WebFetch skill.md — check for a dedicated skill and resources matching this task
      - TaskCreate one todo per phase below to track progress

      ### 3. Clarify intention
      - AskUserQuestion: Node.js or React?
      - AskUserQuestion: what is the goal? (new Privy integration, migrate existing Privy+SPL code, add light-token alongside existing SPL)
      - AskUserQuestion: which operations? (transfer, wrap, unwrap, balances, tx history — or all)
      - Summarize findings and wait for user confirmation before implementing

      ### 4. Create plan
      - Based on steps 1–3, draft an implementation plan: which files to modify, what code to add, dependency changes
      - Verify existing Privy wallet setup is compatible (signTransaction or sendTransaction pattern)
      - Key integration pattern: build unsigned tx with light-token SDK → sign with Privy → send to RPC
      - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
      - Present the plan to the user for approval before proceeding

      ### 5. Implement
      - Add deps if missing: Bash `npm install @lightprotocol/compressed-token @lightprotocol/stateless.js`
      - Set up RPC: `createRpc(RPC_ENDPOINT)` with a ZK Compression endpoint (Helius, Triton)
      - Import from `@lightprotocol/compressed-token/unified` for the interface APIs
      - Follow the guide and the approved plan
      - Write/Edit to create or modify files
      - TaskUpdate to mark each step done

      ### 6. Verify
      - Bash `tsc --noEmit`
      - Bash run existing test suite if present
      - TaskUpdate to mark complete

      ### Tools
      - mcp__zkcompression__SearchLightProtocol("<query>") for API details
      - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
      - Task subagent with Grep/Read/WebFetch for parallel lookups
      - TaskList to check remaining work
      ```
    </Accordion>

    <Accordion title="Gasless transactions">
      Copy the prompt below or view the [guide](/light-token/wallets/gasless-transactions).

      <Prompt description="Gasless transactions for Light Token users" actions={["copy", "cursor"]}>
        {`---
                description: Gasless transactions for Light Token users
                allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
                ---

                ## Gasless transactions for Light Token users

                Context:
                - Guide: https://zkcompression.com/light-token/wallets/gasless-transactions
                - Skills and resources index: https://zkcompression.com/skill.md
                - SPL to Light reference: https://zkcompression.com/api-reference/solana-to-light-comparison
                - Dedicated skill: https://github.com/Lightprotocol/skills/tree/main/skills/payments
                - Packages: @lightprotocol/compressed-token, @lightprotocol/stateless.js

                How rent sponsorship works:
                - A rent sponsor PDA pays the rent-exemption cost on account creation so creators never lock up SOL
                - The fee payer bumps a small virtual rent balance (766 lamports) on each write to keep the account active (hot)
                - Set your application as the fee payer so users never pay rent or top-ups

                Key APIs:
                | Language   | Function                                        | Payer parameter                           |
                | TypeScript | createLightTokenTransferInstruction()            | 5th argument: \`sponsor.publicKey\`         |
                | TypeScript | createAtaInterface()                             | 2nd argument: \`sponsor\` (Keypair)         |
                | Rust       | TransferInterface { ..., payer: sponsor.pubkey() } | \`payer\` field                           |
                | Rust       | CreateAssociatedTokenAccount::new(sponsor, ...)  | 1st argument: sponsor pubkey              |

                ### 1. Index project
                - Grep \`feePayer|payer|createTransferInstruction|createLightTokenTransferInstruction|@lightprotocol|@solana/spl-token|Connection\` across src/
                - Glob \`**/*.ts\` and \`**/*.tsx\` for project structure
                - Identify: existing token operations, RPC config, fee payer setup, signing flow
                - Check package.json for existing @lightprotocol/* dependencies
                - Task subagent (Grep/Read/WebFetch) if project has multiple packages to scan in parallel

                ### 2. Read references
                - WebFetch the guide above — review TypeScript and Rust code examples
                - WebFetch skill.md — check for a dedicated skill and resources matching this task
                - TaskCreate one todo per phase below to track progress

                ### 3. Clarify intention
                - AskUserQuestion: what is the goal? (add sponsored top-ups to existing light-token code, new integration from scratch, migrate from user-pays to sponsor-pays)
                - AskUserQuestion: TypeScript or Rust client?
                - AskUserQuestion: which operations need sponsoring? (transfers only, ATA creation + transfers, all write operations)
                - Summarize findings and wait for user confirmation before implementing

                ### 4. Create plan
                - Based on steps 1–3, draft an implementation plan: which files to modify, what code to add, dependency changes
                - Key pattern: set the \`payer\` parameter to the sponsor's public key on transfer and ATA creation instructions
                - The sponsor Keypair must sign the transaction alongside the user
                - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
                - Present the plan to the user for approval before proceeding

                ### 5. Implement
                - Add deps if missing: Bash \`npm install @lightprotocol/compressed-token @lightprotocol/stateless.js\`
                - Set up RPC: \`createRpc(RPC_ENDPOINT)\` with a ZK Compression endpoint (Helius, Triton)
                - Import from \`@lightprotocol/compressed-token\` for the token APIs
                - Set sponsor as payer: \`createLightTokenTransferInstruction(senderAta, recipientAta, sender.publicKey, amount, sponsor.publicKey)\`
                - Sign with both sponsor and sender: \`sendAndConfirmTransaction(rpc, tx, [sponsor, sender])\`
                - Follow the guide and the approved plan
                - Write/Edit to create or modify files
                - TaskUpdate to mark each step done

                ### 6. Verify
                - Bash \`tsc --noEmit\`
                - Bash run existing test suite if present
                - TaskUpdate to mark complete

                ### Tools
                - mcp__zkcompression__SearchLightProtocol("<query>") for API details
                - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
                - Task subagent with Grep/Read/WebFetch for parallel lookups
                - TaskList to check remaining work`}
      </Prompt>

      ```text theme={null}
      ---
      description: Gasless transactions for Light Token users
      allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
      ---

      ## Gasless transactions for Light Token users

      Context:
      - Guide: https://zkcompression.com/light-token/wallets/gasless-transactions
      - Skills and resources index: https://zkcompression.com/skill.md
      - SPL to Light reference: https://zkcompression.com/api-reference/solana-to-light-comparison
      - Dedicated skill: https://github.com/Lightprotocol/skills/tree/main/skills/payments
      - Packages: @lightprotocol/compressed-token, @lightprotocol/stateless.js

      How rent sponsorship works:
      - A rent sponsor PDA pays the rent-exemption cost on account creation so creators never lock up SOL
      - The fee payer bumps a small virtual rent balance (766 lamports) on each write to keep the account active (hot)
      - Set your application as the fee payer so users never pay rent or top-ups

      Key APIs:
      | Language   | Function                                        | Payer parameter                           |
      | TypeScript | createLightTokenTransferInstruction()            | 5th argument: `sponsor.publicKey`         |
      | TypeScript | createAtaInterface()                             | 2nd argument: `sponsor` (Keypair)         |
      | Rust       | TransferInterface { ..., payer: sponsor.pubkey() } | `payer` field                           |
      | Rust       | CreateAssociatedTokenAccount::new(sponsor, ...)  | 1st argument: sponsor pubkey              |

      ### 1. Index project
      - Grep `feePayer|payer|createTransferInstruction|createLightTokenTransferInstruction|@lightprotocol|@solana/spl-token|Connection` across src/
      - Glob `**/*.ts` and `**/*.tsx` for project structure
      - Identify: existing token operations, RPC config, fee payer setup, signing flow
      - Check package.json for existing @lightprotocol/* dependencies
      - Task subagent (Grep/Read/WebFetch) if project has multiple packages to scan in parallel

      ### 2. Read references
      - WebFetch the guide above — review TypeScript and Rust code examples
      - WebFetch skill.md — check for a dedicated skill and resources matching this task
      - TaskCreate one todo per phase below to track progress

      ### 3. Clarify intention
      - AskUserQuestion: what is the goal? (add sponsored top-ups to existing light-token code, new integration from scratch, migrate from user-pays to sponsor-pays)
      - AskUserQuestion: TypeScript or Rust client?
      - AskUserQuestion: which operations need sponsoring? (transfers only, ATA creation + transfers, all write operations)
      - Summarize findings and wait for user confirmation before implementing

      ### 4. Create plan
      - Based on steps 1–3, draft an implementation plan: which files to modify, what code to add, dependency changes
      - Key pattern: set the `payer` parameter to the sponsor's public key on transfer and ATA creation instructions
      - The sponsor Keypair must sign the transaction alongside the user
      - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
      - Present the plan to the user for approval before proceeding

      ### 5. Implement
      - Add deps if missing: Bash `npm install @lightprotocol/compressed-token @lightprotocol/stateless.js`
      - Set up RPC: `createRpc(RPC_ENDPOINT)` with a ZK Compression endpoint (Helius, Triton)
      - Import from `@lightprotocol/compressed-token` for the token APIs
      - Set sponsor as payer: `createLightTokenTransferInstruction(senderAta, recipientAta, sender.publicKey, amount, sponsor.publicKey)`
      - Sign with both sponsor and sender: `sendAndConfirmTransaction(rpc, tx, [sponsor, sender])`
      - Follow the guide and the approved plan
      - Write/Edit to create or modify files
      - TaskUpdate to mark each step done

      ### 6. Verify
      - Bash `tsc --noEmit`
      - Bash run existing test suite if present
      - TaskUpdate to mark complete

      ### Tools
      - mcp__zkcompression__SearchLightProtocol("<query>") for API details
      - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
      - Task subagent with Grep/Read/WebFetch for parallel lookups
      - TaskList to check remaining work
      ```
    </Accordion>

    <Accordion title="Nullifier PDAs">
      Copy the prompt below or view the [guide](/pda/compressed-pdas/nullifier-pda).

      <Prompt description="Create rent-free nullifier PDAs to prevent duplicate actions" actions={["copy", "cursor"]}>
        {`---
                description: Create rent-free nullifier PDAs to prevent duplicate actions
                allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
                ---

                ## Create rent-free nullifier PDAs to prevent duplicate actions

                Context:
                - Guide: https://zkcompression.com/pda/compressed-pdas/nullifier-pda
                - Skills and resources index: https://zkcompression.com/skill.md
                - Dedicated skill: https://github.com/Lightprotocol/skills/tree/main/skills/zk-nullifier
                - Rust crates: light-nullifier-program, light-client
                - TS packages: @lightprotocol/nullifier-program, @lightprotocol/stateless.js
                - Example: https://github.com/Lightprotocol/examples-light-token/blob/main/rust-client/actions/create_nullifier.rs
                - Program source: https://github.com/Lightprotocol/nullifier-program/

                Key APIs:
                - Rust: create_nullifier_ix(), fetch_proof(), build_instruction(), derive_nullifier_address()
                - TS: createNullifierIx(), fetchProof(), buildInstruction(), deriveNullifierAddress()

                ### 1. Index project
                - Grep \`nullifier|create_nullifier|createNullifierIx|deriveNullifierAddress|NFLx5WGPrTHHvdRNsidcrNcLxRruMC92E4yv7zhZBoT\` across src/
                - Glob \`**/*.rs\` and \`**/*.ts\` for project structure
                - Identify: existing transaction building, duplicate prevention logic, payment flow
                - Check Cargo.toml or package.json for existing light-* dependencies
                - Task subagent (Grep/Read/WebFetch) if project has multiple packages to scan in parallel

                ### 2. Read references
                - WebFetch the guide above — review both Rust and TS code samples
                - WebFetch skill.md — check for a dedicated skill and resources matching this task
                - TaskCreate one todo per phase below to track progress

                ### 3. Clarify intention
                - AskUserQuestion: Rust or TypeScript?
                - AskUserQuestion: what is the goal? (prevent duplicate payments, idempotent instruction execution, other use case)
                - AskUserQuestion: do you need the helper (create_nullifier_ix) or manual proof fetching (fetch_proof + build_instruction)?
                - Summarize findings and wait for user confirmation before implementing

                ### 4. Create plan
                - Based on steps 1–3, draft an implementation plan: which files to modify, what code to add, dependency changes
                - Follow the guide's pattern: create unique 32-byte ID → build nullifier instruction → prepend to transaction
                - If checking existence is needed, add derive_nullifier_address + get_compressed_account check
                - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
                - Present the plan to the user for approval before proceeding

                ### 5. Implement
                - For Rust: Bash \`cargo add light-nullifier-program@0.1 light-client@0.23\`
                - For TypeScript: Bash \`npm install @lightprotocol/nullifier-program @lightprotocol/stateless.js@^0.23.0\`
                - Follow the guide and the approved plan
                - Write/Edit to create or modify files
                - TaskUpdate to mark each step done

                ### 6. Verify
                - Rust: Bash \`cargo check\` + \`cargo test\` if tests exist
                - TypeScript: Bash \`tsc --noEmit\` + run existing test suite if present
                - TaskUpdate to mark complete

                ### Tools
                - mcp__zkcompression__SearchLightProtocol("<query>") for API details
                - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
                - Task subagent with Grep/Read/WebFetch for parallel lookups
                - TaskList to check remaining work`}
      </Prompt>

      ```text theme={null}
      ---
      description: Create rent-free nullifier PDAs to prevent duplicate actions
      allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
      ---

      ## Create rent-free nullifier PDAs to prevent duplicate actions

      Context:
      - Guide: https://zkcompression.com/pda/compressed-pdas/nullifier-pda
      - Skills and resources index: https://zkcompression.com/skill.md
      - Dedicated skill: https://github.com/Lightprotocol/skills/tree/main/skills/zk-nullifier
      - Rust crates: light-nullifier-program, light-client
      - TS packages: @lightprotocol/nullifier-program, @lightprotocol/stateless.js
      - Example: https://github.com/Lightprotocol/examples-light-token/blob/main/rust-client/actions/create_nullifier.rs
      - Program source: https://github.com/Lightprotocol/nullifier-program/

      Key APIs:
      - Rust: create_nullifier_ix(), fetch_proof(), build_instruction(), derive_nullifier_address()
      - TS: createNullifierIx(), fetchProof(), buildInstruction(), deriveNullifierAddress()

      ### 1. Index project
      - Grep `nullifier|create_nullifier|createNullifierIx|deriveNullifierAddress|NFLx5WGPrTHHvdRNsidcrNcLxRruMC92E4yv7zhZBoT` across src/
      - Glob `**/*.rs` and `**/*.ts` for project structure
      - Identify: existing transaction building, duplicate prevention logic, payment flow
      - Check Cargo.toml or package.json for existing light-* dependencies
      - Task subagent (Grep/Read/WebFetch) if project has multiple packages to scan in parallel

      ### 2. Read references
      - WebFetch the guide above — review both Rust and TS code samples
      - WebFetch skill.md — check for a dedicated skill and resources matching this task
      - TaskCreate one todo per phase below to track progress

      ### 3. Clarify intention
      - AskUserQuestion: Rust or TypeScript?
      - AskUserQuestion: what is the goal? (prevent duplicate payments, idempotent instruction execution, other use case)
      - AskUserQuestion: do you need the helper (create_nullifier_ix) or manual proof fetching (fetch_proof + build_instruction)?
      - Summarize findings and wait for user confirmation before implementing

      ### 4. Create plan
      - Based on steps 1–3, draft an implementation plan: which files to modify, what code to add, dependency changes
      - Follow the guide's pattern: create unique 32-byte ID → build nullifier instruction → prepend to transaction
      - If checking existence is needed, add derive_nullifier_address + get_compressed_account check
      - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
      - Present the plan to the user for approval before proceeding

      ### 5. Implement
      - For Rust: Bash `cargo add light-nullifier-program@0.1 light-client@0.23`
      - For TypeScript: Bash `npm install @lightprotocol/nullifier-program @lightprotocol/stateless.js@^0.23.0`
      - Follow the guide and the approved plan
      - Write/Edit to create or modify files
      - TaskUpdate to mark each step done

      ### 6. Verify
      - Rust: Bash `cargo check` + `cargo test` if tests exist
      - TypeScript: Bash `tsc --noEmit` + run existing test suite if present
      - TaskUpdate to mark complete

      ### Tools
      - mcp__zkcompression__SearchLightProtocol("<query>") for API details
      - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
      - Task subagent with Grep/Read/WebFetch for parallel lookups
      - TaskList to check remaining work
      ```
    </Accordion>

    ## Light Token Recipes

    {/* rust-cookbook */}

    <Accordion title="Create mint">
      Copy the prompt below or view the [guide](/light-token/cookbook/create-mint).

      <Tabs>
        <Tab title="TypeScript Client">
          <Prompt description="Add rent-free mint with token metadata" actions={["copy", "cursor"]}>
            {`---
                        description: Add rent-free mint with token metadata
                        allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
                        ---

                        ## Add rent-free mint with token metadata

                        Context:
                        - Guide: https://zkcompression.com/light-token/cookbook/create-mint
                        - Skills and resources index: https://zkcompression.com/skill.md
                        - SPL to Light reference: https://zkcompression.com/api-reference/solana-to-light-comparison
                        - Packages: @lightprotocol/compressed-token, @lightprotocol/stateless.js

                        SPL equivalent: createMint() → Light Token: createMintInterface()

                        ### 1. Index project
                        - Grep \`@solana/spl-token|Connection|Keypair|createMint\` across src/
                        - Glob \`**/*.ts\` for project structure
                        - Identify: RPC setup, existing mint logic, entry point for mint creation
                        - Task subagent (Grep/Read/WebFetch) if project has multiple packages to scan in parallel

                        ### 2. Read references
                        - WebFetch the guide above — follow the TypeScript Client tab
                        - WebFetch skill.md — check for a dedicated skill and resources matching this task
                        - TaskCreate one todo per phase below to track progress

                        ### 3. Clarify intention
                        - AskUserQuestion: what is the goal? (new feature, migrate existing SPL code, add alongside existing)
                        - AskUserQuestion: does the project already have mint operations to extend, or is this greenfield?
                        - Summarize findings and wait for user confirmation before implementing

                        ### 4. Create plan
                        - Based on steps 1–3, draft an implementation plan: which files to modify, what code to add, dependency changes
                        - Verify existing connection/signer setup is compatible with the cookbook prerequisites
                        - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
                        - Present the plan to the user for approval before proceeding

                        ### 5. Implement
                        - Add deps if missing: Bash \`npm install @lightprotocol/compressed-token @lightprotocol/stateless.js\`
                        - Follow the cookbook guide and the approved plan
                        - Write/Edit to create or modify files
                        - TaskUpdate to mark each step done

                        ### 6. Verify
                        - Bash \`tsc --noEmit\`
                        - Bash run existing test suite if present
                        - TaskUpdate to mark complete

                        ### Tools
                        - mcp__zkcompression__SearchLightProtocol("<query>") for API details
                        - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
                        - Task subagent with Grep/Read/WebFetch for parallel lookups
                        - TaskList to check remaining work`}
          </Prompt>

          ```text theme={null}
          ---
          description: Add rent-free mint with token metadata
          allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
          ---

          ## Add rent-free mint with token metadata

          Context:
          - Guide: https://zkcompression.com/light-token/cookbook/create-mint
          - Skills and resources index: https://zkcompression.com/skill.md
          - SPL to Light reference: https://zkcompression.com/api-reference/solana-to-light-comparison
          - Packages: @lightprotocol/compressed-token, @lightprotocol/stateless.js

          SPL equivalent: createMint() → Light Token: createMintInterface()

          ### 1. Index project
          - Grep `@solana/spl-token|Connection|Keypair|createMint` across src/
          - Glob `**/*.ts` for project structure
          - Identify: RPC setup, existing mint logic, entry point for mint creation
          - Task subagent (Grep/Read/WebFetch) if project has multiple packages to scan in parallel

          ### 2. Read references
          - WebFetch the guide above — follow the TypeScript Client tab
          - WebFetch skill.md — check for a dedicated skill and resources matching this task
          - TaskCreate one todo per phase below to track progress

          ### 3. Clarify intention
          - AskUserQuestion: what is the goal? (new feature, migrate existing SPL code, add alongside existing)
          - AskUserQuestion: does the project already have mint operations to extend, or is this greenfield?
          - Summarize findings and wait for user confirmation before implementing

          ### 4. Create plan
          - Based on steps 1–3, draft an implementation plan: which files to modify, what code to add, dependency changes
          - Verify existing connection/signer setup is compatible with the cookbook prerequisites
          - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
          - Present the plan to the user for approval before proceeding

          ### 5. Implement
          - Add deps if missing: Bash `npm install @lightprotocol/compressed-token @lightprotocol/stateless.js`
          - Follow the cookbook guide and the approved plan
          - Write/Edit to create or modify files
          - TaskUpdate to mark each step done

          ### 6. Verify
          - Bash `tsc --noEmit`
          - Bash run existing test suite if present
          - TaskUpdate to mark complete

          ### Tools
          - mcp__zkcompression__SearchLightProtocol("<query>") for API details
          - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
          - Task subagent with Grep/Read/WebFetch for parallel lookups
          - TaskList to check remaining work
          ```
        </Tab>

        <Tab title="Rust Client">
          <Prompt description="Create rent-free mint with token metadata" actions={["copy", "cursor"]}>
            {`---
                        description: Create rent-free mint with token metadata
                        allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
                        ---

                        ## Create rent-free mint with token metadata

                        Context:
                        - Guide: https://zkcompression.com/light-token/cookbook/create-mint
                        - Skills and resources index: https://zkcompression.com/skill.md
                        - SPL to Light reference: https://zkcompression.com/api-reference/solana-to-light-comparison
                        - Crates: light-token-client (actions), light-token (instructions), light-client (RPC)

                        SPL equivalent: spl_token::instruction::initialize_mint → Light Token: CreateMint

                        ### 1. Index project
                        - Grep \`light_token::|light_token_client::|solana_sdk|Keypair|async|CreateMint|initialize_mint\` across src/
                        - Glob \`**/*.rs\` for project structure
                        - Identify: RPC setup, existing token ops, entry point for mint creation
                        - Check Cargo.toml for existing light-* dependencies and solana-sdk version
                        - Task subagent (Grep/Read/WebFetch) if project has multiple crates to scan in parallel

                        ### 2. Read references
                        - WebFetch the guide above — follow the Rust Client tab
                        - WebFetch skill.md — check for a dedicated skill and resources matching this task
                        - TaskCreate one todo per phase below to track progress

                        ### 3. Clarify intention
                        - AskUserQuestion: what is the goal? (new feature, migrate existing SPL code, add alongside existing)
                        - AskUserQuestion: does the project already have mint operations to extend, or is this greenfield?
                        - AskUserQuestion: action-level API (high-level, fewer lines) or instruction-level API (low-level, full control)?
                        - Summarize findings and wait for user confirmation before implementing

                        ### 4. Create plan
                        - Based on steps 1–3, draft an implementation plan: which files to modify, what code to add, dependency changes
                        - Verify existing Rpc/signer setup is compatible with the cookbook prerequisites (light_client::rpc::Rpc, solana_sdk::signature::Keypair)
                        - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
                        - Present the plan to the user for approval before proceeding

                        ### 5. Implement
                        - Add deps if missing: Bash \`cargo add light-token-client light-token light-client --features light-client/v2\`
                        - Follow the cookbook guide and the approved plan
                        - Write/Edit to create or modify files
                        - TaskUpdate to mark each step done

                        ### 6. Verify
                        - Bash \`cargo check\`
                        - Bash \`cargo test\` if tests exist
                        - TaskUpdate to mark complete

                        ### Tools
                        - mcp__zkcompression__SearchLightProtocol("<query>") for API details
                        - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
                        - Task subagent with Grep/Read/WebFetch for parallel lookups
                        - TaskList to check remaining work`}
          </Prompt>

          ```text theme={null}
          ---
          description: Create rent-free mint with token metadata
          allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
          ---

          ## Create rent-free mint with token metadata

          Context:
          - Guide: https://zkcompression.com/light-token/cookbook/create-mint
          - Skills and resources index: https://zkcompression.com/skill.md
          - SPL to Light reference: https://zkcompression.com/api-reference/solana-to-light-comparison
          - Crates: light-token-client (actions), light-token (instructions), light-client (RPC)

          SPL equivalent: spl_token::instruction::initialize_mint → Light Token: CreateMint

          ### 1. Index project
          - Grep `light_token::|light_token_client::|solana_sdk|Keypair|async|CreateMint|initialize_mint` across src/
          - Glob `**/*.rs` for project structure
          - Identify: RPC setup, existing token ops, entry point for mint creation
          - Check Cargo.toml for existing light-* dependencies and solana-sdk version
          - Task subagent (Grep/Read/WebFetch) if project has multiple crates to scan in parallel

          ### 2. Read references
          - WebFetch the guide above — follow the Rust Client tab
          - WebFetch skill.md — check for a dedicated skill and resources matching this task
          - TaskCreate one todo per phase below to track progress

          ### 3. Clarify intention
          - AskUserQuestion: what is the goal? (new feature, migrate existing SPL code, add alongside existing)
          - AskUserQuestion: does the project already have mint operations to extend, or is this greenfield?
          - AskUserQuestion: action-level API (high-level, fewer lines) or instruction-level API (low-level, full control)?
          - Summarize findings and wait for user confirmation before implementing

          ### 4. Create plan
          - Based on steps 1–3, draft an implementation plan: which files to modify, what code to add, dependency changes
          - Verify existing Rpc/signer setup is compatible with the cookbook prerequisites (light_client::rpc::Rpc, solana_sdk::signature::Keypair)
          - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
          - Present the plan to the user for approval before proceeding

          ### 5. Implement
          - Add deps if missing: Bash `cargo add light-token-client light-token light-client --features light-client/v2`
          - Follow the cookbook guide and the approved plan
          - Write/Edit to create or modify files
          - TaskUpdate to mark each step done

          ### 6. Verify
          - Bash `cargo check`
          - Bash `cargo test` if tests exist
          - TaskUpdate to mark complete

          ### Tools
          - mcp__zkcompression__SearchLightProtocol("<query>") for API details
          - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
          - Task subagent with Grep/Read/WebFetch for parallel lookups
          - TaskList to check remaining work
          ```
        </Tab>

        <Tab title="Program CPI">
          <Prompt description="Add create-mint CPI to an Anchor program" actions={["copy", "cursor"]}>
            {`---
                        description: Add create-mint CPI to an Anchor program
                        allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
                        ---

                        ## Add create-mint CPI to an Anchor program

                        Context:
                        - Guide: https://zkcompression.com/light-token/cookbook/create-mint
                        - Skills and resources index: https://zkcompression.com/skill.md
                        - SPL to Light reference: https://zkcompression.com/api-reference/solana-to-light-comparison
                        - Crate: light-token (CreateMintCpi, CreateMintParams, SystemAccountInfos)
                        - Example: https://github.com/Lightprotocol/examples-light-token/tree/main/programs/anchor/basic-instructions/create-mint

                        Key CPI struct: \`light_token::instruction::CreateMintCpi\`

                        ### 1. Index project
                        - Grep \`declare_id|#\[program\]|anchor_lang|Account<|Pubkey|invoke|mint|decimals|authority|metadata\` across src/
                        - Glob \`**/*.rs\` and \`**/Cargo.toml\` for project structure
                        - Identify: program ID, existing instructions, account structs, mint seeds
                        - Read Cargo.toml — note existing dependencies and framework version
                        - Task subagent (Grep/Read/WebFetch) if project has multiple crates to scan in parallel

                        ### 2. Read references
                        - WebFetch the guide above — review the CPI tab under Program: token metadata config, mint params, system accounts, invoke patterns
                        - WebFetch skill.md — check for a dedicated skill and resources matching this task
                        - TaskCreate one todo per phase below to track progress

                        ### 3. Clarify intention
                        - AskUserQuestion: what is the goal? (add create-mint to existing program, new program from scratch, migrate from SPL create_mint)
                        - AskUserQuestion: should the mint seed be an external keypair or a PDA? (determines invoke vs invoke_signed)
                        - AskUserQuestion: do you need token metadata (name, symbol, uri)?
                        - Summarize findings and wait for user confirmation before implementing

                        ### 4. Create plan
                        - Based on steps 1–3, draft an implementation plan: which files to modify, what code to add, dependency changes
                        - Follow the guide's step order: Configure Token Metadata → Configure Mint Params → System Accounts → Build CPI and invoke
                        - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
                        - Present the plan to the user for approval before proceeding

                        ### 5. Implement
                        - Add deps if missing: Bash \`cargo add light-token anchor-lang@0.31\`
                        - Follow the guide and the approved plan
                        - Write/Edit to create or modify files
                        - TaskUpdate to mark each step done

                        ### 6. Verify
                        - Bash \`anchor build\`
                        - Bash \`anchor test\` if tests exist
                        - TaskUpdate to mark complete

                        ### Tools
                        - mcp__zkcompression__SearchLightProtocol("<query>") for API details
                        - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
                        - Task subagent with Grep/Read/WebFetch for parallel lookups
                        - TaskList to check remaining work`}
          </Prompt>

          ```text theme={null}
          ---
          description: Add create-mint CPI to an Anchor program
          allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
          ---

          ## Add create-mint CPI to an Anchor program

          Context:
          - Guide: https://zkcompression.com/light-token/cookbook/create-mint
          - Skills and resources index: https://zkcompression.com/skill.md
          - SPL to Light reference: https://zkcompression.com/api-reference/solana-to-light-comparison
          - Crate: light-token (CreateMintCpi, CreateMintParams, SystemAccountInfos)
          - Example: https://github.com/Lightprotocol/examples-light-token/tree/main/programs/anchor/basic-instructions/create-mint

          Key CPI struct: `light_token::instruction::CreateMintCpi`

          ### 1. Index project
          - Grep `declare_id|#\[program\]|anchor_lang|Account<|Pubkey|invoke|mint|decimals|authority|metadata` across src/
          - Glob `**/*.rs` and `**/Cargo.toml` for project structure
          - Identify: program ID, existing instructions, account structs, mint seeds
          - Read Cargo.toml — note existing dependencies and framework version
          - Task subagent (Grep/Read/WebFetch) if project has multiple crates to scan in parallel

          ### 2. Read references
          - WebFetch the guide above — review the CPI tab under Program: token metadata config, mint params, system accounts, invoke patterns
          - WebFetch skill.md — check for a dedicated skill and resources matching this task
          - TaskCreate one todo per phase below to track progress

          ### 3. Clarify intention
          - AskUserQuestion: what is the goal? (add create-mint to existing program, new program from scratch, migrate from SPL create_mint)
          - AskUserQuestion: should the mint seed be an external keypair or a PDA? (determines invoke vs invoke_signed)
          - AskUserQuestion: do you need token metadata (name, symbol, uri)?
          - Summarize findings and wait for user confirmation before implementing

          ### 4. Create plan
          - Based on steps 1–3, draft an implementation plan: which files to modify, what code to add, dependency changes
          - Follow the guide's step order: Configure Token Metadata → Configure Mint Params → System Accounts → Build CPI and invoke
          - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
          - Present the plan to the user for approval before proceeding

          ### 5. Implement
          - Add deps if missing: Bash `cargo add light-token anchor-lang@0.31`
          - Follow the guide and the approved plan
          - Write/Edit to create or modify files
          - TaskUpdate to mark each step done

          ### 6. Verify
          - Bash `anchor build`
          - Bash `anchor test` if tests exist
          - TaskUpdate to mark complete

          ### Tools
          - mcp__zkcompression__SearchLightProtocol("<query>") for API details
          - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
          - Task subagent with Grep/Read/WebFetch for parallel lookups
          - TaskList to check remaining work
          ```
        </Tab>

        <Tab title="Anchor Macros">
          <Prompt description="Create a rent-free mint with Anchor macros" actions={["copy", "cursor"]}>
            {`---
                        description: Create a rent-free mint with Anchor macros
                        allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
                        ---

                        ## Create a rent-free mint with Anchor macros

                        Context:
                        - Guide: https://zkcompression.com/light-token/cookbook/create-mint
                        - Skills and resources index: https://zkcompression.com/skill.md
                        - SPL to Light reference: https://zkcompression.com/api-reference/solana-to-light-comparison
                        - Crates: light-sdk, light-sdk-macros, light-compressible, anchor-lang
                        - Example: https://github.com/Lightprotocol/examples-light-token/tree/main/programs/anchor/basic-macros/create-mint

                        Key macros: \`#[light_program]\`, \`LightAccounts\`, \`#[light_account(init, mint::...)]\`

                        ### 1. Index project
                        - Grep \`#\[program\]|anchor_lang|Account<|Accounts|seeds|init|payer|mint\` across src/
                        - Glob \`**/*.rs\` and \`**/Cargo.toml\` for project structure
                        - Identify: existing program module, account structs, mint patterns, PDA seeds
                        - Read Cargo.toml — note existing dependencies and framework version
                        - Task subagent (Grep/Read/WebFetch) if project has multiple crates to scan in parallel

                        ### 2. Read references
                        - WebFetch the guide above — review the Anchor Macros tab under Program
                        - WebFetch skill.md — check for a dedicated skill and resources matching this task
                        - TaskCreate one todo per phase below to track progress

                        ### 3. Clarify intention
                        - AskUserQuestion: what is the goal? (new program from scratch, add rent-free mint to existing program, migrate from SPL create_mint)
                        - AskUserQuestion: do you need token metadata (name, symbol, uri)?
                        - Summarize findings and wait for user confirmation before implementing

                        ### 4. Create plan
                        - Based on steps 1–3, draft an implementation plan
                        - Follow the guide's step order: Dependencies → Program Module (#[light_program]) → Accounts Struct (#[light_account(init, mint::...)])
                        - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
                        - Present the plan to the user for approval before proceeding

                        ### 5. Implement
                        - Add deps if missing: Bash \`cargo add light-sdk@0.23 --features anchor,v2,cpi-context\` and \`cargo add light-sdk-macros@0.23 light-compressible@0.6 anchor-lang@0.31\`
                        - Follow the guide and the approved plan
                        - Write/Edit to create or modify files
                        - TaskUpdate to mark each step done

                        ### 6. Verify
                        - Bash \`anchor build\`
                        - Bash \`anchor test\` if tests exist
                        - TaskUpdate to mark complete

                        ### Tools
                        - mcp__zkcompression__SearchLightProtocol("<query>") for API details
                        - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
                        - Task subagent with Grep/Read/WebFetch for parallel lookups
                        - TaskList to check remaining work`}
          </Prompt>

          ```text theme={null}
          ---
          description: Create a rent-free mint with Anchor macros
          allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
          ---

          ## Create a rent-free mint with Anchor macros

          Context:
          - Guide: https://zkcompression.com/light-token/cookbook/create-mint
          - Skills and resources index: https://zkcompression.com/skill.md
          - SPL to Light reference: https://zkcompression.com/api-reference/solana-to-light-comparison
          - Crates: light-sdk, light-sdk-macros, light-compressible, anchor-lang
          - Example: https://github.com/Lightprotocol/examples-light-token/tree/main/programs/anchor/basic-macros/create-mint

          Key macros: `#[light_program]`, `LightAccounts`, `#[light_account(init, mint::...)]`

          ### 1. Index project
          - Grep `#\[program\]|anchor_lang|Account<|Accounts|seeds|init|payer|mint` across src/
          - Glob `**/*.rs` and `**/Cargo.toml` for project structure
          - Identify: existing program module, account structs, mint patterns, PDA seeds
          - Read Cargo.toml — note existing dependencies and framework version
          - Task subagent (Grep/Read/WebFetch) if project has multiple crates to scan in parallel

          ### 2. Read references
          - WebFetch the guide above — review the Anchor Macros tab under Program
          - WebFetch skill.md — check for a dedicated skill and resources matching this task
          - TaskCreate one todo per phase below to track progress

          ### 3. Clarify intention
          - AskUserQuestion: what is the goal? (new program from scratch, add rent-free mint to existing program, migrate from SPL create_mint)
          - AskUserQuestion: do you need token metadata (name, symbol, uri)?
          - Summarize findings and wait for user confirmation before implementing

          ### 4. Create plan
          - Based on steps 1–3, draft an implementation plan
          - Follow the guide's step order: Dependencies → Program Module (#[light_program]) → Accounts Struct (#[light_account(init, mint::...)])
          - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
          - Present the plan to the user for approval before proceeding

          ### 5. Implement
          - Add deps if missing: Bash `cargo add light-sdk@0.23 --features anchor,v2,cpi-context` and `cargo add light-sdk-macros@0.23 light-compressible@0.6 anchor-lang@0.31`
          - Follow the guide and the approved plan
          - Write/Edit to create or modify files
          - TaskUpdate to mark each step done

          ### 6. Verify
          - Bash `anchor build`
          - Bash `anchor test` if tests exist
          - TaskUpdate to mark complete

          ### Tools
          - mcp__zkcompression__SearchLightProtocol("<query>") for API details
          - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
          - Task subagent with Grep/Read/WebFetch for parallel lookups
          - TaskList to check remaining work
          ```
        </Tab>
      </Tabs>
    </Accordion>

    <Accordion title="Create associated token account">
      Copy the prompt below or view the [guide](/light-token/cookbook/create-ata).

      <Tabs>
        <Tab title="TypeScript Client">
          <Prompt description="Create rent-free associated token account" actions={["copy", "cursor"]}>
            {`---
                        description: Create rent-free associated token account
                        allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
                        ---

                        ## Create rent-free associated token account

                        Context:
                        - Guide: https://zkcompression.com/light-token/cookbook/create-ata
                        - Skills and resources index: https://zkcompression.com/skill.md
                        - SPL to Light reference: https://zkcompression.com/api-reference/solana-to-light-comparison
                        - Packages: @lightprotocol/compressed-token, @lightprotocol/stateless.js

                        SPL equivalent: createAssociatedTokenAccount() → Light Token: createAtaInterface()

                        ### 1. Index project
                        - Grep \`@solana/spl-token|Connection|Keypair|createAssociatedTokenAccount|createAtaInterface\` across src/
                        - Glob \`**/*.ts\` for project structure
                        - Identify: RPC setup, existing ATA logic, entry point for ATA creation
                        - Task subagent (Grep/Read/WebFetch) if project has multiple packages to scan in parallel

                        ### 2. Read references
                        - WebFetch the guide above — follow the TypeScript Client tab
                        - WebFetch skill.md — check for a dedicated skill and resources matching this task
                        - TaskCreate one todo per phase below to track progress

                        ### 3. Clarify intention
                        - AskUserQuestion: what is the goal? (new feature, migrate existing SPL code, add alongside existing)
                        - AskUserQuestion: does the project already have ATA operations to extend, or is this greenfield?
                        - Summarize findings and wait for user confirmation before implementing

                        ### 4. Create plan
                        - Based on steps 1–3, draft an implementation plan: which files to modify, what code to add, dependency changes
                        - Verify existing connection/signer setup is compatible with the cookbook prerequisites
                        - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
                        - Present the plan to the user for approval before proceeding

                        ### 5. Implement
                        - Add deps if missing: Bash \`npm install @lightprotocol/compressed-token @lightprotocol/stateless.js\`
                        - Follow the cookbook guide and the approved plan
                        - Write/Edit to create or modify files
                        - TaskUpdate to mark each step done

                        ### 6. Verify
                        - Bash \`tsc --noEmit\`
                        - Bash run existing test suite if present
                        - TaskUpdate to mark complete

                        ### Tools
                        - mcp__zkcompression__SearchLightProtocol("<query>") for API details
                        - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
                        - Task subagent with Grep/Read/WebFetch for parallel lookups
                        - TaskList to check remaining work`}
          </Prompt>

          ```text theme={null}
          ---
          description: Create rent-free associated token account
          allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
          ---

          ## Create rent-free associated token account

          Context:
          - Guide: https://zkcompression.com/light-token/cookbook/create-ata
          - Skills and resources index: https://zkcompression.com/skill.md
          - SPL to Light reference: https://zkcompression.com/api-reference/solana-to-light-comparison
          - Packages: @lightprotocol/compressed-token, @lightprotocol/stateless.js

          SPL equivalent: createAssociatedTokenAccount() → Light Token: createAtaInterface()

          ### 1. Index project
          - Grep `@solana/spl-token|Connection|Keypair|createAssociatedTokenAccount|createAtaInterface` across src/
          - Glob `**/*.ts` for project structure
          - Identify: RPC setup, existing ATA logic, entry point for ATA creation
          - Task subagent (Grep/Read/WebFetch) if project has multiple packages to scan in parallel

          ### 2. Read references
          - WebFetch the guide above — follow the TypeScript Client tab
          - WebFetch skill.md — check for a dedicated skill and resources matching this task
          - TaskCreate one todo per phase below to track progress

          ### 3. Clarify intention
          - AskUserQuestion: what is the goal? (new feature, migrate existing SPL code, add alongside existing)
          - AskUserQuestion: does the project already have ATA operations to extend, or is this greenfield?
          - Summarize findings and wait for user confirmation before implementing

          ### 4. Create plan
          - Based on steps 1–3, draft an implementation plan: which files to modify, what code to add, dependency changes
          - Verify existing connection/signer setup is compatible with the cookbook prerequisites
          - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
          - Present the plan to the user for approval before proceeding

          ### 5. Implement
          - Add deps if missing: Bash `npm install @lightprotocol/compressed-token @lightprotocol/stateless.js`
          - Follow the cookbook guide and the approved plan
          - Write/Edit to create or modify files
          - TaskUpdate to mark each step done

          ### 6. Verify
          - Bash `tsc --noEmit`
          - Bash run existing test suite if present
          - TaskUpdate to mark complete

          ### Tools
          - mcp__zkcompression__SearchLightProtocol("<query>") for API details
          - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
          - Task subagent with Grep/Read/WebFetch for parallel lookups
          - TaskList to check remaining work
          ```
        </Tab>

        <Tab title="Rust Client">
          <Prompt description="Create rent-free associated token account" actions={["copy", "cursor"]}>
            {`---
                        description: Create rent-free associated token account
                        allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
                        ---

                        ## Create rent-free associated token account

                        Context:
                        - Guide: https://zkcompression.com/light-token/cookbook/create-ata
                        - Skills and resources index: https://zkcompression.com/skill.md
                        - SPL to Light reference: https://zkcompression.com/api-reference/solana-to-light-comparison
                        - Crates: light-token-client (actions), light-token (instructions), light-client (RPC)

                        SPL equivalent: spl_associated_token_account::create → Light Token: CreateAta

                        ### 1. Index project
                        - Grep \`light_token::|light_token_client::|solana_sdk|Keypair|async|CreateAta|create_associated_token_account\` across src/
                        - Glob \`**/*.rs\` for project structure
                        - Identify: RPC setup, existing token ops, entry point for ATA creation
                        - Check Cargo.toml for existing light-* dependencies and solana-sdk version
                        - Task subagent (Grep/Read/WebFetch) if project has multiple crates to scan in parallel

                        ### 2. Read references
                        - WebFetch the guide above — follow the Rust Client tab
                        - WebFetch skill.md — check for a dedicated skill and resources matching this task
                        - TaskCreate one todo per phase below to track progress

                        ### 3. Clarify intention
                        - AskUserQuestion: what is the goal? (new feature, migrate existing SPL code, add alongside existing)
                        - AskUserQuestion: does the project already have ATA operations to extend, or is this greenfield?
                        - AskUserQuestion: action-level API (high-level, fewer lines) or instruction-level API (low-level, full control)?
                        - Summarize findings and wait for user confirmation before implementing

                        ### 4. Create plan
                        - Based on steps 1–3, draft an implementation plan: which files to modify, what code to add, dependency changes
                        - Verify existing Rpc/signer setup is compatible with the cookbook prerequisites (light_client::rpc::Rpc, solana_sdk::signature::Keypair)
                        - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
                        - Present the plan to the user for approval before proceeding

                        ### 5. Implement
                        - Add deps if missing: Bash \`cargo add light-token-client light-token light-client --features light-client/v2\`
                        - Follow the cookbook guide and the approved plan
                        - Write/Edit to create or modify files
                        - TaskUpdate to mark each step done

                        ### 6. Verify
                        - Bash \`cargo check\`
                        - Bash \`cargo test\` if tests exist
                        - TaskUpdate to mark complete

                        ### Tools
                        - mcp__zkcompression__SearchLightProtocol("<query>") for API details
                        - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
                        - Task subagent with Grep/Read/WebFetch for parallel lookups
                        - TaskList to check remaining work`}
          </Prompt>

          ```text theme={null}
          ---
          description: Create rent-free associated token account
          allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
          ---

          ## Create rent-free associated token account

          Context:
          - Guide: https://zkcompression.com/light-token/cookbook/create-ata
          - Skills and resources index: https://zkcompression.com/skill.md
          - SPL to Light reference: https://zkcompression.com/api-reference/solana-to-light-comparison
          - Crates: light-token-client (actions), light-token (instructions), light-client (RPC)

          SPL equivalent: spl_associated_token_account::create → Light Token: CreateAta

          ### 1. Index project
          - Grep `light_token::|light_token_client::|solana_sdk|Keypair|async|CreateAta|create_associated_token_account` across src/
          - Glob `**/*.rs` for project structure
          - Identify: RPC setup, existing token ops, entry point for ATA creation
          - Check Cargo.toml for existing light-* dependencies and solana-sdk version
          - Task subagent (Grep/Read/WebFetch) if project has multiple crates to scan in parallel

          ### 2. Read references
          - WebFetch the guide above — follow the Rust Client tab
          - WebFetch skill.md — check for a dedicated skill and resources matching this task
          - TaskCreate one todo per phase below to track progress

          ### 3. Clarify intention
          - AskUserQuestion: what is the goal? (new feature, migrate existing SPL code, add alongside existing)
          - AskUserQuestion: does the project already have ATA operations to extend, or is this greenfield?
          - AskUserQuestion: action-level API (high-level, fewer lines) or instruction-level API (low-level, full control)?
          - Summarize findings and wait for user confirmation before implementing

          ### 4. Create plan
          - Based on steps 1–3, draft an implementation plan: which files to modify, what code to add, dependency changes
          - Verify existing Rpc/signer setup is compatible with the cookbook prerequisites (light_client::rpc::Rpc, solana_sdk::signature::Keypair)
          - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
          - Present the plan to the user for approval before proceeding

          ### 5. Implement
          - Add deps if missing: Bash `cargo add light-token-client light-token light-client --features light-client/v2`
          - Follow the cookbook guide and the approved plan
          - Write/Edit to create or modify files
          - TaskUpdate to mark each step done

          ### 6. Verify
          - Bash `cargo check`
          - Bash `cargo test` if tests exist
          - TaskUpdate to mark complete

          ### Tools
          - mcp__zkcompression__SearchLightProtocol("<query>") for API details
          - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
          - Task subagent with Grep/Read/WebFetch for parallel lookups
          - TaskList to check remaining work
          ```
        </Tab>

        <Tab title="Program CPI">
          <Prompt description="Add create-ATA CPI to an Anchor program" actions={["copy", "cursor"]}>
            {`---
                        description: Add create-ATA CPI to an Anchor program
                        allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
                        ---

                        ## Add create-ATA CPI to an Anchor program

                        Context:
                        - Guide: https://zkcompression.com/light-token/cookbook/create-ata
                        - Skills and resources index: https://zkcompression.com/skill.md
                        - SPL to Light reference: https://zkcompression.com/api-reference/solana-to-light-comparison
                        - Crate: light-token (CreateAssociatedAccountCpi)
                        - Example: https://github.com/Lightprotocol/examples-light-token/tree/main/programs/anchor/basic-instructions/create-associated-token-account

                        Key CPI struct: \`light_token::instruction::CreateAssociatedAccountCpi\`

                        ### 1. Index project
                        - Grep \`declare_id|#\[program\]|anchor_lang|Account<|Pubkey|invoke|ata|associated|owner|mint\` across src/
                        - Glob \`**/*.rs\` and \`**/Cargo.toml\` for project structure
                        - Identify: program ID, existing instructions, account structs, ATA derivation
                        - Read Cargo.toml — note existing dependencies and framework version
                        - Task subagent (Grep/Read/WebFetch) if project has multiple crates to scan in parallel

                        ### 2. Read references
                        - WebFetch the guide above — review the CPI tab under Program: ATA creation with .rent_free() chain
                        - WebFetch skill.md — check for a dedicated skill and resources matching this task
                        - TaskCreate one todo per phase below to track progress

                        ### 3. Clarify intention
                        - AskUserQuestion: what is the goal? (add create-ATA to existing program, new program from scratch, migrate from SPL create_associated_token_account)
                        - AskUserQuestion: should the payer be an external signer or a PDA? (determines invoke vs invoke_signed)
                        - Summarize findings and wait for user confirmation before implementing

                        ### 4. Create plan
                        - Based on steps 1–3, draft an implementation plan: which files to modify, what code to add, dependency changes
                        - Follow the guide's step order: Build CreateAssociatedAccountCpi → .rent_free() → .invoke() or .invoke_signed()
                        - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
                        - Present the plan to the user for approval before proceeding

                        ### 5. Implement
                        - Add deps if missing: Bash \`cargo add light-token anchor-lang@0.31\`
                        - Follow the guide and the approved plan
                        - Write/Edit to create or modify files
                        - TaskUpdate to mark each step done

                        ### 6. Verify
                        - Bash \`anchor build\`
                        - Bash \`anchor test\` if tests exist
                        - TaskUpdate to mark complete

                        ### Tools
                        - mcp__zkcompression__SearchLightProtocol("<query>") for API details
                        - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
                        - Task subagent with Grep/Read/WebFetch for parallel lookups
                        - TaskList to check remaining work`}
          </Prompt>

          ```text theme={null}
          ---
          description: Add create-ATA CPI to an Anchor program
          allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
          ---

          ## Add create-ATA CPI to an Anchor program

          Context:
          - Guide: https://zkcompression.com/light-token/cookbook/create-ata
          - Skills and resources index: https://zkcompression.com/skill.md
          - SPL to Light reference: https://zkcompression.com/api-reference/solana-to-light-comparison
          - Crate: light-token (CreateAssociatedAccountCpi)
          - Example: https://github.com/Lightprotocol/examples-light-token/tree/main/programs/anchor/basic-instructions/create-associated-token-account

          Key CPI struct: `light_token::instruction::CreateAssociatedAccountCpi`

          ### 1. Index project
          - Grep `declare_id|#\[program\]|anchor_lang|Account<|Pubkey|invoke|ata|associated|owner|mint` across src/
          - Glob `**/*.rs` and `**/Cargo.toml` for project structure
          - Identify: program ID, existing instructions, account structs, ATA derivation
          - Read Cargo.toml — note existing dependencies and framework version
          - Task subagent (Grep/Read/WebFetch) if project has multiple crates to scan in parallel

          ### 2. Read references
          - WebFetch the guide above — review the CPI tab under Program: ATA creation with .rent_free() chain
          - WebFetch skill.md — check for a dedicated skill and resources matching this task
          - TaskCreate one todo per phase below to track progress

          ### 3. Clarify intention
          - AskUserQuestion: what is the goal? (add create-ATA to existing program, new program from scratch, migrate from SPL create_associated_token_account)
          - AskUserQuestion: should the payer be an external signer or a PDA? (determines invoke vs invoke_signed)
          - Summarize findings and wait for user confirmation before implementing

          ### 4. Create plan
          - Based on steps 1–3, draft an implementation plan: which files to modify, what code to add, dependency changes
          - Follow the guide's step order: Build CreateAssociatedAccountCpi → .rent_free() → .invoke() or .invoke_signed()
          - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
          - Present the plan to the user for approval before proceeding

          ### 5. Implement
          - Add deps if missing: Bash `cargo add light-token anchor-lang@0.31`
          - Follow the guide and the approved plan
          - Write/Edit to create or modify files
          - TaskUpdate to mark each step done

          ### 6. Verify
          - Bash `anchor build`
          - Bash `anchor test` if tests exist
          - TaskUpdate to mark complete

          ### Tools
          - mcp__zkcompression__SearchLightProtocol("<query>") for API details
          - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
          - Task subagent with Grep/Read/WebFetch for parallel lookups
          - TaskList to check remaining work
          ```
        </Tab>

        <Tab title="Anchor Macros">
          <Prompt description="Create a rent-free ATA with Anchor macros" actions={["copy", "cursor"]}>
            {`---
                        description: Create a rent-free ATA with Anchor macros
                        allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
                        ---

                        ## Create a rent-free ATA with Anchor macros

                        Context:
                        - Guide: https://zkcompression.com/light-token/cookbook/create-ata
                        - Skills and resources index: https://zkcompression.com/skill.md
                        - SPL to Light reference: https://zkcompression.com/api-reference/solana-to-light-comparison
                        - Crates: light-sdk, light-sdk-macros, light-compressible, anchor-lang
                        - Example: https://github.com/Lightprotocol/examples-light-token/tree/main/programs/anchor/basic-macros/create-associated-token-account

                        Key macros: \`#[light_program]\`, \`LightAccounts\`, \`#[light_account(init, associated_token::...)]\`

                        ### 1. Index project
                        - Grep \`#\[program\]|anchor_lang|Account<|Accounts|seeds|init|payer|ata|associated\` across src/
                        - Glob \`**/*.rs\` and \`**/Cargo.toml\` for project structure
                        - Identify: existing program module, account structs, ATA patterns
                        - Read Cargo.toml — note existing dependencies and framework version
                        - Task subagent (Grep/Read/WebFetch) if project has multiple crates to scan in parallel

                        ### 2. Read references
                        - WebFetch the guide above — review the Anchor Macros tab under Program
                        - WebFetch skill.md — check for a dedicated skill and resources matching this task
                        - TaskCreate one todo per phase below to track progress

                        ### 3. Clarify intention
                        - AskUserQuestion: what is the goal? (new program from scratch, add rent-free ATA to existing program, migrate from SPL create_associated_token_account)
                        - Summarize findings and wait for user confirmation before implementing

                        ### 4. Create plan
                        - Based on steps 1–3, draft an implementation plan
                        - Follow the guide's step order: Dependencies → Program Module (#[light_program]) → Accounts Struct (#[light_account(init, associated_token::...)])
                        - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
                        - Present the plan to the user for approval before proceeding

                        ### 5. Implement
                        - Add deps if missing: Bash \`cargo add light-sdk@0.23 --features anchor,v2,cpi-context\` and \`cargo add light-sdk-macros@0.23 light-compressible@0.6 anchor-lang@0.31\`
                        - Follow the guide and the approved plan
                        - Write/Edit to create or modify files
                        - TaskUpdate to mark each step done

                        ### 6. Verify
                        - Bash \`anchor build\`
                        - Bash \`anchor test\` if tests exist
                        - TaskUpdate to mark complete

                        ### Tools
                        - mcp__zkcompression__SearchLightProtocol("<query>") for API details
                        - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
                        - Task subagent with Grep/Read/WebFetch for parallel lookups
                        - TaskList to check remaining work`}
          </Prompt>

          ```text theme={null}
          ---
          description: Create a rent-free ATA with Anchor macros
          allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
          ---

          ## Create a rent-free ATA with Anchor macros

          Context:
          - Guide: https://zkcompression.com/light-token/cookbook/create-ata
          - Skills and resources index: https://zkcompression.com/skill.md
          - SPL to Light reference: https://zkcompression.com/api-reference/solana-to-light-comparison
          - Crates: light-sdk, light-sdk-macros, light-compressible, anchor-lang
          - Example: https://github.com/Lightprotocol/examples-light-token/tree/main/programs/anchor/basic-macros/create-associated-token-account

          Key macros: `#[light_program]`, `LightAccounts`, `#[light_account(init, associated_token::...)]`

          ### 1. Index project
          - Grep `#\[program\]|anchor_lang|Account<|Accounts|seeds|init|payer|ata|associated` across src/
          - Glob `**/*.rs` and `**/Cargo.toml` for project structure
          - Identify: existing program module, account structs, ATA patterns
          - Read Cargo.toml — note existing dependencies and framework version
          - Task subagent (Grep/Read/WebFetch) if project has multiple crates to scan in parallel

          ### 2. Read references
          - WebFetch the guide above — review the Anchor Macros tab under Program
          - WebFetch skill.md — check for a dedicated skill and resources matching this task
          - TaskCreate one todo per phase below to track progress

          ### 3. Clarify intention
          - AskUserQuestion: what is the goal? (new program from scratch, add rent-free ATA to existing program, migrate from SPL create_associated_token_account)
          - Summarize findings and wait for user confirmation before implementing

          ### 4. Create plan
          - Based on steps 1–3, draft an implementation plan
          - Follow the guide's step order: Dependencies → Program Module (#[light_program]) → Accounts Struct (#[light_account(init, associated_token::...)])
          - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
          - Present the plan to the user for approval before proceeding

          ### 5. Implement
          - Add deps if missing: Bash `cargo add light-sdk@0.23 --features anchor,v2,cpi-context` and `cargo add light-sdk-macros@0.23 light-compressible@0.6 anchor-lang@0.31`
          - Follow the guide and the approved plan
          - Write/Edit to create or modify files
          - TaskUpdate to mark each step done

          ### 6. Verify
          - Bash `anchor build`
          - Bash `anchor test` if tests exist
          - TaskUpdate to mark complete

          ### Tools
          - mcp__zkcompression__SearchLightProtocol("<query>") for API details
          - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
          - Task subagent with Grep/Read/WebFetch for parallel lookups
          - TaskList to check remaining work
          ```
        </Tab>
      </Tabs>
    </Accordion>

    <Accordion title="Create token account">
      Copy the prompt below or view the [guide](/light-token/cookbook/create-token-account).

      <Tabs>
        <Tab title="Rust Client">
          <Prompt description="Create Light Token account" actions={["copy", "cursor"]}>
            {`---
                        description: Create Light Token account
                        allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
                        ---

                        ## Create Light Token account

                        Context:
                        - Guide: https://zkcompression.com/light-token/cookbook/create-token-account
                        - Skills and resources index: https://zkcompression.com/skill.md
                        - SPL to Light reference: https://zkcompression.com/api-reference/solana-to-light-comparison
                        - Crates: light-token-client (actions), light-token (instructions), light-client (RPC)

                        SPL equivalent: spl_token::instruction::initialize_account → Light Token: CreateTokenAccount

                        ### 1. Index project
                        - Grep \`light_token::|light_token_client::|solana_sdk|Keypair|async|CreateTokenAccount|initialize_account\` across src/
                        - Glob \`**/*.rs\` for project structure
                        - Identify: RPC setup, existing token ops, entry point for token account creation
                        - Check Cargo.toml for existing light-* dependencies and solana-sdk version
                        - Task subagent (Grep/Read/WebFetch) if project has multiple crates to scan in parallel

                        ### 2. Read references
                        - WebFetch the guide above — follow the Rust Client tab
                        - WebFetch skill.md — check for a dedicated skill and resources matching this task
                        - TaskCreate one todo per phase below to track progress

                        ### 3. Clarify intention
                        - AskUserQuestion: what is the goal? (new feature, migrate existing SPL code, add alongside existing)
                        - AskUserQuestion: does the project already have token account operations to extend, or is this greenfield?
                        - AskUserQuestion: action-level API (high-level, fewer lines) or instruction-level API (low-level, full control)?
                        - Summarize findings and wait for user confirmation before implementing

                        ### 4. Create plan
                        - Based on steps 1–3, draft an implementation plan: which files to modify, what code to add, dependency changes
                        - Verify existing Rpc/signer setup is compatible with the cookbook prerequisites (light_client::rpc::Rpc, solana_sdk::signature::Keypair)
                        - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
                        - Present the plan to the user for approval before proceeding

                        ### 5. Implement
                        - Add deps if missing: Bash \`cargo add light-token-client light-token light-client --features light-client/v2\`
                        - Follow the cookbook guide and the approved plan
                        - Write/Edit to create or modify files
                        - TaskUpdate to mark each step done

                        ### 6. Verify
                        - Bash \`cargo check\`
                        - Bash \`cargo test\` if tests exist
                        - TaskUpdate to mark complete

                        ### Tools
                        - mcp__zkcompression__SearchLightProtocol("<query>") for API details
                        - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
                        - Task subagent with Grep/Read/WebFetch for parallel lookups
                        - TaskList to check remaining work`}
          </Prompt>

          ```text theme={null}
          ---
          description: Create Light Token account
          allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
          ---

          ## Create Light Token account

          Context:
          - Guide: https://zkcompression.com/light-token/cookbook/create-token-account
          - Skills and resources index: https://zkcompression.com/skill.md
          - SPL to Light reference: https://zkcompression.com/api-reference/solana-to-light-comparison
          - Crates: light-token-client (actions), light-token (instructions), light-client (RPC)

          SPL equivalent: spl_token::instruction::initialize_account → Light Token: CreateTokenAccount

          ### 1. Index project
          - Grep `light_token::|light_token_client::|solana_sdk|Keypair|async|CreateTokenAccount|initialize_account` across src/
          - Glob `**/*.rs` for project structure
          - Identify: RPC setup, existing token ops, entry point for token account creation
          - Check Cargo.toml for existing light-* dependencies and solana-sdk version
          - Task subagent (Grep/Read/WebFetch) if project has multiple crates to scan in parallel

          ### 2. Read references
          - WebFetch the guide above — follow the Rust Client tab
          - WebFetch skill.md — check for a dedicated skill and resources matching this task
          - TaskCreate one todo per phase below to track progress

          ### 3. Clarify intention
          - AskUserQuestion: what is the goal? (new feature, migrate existing SPL code, add alongside existing)
          - AskUserQuestion: does the project already have token account operations to extend, or is this greenfield?
          - AskUserQuestion: action-level API (high-level, fewer lines) or instruction-level API (low-level, full control)?
          - Summarize findings and wait for user confirmation before implementing

          ### 4. Create plan
          - Based on steps 1–3, draft an implementation plan: which files to modify, what code to add, dependency changes
          - Verify existing Rpc/signer setup is compatible with the cookbook prerequisites (light_client::rpc::Rpc, solana_sdk::signature::Keypair)
          - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
          - Present the plan to the user for approval before proceeding

          ### 5. Implement
          - Add deps if missing: Bash `cargo add light-token-client light-token light-client --features light-client/v2`
          - Follow the cookbook guide and the approved plan
          - Write/Edit to create or modify files
          - TaskUpdate to mark each step done

          ### 6. Verify
          - Bash `cargo check`
          - Bash `cargo test` if tests exist
          - TaskUpdate to mark complete

          ### Tools
          - mcp__zkcompression__SearchLightProtocol("<query>") for API details
          - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
          - Task subagent with Grep/Read/WebFetch for parallel lookups
          - TaskList to check remaining work
          ```
        </Tab>

        <Tab title="Program CPI">
          <Prompt description="Add create-token-account CPI to an Anchor program" actions={["copy", "cursor"]}>
            {`---
                        description: Add create-token-account CPI to an Anchor program
                        allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
                        ---

                        ## Add create-token-account CPI to an Anchor program

                        Context:
                        - Guide: https://zkcompression.com/light-token/cookbook/create-token-account
                        - Skills and resources index: https://zkcompression.com/skill.md
                        - SPL to Light reference: https://zkcompression.com/api-reference/solana-to-light-comparison
                        - Crate: light-token (CreateTokenAccountCpi)
                        - Example: https://github.com/Lightprotocol/examples-light-token/tree/main/programs/anchor/basic-instructions/create-token-account

                        Key CPI struct: \`light_token::instruction::CreateTokenAccountCpi\`

                        ### 1. Index project
                        - Grep \`declare_id|#\[program\]|anchor_lang|Account<|Pubkey|invoke|token_account|vault|owner|mint\` across src/
                        - Glob \`**/*.rs\` and \`**/Cargo.toml\` for project structure
                        - Identify: program ID, existing instructions, account structs, vault/token account patterns
                        - Read Cargo.toml — note existing dependencies and framework version
                        - Task subagent (Grep/Read/WebFetch) if project has multiple crates to scan in parallel

                        ### 2. Read references
                        - WebFetch the guide above — review the CPI tab under Program: token account creation with .rent_free() chain
                        - WebFetch skill.md — check for a dedicated skill and resources matching this task
                        - TaskCreate one todo per phase below to track progress

                        ### 3. Clarify intention
                        - AskUserQuestion: what is the goal? (add create-token-account to existing program, new program from scratch, migrate from SPL token account init)
                        - AskUserQuestion: should the payer be an external signer or a PDA? (determines invoke vs invoke_signed)
                        - Summarize findings and wait for user confirmation before implementing

                        ### 4. Create plan
                        - Based on steps 1–3, draft an implementation plan: which files to modify, what code to add, dependency changes
                        - Follow the guide's step order: Build CreateTokenAccountCpi → .rent_free() → .invoke() or .invoke_signed()
                        - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
                        - Present the plan to the user for approval before proceeding

                        ### 5. Implement
                        - Add deps if missing: Bash \`cargo add light-token anchor-lang@0.31\`
                        - Follow the guide and the approved plan
                        - Write/Edit to create or modify files
                        - TaskUpdate to mark each step done

                        ### 6. Verify
                        - Bash \`anchor build\`
                        - Bash \`anchor test\` if tests exist
                        - TaskUpdate to mark complete

                        ### Tools
                        - mcp__zkcompression__SearchLightProtocol("<query>") for API details
                        - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
                        - Task subagent with Grep/Read/WebFetch for parallel lookups
                        - TaskList to check remaining work`}
          </Prompt>

          ```text theme={null}
          ---
          description: Add create-token-account CPI to an Anchor program
          allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
          ---

          ## Add create-token-account CPI to an Anchor program

          Context:
          - Guide: https://zkcompression.com/light-token/cookbook/create-token-account
          - Skills and resources index: https://zkcompression.com/skill.md
          - SPL to Light reference: https://zkcompression.com/api-reference/solana-to-light-comparison
          - Crate: light-token (CreateTokenAccountCpi)
          - Example: https://github.com/Lightprotocol/examples-light-token/tree/main/programs/anchor/basic-instructions/create-token-account

          Key CPI struct: `light_token::instruction::CreateTokenAccountCpi`

          ### 1. Index project
          - Grep `declare_id|#\[program\]|anchor_lang|Account<|Pubkey|invoke|token_account|vault|owner|mint` across src/
          - Glob `**/*.rs` and `**/Cargo.toml` for project structure
          - Identify: program ID, existing instructions, account structs, vault/token account patterns
          - Read Cargo.toml — note existing dependencies and framework version
          - Task subagent (Grep/Read/WebFetch) if project has multiple crates to scan in parallel

          ### 2. Read references
          - WebFetch the guide above — review the CPI tab under Program: token account creation with .rent_free() chain
          - WebFetch skill.md — check for a dedicated skill and resources matching this task
          - TaskCreate one todo per phase below to track progress

          ### 3. Clarify intention
          - AskUserQuestion: what is the goal? (add create-token-account to existing program, new program from scratch, migrate from SPL token account init)
          - AskUserQuestion: should the payer be an external signer or a PDA? (determines invoke vs invoke_signed)
          - Summarize findings and wait for user confirmation before implementing

          ### 4. Create plan
          - Based on steps 1–3, draft an implementation plan: which files to modify, what code to add, dependency changes
          - Follow the guide's step order: Build CreateTokenAccountCpi → .rent_free() → .invoke() or .invoke_signed()
          - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
          - Present the plan to the user for approval before proceeding

          ### 5. Implement
          - Add deps if missing: Bash `cargo add light-token anchor-lang@0.31`
          - Follow the guide and the approved plan
          - Write/Edit to create or modify files
          - TaskUpdate to mark each step done

          ### 6. Verify
          - Bash `anchor build`
          - Bash `anchor test` if tests exist
          - TaskUpdate to mark complete

          ### Tools
          - mcp__zkcompression__SearchLightProtocol("<query>") for API details
          - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
          - Task subagent with Grep/Read/WebFetch for parallel lookups
          - TaskList to check remaining work
          ```
        </Tab>

        <Tab title="Anchor Macros">
          <Prompt description="Create a rent-free token account with Anchor macros" actions={["copy", "cursor"]}>
            {`---
                        description: Create a rent-free token account with Anchor macros
                        allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
                        ---

                        ## Create a rent-free token account with Anchor macros

                        Context:
                        - Guide: https://zkcompression.com/light-token/cookbook/create-token-account
                        - Skills and resources index: https://zkcompression.com/skill.md
                        - SPL to Light reference: https://zkcompression.com/api-reference/solana-to-light-comparison
                        - Crates: light-sdk, light-sdk-macros, light-compressible, anchor-lang
                        - Example: https://github.com/Lightprotocol/examples-light-token/tree/main/programs/anchor/basic-macros/create-token-account

                        Key macros: \`#[light_program]\`, \`LightAccounts\`, \`#[light_account(init, token::...)]\`

                        ### 1. Index project
                        - Grep \`#\[program\]|anchor_lang|Account<|Accounts|seeds|init|payer|vault|token_account\` across src/
                        - Glob \`**/*.rs\` and \`**/Cargo.toml\` for project structure
                        - Identify: existing program module, account structs, vault/token account patterns
                        - Read Cargo.toml — note existing dependencies and framework version
                        - Task subagent (Grep/Read/WebFetch) if project has multiple crates to scan in parallel

                        ### 2. Read references
                        - WebFetch the guide above — review the Anchor Macros tab under Program
                        - WebFetch skill.md — check for a dedicated skill and resources matching this task
                        - TaskCreate one todo per phase below to track progress

                        ### 3. Clarify intention
                        - AskUserQuestion: what is the goal? (new program from scratch, add rent-free token account to existing program, migrate from SPL token account init)
                        - Summarize findings and wait for user confirmation before implementing

                        ### 4. Create plan
                        - Based on steps 1–3, draft an implementation plan
                        - Follow the guide's step order: Dependencies → Program Module (#[light_program]) → Accounts Struct (#[light_account(init, token::...)])
                        - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
                        - Present the plan to the user for approval before proceeding

                        ### 5. Implement
                        - Add deps if missing: Bash \`cargo add light-sdk@0.23 --features anchor,v2,cpi-context\` and \`cargo add light-sdk-macros@0.23 light-compressible@0.6 anchor-lang@0.31\`
                        - Follow the guide and the approved plan
                        - Write/Edit to create or modify files
                        - TaskUpdate to mark each step done

                        ### 6. Verify
                        - Bash \`anchor build\`
                        - Bash \`anchor test\` if tests exist
                        - TaskUpdate to mark complete

                        ### Tools
                        - mcp__zkcompression__SearchLightProtocol("<query>") for API details
                        - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
                        - Task subagent with Grep/Read/WebFetch for parallel lookups
                        - TaskList to check remaining work`}
          </Prompt>

          ```text theme={null}
          ---
          description: Create a rent-free token account with Anchor macros
          allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
          ---

          ## Create a rent-free token account with Anchor macros

          Context:
          - Guide: https://zkcompression.com/light-token/cookbook/create-token-account
          - Skills and resources index: https://zkcompression.com/skill.md
          - SPL to Light reference: https://zkcompression.com/api-reference/solana-to-light-comparison
          - Crates: light-sdk, light-sdk-macros, light-compressible, anchor-lang
          - Example: https://github.com/Lightprotocol/examples-light-token/tree/main/programs/anchor/basic-macros/create-token-account

          Key macros: `#[light_program]`, `LightAccounts`, `#[light_account(init, token::...)]`

          ### 1. Index project
          - Grep `#\[program\]|anchor_lang|Account<|Accounts|seeds|init|payer|vault|token_account` across src/
          - Glob `**/*.rs` and `**/Cargo.toml` for project structure
          - Identify: existing program module, account structs, vault/token account patterns
          - Read Cargo.toml — note existing dependencies and framework version
          - Task subagent (Grep/Read/WebFetch) if project has multiple crates to scan in parallel

          ### 2. Read references
          - WebFetch the guide above — review the Anchor Macros tab under Program
          - WebFetch skill.md — check for a dedicated skill and resources matching this task
          - TaskCreate one todo per phase below to track progress

          ### 3. Clarify intention
          - AskUserQuestion: what is the goal? (new program from scratch, add rent-free token account to existing program, migrate from SPL token account init)
          - Summarize findings and wait for user confirmation before implementing

          ### 4. Create plan
          - Based on steps 1–3, draft an implementation plan
          - Follow the guide's step order: Dependencies → Program Module (#[light_program]) → Accounts Struct (#[light_account(init, token::...)])
          - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
          - Present the plan to the user for approval before proceeding

          ### 5. Implement
          - Add deps if missing: Bash `cargo add light-sdk@0.23 --features anchor,v2,cpi-context` and `cargo add light-sdk-macros@0.23 light-compressible@0.6 anchor-lang@0.31`
          - Follow the guide and the approved plan
          - Write/Edit to create or modify files
          - TaskUpdate to mark each step done

          ### 6. Verify
          - Bash `anchor build`
          - Bash `anchor test` if tests exist
          - TaskUpdate to mark complete

          ### Tools
          - mcp__zkcompression__SearchLightProtocol("<query>") for API details
          - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
          - Task subagent with Grep/Read/WebFetch for parallel lookups
          - TaskList to check remaining work
          ```
        </Tab>
      </Tabs>
    </Accordion>

    <Accordion title="Add interface PDA to existing mints">
      Copy the prompt below or view the [guide](/light-token/cookbook/add-interface-pda).

      <Prompt description="Add interface PDA to existing SPL / Token 2022 mint" actions={["copy", "cursor"]}>
        {`---
                description: Add interface PDA to existing SPL / Token 2022 mint
                allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
                ---

                ## Add interface PDA to existing SPL / Token 2022 mint

                Context:
                - Guide: https://zkcompression.com/light-token/cookbook/add-interface-pda
                - Skills and resources index: https://zkcompression.com/skill.md
                - SPL to Light reference: https://zkcompression.com/api-reference/solana-to-light-comparison
                - Packages: @lightprotocol/compressed-token, @lightprotocol/stateless.js

                SPL equivalent: (none) → Light Token: createSplInterface()

                ### 1. Index project
                - Grep \`@solana/spl-token|Connection|Keypair|createSplInterface|LightTokenProgram\` across src/
                - Glob \`**/*.ts\` for project structure
                - Identify: RPC setup, existing mint references, entry point for interface PDA creation
                - Task subagent (Grep/Read/WebFetch) if project has multiple packages to scan in parallel

                ### 2. Read references
                - WebFetch the guide above — follow the TypeScript Client tab
                - WebFetch skill.md — check for a dedicated skill and resources matching this task
                - TaskCreate one todo per phase below to track progress

                ### 3. Clarify intention
                - AskUserQuestion: what is the goal? (register existing SPL mint, register Token 2022 mint, or both)
                - AskUserQuestion: does the project already have Light Token operations, or is this the first integration?
                - Summarize findings and wait for user confirmation before implementing

                ### 4. Create plan
                - Based on steps 1–3, draft an implementation plan: which files to modify, what code to add, dependency changes
                - Verify existing connection/signer setup is compatible with the cookbook prerequisites
                - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
                - Present the plan to the user for approval before proceeding

                ### 5. Implement
                - Add deps if missing: Bash \`npm install @lightprotocol/compressed-token @lightprotocol/stateless.js\`
                - Follow the cookbook guide and the approved plan
                - Write/Edit to create or modify files
                - TaskUpdate to mark each step done

                ### 6. Verify
                - Bash \`tsc --noEmit\`
                - Bash run existing test suite if present
                - TaskUpdate to mark complete

                ### Tools
                - mcp__zkcompression__SearchLightProtocol("<query>") for API details
                - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
                - Task subagent with Grep/Read/WebFetch for parallel lookups
                - TaskList to check remaining work`}
      </Prompt>

      ```text theme={null}
      ---
      description: Add interface PDA to existing SPL / Token 2022 mint
      allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
      ---

      ## Add interface PDA to existing SPL / Token 2022 mint

      Context:
      - Guide: https://zkcompression.com/light-token/cookbook/add-interface-pda
      - Skills and resources index: https://zkcompression.com/skill.md
      - SPL to Light reference: https://zkcompression.com/api-reference/solana-to-light-comparison
      - Packages: @lightprotocol/compressed-token, @lightprotocol/stateless.js

      SPL equivalent: (none) → Light Token: createSplInterface()

      ### 1. Index project
      - Grep `@solana/spl-token|Connection|Keypair|createSplInterface|LightTokenProgram` across src/
      - Glob `**/*.ts` for project structure
      - Identify: RPC setup, existing mint references, entry point for interface PDA creation
      - Task subagent (Grep/Read/WebFetch) if project has multiple packages to scan in parallel

      ### 2. Read references
      - WebFetch the guide above — follow the TypeScript Client tab
      - WebFetch skill.md — check for a dedicated skill and resources matching this task
      - TaskCreate one todo per phase below to track progress

      ### 3. Clarify intention
      - AskUserQuestion: what is the goal? (register existing SPL mint, register Token 2022 mint, or both)
      - AskUserQuestion: does the project already have Light Token operations, or is this the first integration?
      - Summarize findings and wait for user confirmation before implementing

      ### 4. Create plan
      - Based on steps 1–3, draft an implementation plan: which files to modify, what code to add, dependency changes
      - Verify existing connection/signer setup is compatible with the cookbook prerequisites
      - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
      - Present the plan to the user for approval before proceeding

      ### 5. Implement
      - Add deps if missing: Bash `npm install @lightprotocol/compressed-token @lightprotocol/stateless.js`
      - Follow the cookbook guide and the approved plan
      - Write/Edit to create or modify files
      - TaskUpdate to mark each step done

      ### 6. Verify
      - Bash `tsc --noEmit`
      - Bash run existing test suite if present
      - TaskUpdate to mark complete

      ### Tools
      - mcp__zkcompression__SearchLightProtocol("<query>") for API details
      - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
      - Task subagent with Grep/Read/WebFetch for parallel lookups
      - TaskList to check remaining work
      ```
    </Accordion>

    <Accordion title="Mint tokens">
      Copy the prompt below or view the [guide](/light-token/cookbook/mint-to).

      <Tabs>
        <Tab title="TypeScript Client">
          <Prompt description="Mint tokens to Light Token account" actions={["copy", "cursor"]}>
            {`---
                        description: Mint tokens to Light Token account
                        allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
                        ---

                        ## Mint tokens to Light Token account

                        Context:
                        - Guide: https://zkcompression.com/light-token/cookbook/mint-to
                        - Skills and resources index: https://zkcompression.com/skill.md
                        - SPL to Light reference: https://zkcompression.com/api-reference/solana-to-light-comparison
                        - Packages: @lightprotocol/compressed-token, @lightprotocol/stateless.js

                        SPL equivalent: mintTo() → Light Token: mintToInterface()

                        ### 1. Index project
                        - Grep \`@solana/spl-token|Connection|Keypair|mintTo|mintToInterface\` across src/
                        - Glob \`**/*.ts\` for project structure
                        - Identify: RPC setup, existing mint logic, entry point for minting
                        - Task subagent (Grep/Read/WebFetch) if project has multiple packages to scan in parallel

                        ### 2. Read references
                        - WebFetch the guide above — follow the TypeScript Client tab
                        - WebFetch skill.md — check for a dedicated skill and resources matching this task
                        - TaskCreate one todo per phase below to track progress

                        ### 3. Clarify intention
                        - AskUserQuestion: what is the goal? (new feature, migrate existing SPL code, add alongside existing)
                        - AskUserQuestion: does the project already have mint operations to extend, or is this greenfield?
                        - Summarize findings and wait for user confirmation before implementing

                        ### 4. Create plan
                        - Based on steps 1–3, draft an implementation plan: which files to modify, what code to add, dependency changes
                        - Verify existing connection/signer setup is compatible with the cookbook prerequisites
                        - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
                        - Present the plan to the user for approval before proceeding

                        ### 5. Implement
                        - Add deps if missing: Bash \`npm install @lightprotocol/compressed-token @lightprotocol/stateless.js\`
                        - Follow the cookbook guide and the approved plan
                        - Write/Edit to create or modify files
                        - TaskUpdate to mark each step done

                        ### 6. Verify
                        - Bash \`tsc --noEmit\`
                        - Bash run existing test suite if present
                        - TaskUpdate to mark complete

                        ### Tools
                        - mcp__zkcompression__SearchLightProtocol("<query>") for API details
                        - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
                        - Task subagent with Grep/Read/WebFetch for parallel lookups
                        - TaskList to check remaining work`}
          </Prompt>

          ```text theme={null}
          ---
          description: Mint tokens to Light Token account
          allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
          ---

          ## Mint tokens to Light Token account

          Context:
          - Guide: https://zkcompression.com/light-token/cookbook/mint-to
          - Skills and resources index: https://zkcompression.com/skill.md
          - SPL to Light reference: https://zkcompression.com/api-reference/solana-to-light-comparison
          - Packages: @lightprotocol/compressed-token, @lightprotocol/stateless.js

          SPL equivalent: mintTo() → Light Token: mintToInterface()

          ### 1. Index project
          - Grep `@solana/spl-token|Connection|Keypair|mintTo|mintToInterface` across src/
          - Glob `**/*.ts` for project structure
          - Identify: RPC setup, existing mint logic, entry point for minting
          - Task subagent (Grep/Read/WebFetch) if project has multiple packages to scan in parallel

          ### 2. Read references
          - WebFetch the guide above — follow the TypeScript Client tab
          - WebFetch skill.md — check for a dedicated skill and resources matching this task
          - TaskCreate one todo per phase below to track progress

          ### 3. Clarify intention
          - AskUserQuestion: what is the goal? (new feature, migrate existing SPL code, add alongside existing)
          - AskUserQuestion: does the project already have mint operations to extend, or is this greenfield?
          - Summarize findings and wait for user confirmation before implementing

          ### 4. Create plan
          - Based on steps 1–3, draft an implementation plan: which files to modify, what code to add, dependency changes
          - Verify existing connection/signer setup is compatible with the cookbook prerequisites
          - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
          - Present the plan to the user for approval before proceeding

          ### 5. Implement
          - Add deps if missing: Bash `npm install @lightprotocol/compressed-token @lightprotocol/stateless.js`
          - Follow the cookbook guide and the approved plan
          - Write/Edit to create or modify files
          - TaskUpdate to mark each step done

          ### 6. Verify
          - Bash `tsc --noEmit`
          - Bash run existing test suite if present
          - TaskUpdate to mark complete

          ### Tools
          - mcp__zkcompression__SearchLightProtocol("<query>") for API details
          - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
          - Task subagent with Grep/Read/WebFetch for parallel lookups
          - TaskList to check remaining work
          ```
        </Tab>

        <Tab title="Rust Client">
          <Prompt description="Mint tokens to Light Token account" actions={["copy", "cursor"]}>
            {`---
                        description: Mint tokens to Light Token account
                        allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
                        ---

                        ## Mint tokens to Light Token account

                        Context:
                        - Guide: https://zkcompression.com/light-token/cookbook/mint-to
                        - Skills and resources index: https://zkcompression.com/skill.md
                        - SPL to Light reference: https://zkcompression.com/api-reference/solana-to-light-comparison
                        - Crates: light-token-client (actions), light-token (instructions), light-client (RPC)

                        SPL equivalent: spl_token::instruction::mint_to → Light Token: MintTo

                        ### 1. Index project
                        - Grep \`light_token::|light_token_client::|solana_sdk|Keypair|async|MintTo|mint_to\` across src/
                        - Glob \`**/*.rs\` for project structure
                        - Identify: RPC setup, existing token ops, entry point for minting
                        - Check Cargo.toml for existing light-* dependencies and solana-sdk version
                        - Task subagent (Grep/Read/WebFetch) if project has multiple crates to scan in parallel

                        ### 2. Read references
                        - WebFetch the guide above — follow the Rust Client tab
                        - WebFetch skill.md — check for a dedicated skill and resources matching this task
                        - TaskCreate one todo per phase below to track progress

                        ### 3. Clarify intention
                        - AskUserQuestion: what is the goal? (new feature, migrate existing SPL code, add alongside existing)
                        - AskUserQuestion: does the project already have mint operations to extend, or is this greenfield?
                        - AskUserQuestion: action-level API (high-level, fewer lines) or instruction-level API (low-level, full control)?
                        - Summarize findings and wait for user confirmation before implementing

                        ### 4. Create plan
                        - Based on steps 1–3, draft an implementation plan: which files to modify, what code to add, dependency changes
                        - Verify existing Rpc/signer setup is compatible with the cookbook prerequisites (light_client::rpc::Rpc, solana_sdk::signature::Keypair)
                        - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
                        - Present the plan to the user for approval before proceeding

                        ### 5. Implement
                        - Add deps if missing: Bash \`cargo add light-token-client light-token light-client --features light-client/v2\`
                        - Follow the cookbook guide and the approved plan
                        - Write/Edit to create or modify files
                        - TaskUpdate to mark each step done

                        ### 6. Verify
                        - Bash \`cargo check\`
                        - Bash \`cargo test\` if tests exist
                        - TaskUpdate to mark complete

                        ### Tools
                        - mcp__zkcompression__SearchLightProtocol("<query>") for API details
                        - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
                        - Task subagent with Grep/Read/WebFetch for parallel lookups
                        - TaskList to check remaining work`}
          </Prompt>

          ```text theme={null}
          ---
          description: Mint tokens to Light Token account
          allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
          ---

          ## Mint tokens to Light Token account

          Context:
          - Guide: https://zkcompression.com/light-token/cookbook/mint-to
          - Skills and resources index: https://zkcompression.com/skill.md
          - SPL to Light reference: https://zkcompression.com/api-reference/solana-to-light-comparison
          - Crates: light-token-client (actions), light-token (instructions), light-client (RPC)

          SPL equivalent: spl_token::instruction::mint_to → Light Token: MintTo

          ### 1. Index project
          - Grep `light_token::|light_token_client::|solana_sdk|Keypair|async|MintTo|mint_to` across src/
          - Glob `**/*.rs` for project structure
          - Identify: RPC setup, existing token ops, entry point for minting
          - Check Cargo.toml for existing light-* dependencies and solana-sdk version
          - Task subagent (Grep/Read/WebFetch) if project has multiple crates to scan in parallel

          ### 2. Read references
          - WebFetch the guide above — follow the Rust Client tab
          - WebFetch skill.md — check for a dedicated skill and resources matching this task
          - TaskCreate one todo per phase below to track progress

          ### 3. Clarify intention
          - AskUserQuestion: what is the goal? (new feature, migrate existing SPL code, add alongside existing)
          - AskUserQuestion: does the project already have mint operations to extend, or is this greenfield?
          - AskUserQuestion: action-level API (high-level, fewer lines) or instruction-level API (low-level, full control)?
          - Summarize findings and wait for user confirmation before implementing

          ### 4. Create plan
          - Based on steps 1–3, draft an implementation plan: which files to modify, what code to add, dependency changes
          - Verify existing Rpc/signer setup is compatible with the cookbook prerequisites (light_client::rpc::Rpc, solana_sdk::signature::Keypair)
          - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
          - Present the plan to the user for approval before proceeding

          ### 5. Implement
          - Add deps if missing: Bash `cargo add light-token-client light-token light-client --features light-client/v2`
          - Follow the cookbook guide and the approved plan
          - Write/Edit to create or modify files
          - TaskUpdate to mark each step done

          ### 6. Verify
          - Bash `cargo check`
          - Bash `cargo test` if tests exist
          - TaskUpdate to mark complete

          ### Tools
          - mcp__zkcompression__SearchLightProtocol("<query>") for API details
          - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
          - Task subagent with Grep/Read/WebFetch for parallel lookups
          - TaskList to check remaining work
          ```
        </Tab>

        <Tab title="Program CPI">
          <Prompt description="Add mint-to CPI to an Anchor program" actions={["copy", "cursor"]}>
            {`---
                        description: Add mint-to CPI to an Anchor program
                        allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
                        ---

                        ## Add mint-to CPI to an Anchor program

                        Context:
                        - Guide: https://zkcompression.com/light-token/cookbook/mint-to
                        - Skills and resources index: https://zkcompression.com/skill.md
                        - SPL to Light reference: https://zkcompression.com/api-reference/solana-to-light-comparison
                        - Crate: light-token (MintToCpi)
                        - Example: https://github.com/Lightprotocol/examples-light-token/tree/main/programs/anchor/basic-instructions/mint-to

                        Key CPI struct: \`light_token::instruction::MintToCpi\`

                        ### 1. Index project
                        - Grep \`declare_id|#\[program\]|anchor_lang|Account<|Pubkey|invoke|mint|supply|amount\` across src/
                        - Glob \`**/*.rs\` and \`**/Cargo.toml\` for project structure
                        - Identify: program ID, existing instructions, account structs, mint accounts
                        - Read Cargo.toml — note existing dependencies and framework version
                        - Task subagent (Grep/Read/WebFetch) if project has multiple crates to scan in parallel

                        ### 2. Read references
                        - WebFetch the guide above — review the Program tab CPI code samples
                        - WebFetch skill.md — check for a dedicated skill and resources matching this task
                        - TaskCreate one todo per phase below to track progress

                        ### 3. Clarify intention
                        - AskUserQuestion: what is the goal? (add mint-to to existing program, new program from scratch, migrate from SPL mint_to)
                        - AskUserQuestion: should the authority be an external signer or a PDA? (determines invoke vs invoke_signed)
                        - Summarize findings and wait for user confirmation before implementing

                        ### 4. Create plan
                        - Based on steps 1–3, draft an implementation plan: which files to modify, what code to add, dependency changes
                        - Follow the guide's step order: Build MintToCpi struct → call .invoke() or .invoke_signed()
                        - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
                        - Present the plan to the user for approval before proceeding

                        ### 5. Implement
                        - Add deps if missing: Bash \`cargo add light-token anchor-lang@0.31\`
                        - Follow the guide and the approved plan
                        - Write/Edit to create or modify files
                        - TaskUpdate to mark each step done

                        ### 6. Verify
                        - Bash \`anchor build\`
                        - Bash \`anchor test\` if tests exist
                        - TaskUpdate to mark complete

                        ### Tools
                        - mcp__zkcompression__SearchLightProtocol("<query>") for API details
                        - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
                        - Task subagent with Grep/Read/WebFetch for parallel lookups
                        - TaskList to check remaining work`}
          </Prompt>

          ```text theme={null}
          ---
          description: Add mint-to CPI to an Anchor program
          allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
          ---

          ## Add mint-to CPI to an Anchor program

          Context:
          - Guide: https://zkcompression.com/light-token/cookbook/mint-to
          - Skills and resources index: https://zkcompression.com/skill.md
          - SPL to Light reference: https://zkcompression.com/api-reference/solana-to-light-comparison
          - Crate: light-token (MintToCpi)
          - Example: https://github.com/Lightprotocol/examples-light-token/tree/main/programs/anchor/basic-instructions/mint-to

          Key CPI struct: `light_token::instruction::MintToCpi`

          ### 1. Index project
          - Grep `declare_id|#\[program\]|anchor_lang|Account<|Pubkey|invoke|mint|supply|amount` across src/
          - Glob `**/*.rs` and `**/Cargo.toml` for project structure
          - Identify: program ID, existing instructions, account structs, mint accounts
          - Read Cargo.toml — note existing dependencies and framework version
          - Task subagent (Grep/Read/WebFetch) if project has multiple crates to scan in parallel

          ### 2. Read references
          - WebFetch the guide above — review the Program tab CPI code samples
          - WebFetch skill.md — check for a dedicated skill and resources matching this task
          - TaskCreate one todo per phase below to track progress

          ### 3. Clarify intention
          - AskUserQuestion: what is the goal? (add mint-to to existing program, new program from scratch, migrate from SPL mint_to)
          - AskUserQuestion: should the authority be an external signer or a PDA? (determines invoke vs invoke_signed)
          - Summarize findings and wait for user confirmation before implementing

          ### 4. Create plan
          - Based on steps 1–3, draft an implementation plan: which files to modify, what code to add, dependency changes
          - Follow the guide's step order: Build MintToCpi struct → call .invoke() or .invoke_signed()
          - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
          - Present the plan to the user for approval before proceeding

          ### 5. Implement
          - Add deps if missing: Bash `cargo add light-token anchor-lang@0.31`
          - Follow the guide and the approved plan
          - Write/Edit to create or modify files
          - TaskUpdate to mark each step done

          ### 6. Verify
          - Bash `anchor build`
          - Bash `anchor test` if tests exist
          - TaskUpdate to mark complete

          ### Tools
          - mcp__zkcompression__SearchLightProtocol("<query>") for API details
          - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
          - Task subagent with Grep/Read/WebFetch for parallel lookups
          - TaskList to check remaining work
          ```
        </Tab>
      </Tabs>
    </Accordion>

    <Accordion title="Transfer (interface)">
      Copy the prompt below or view the [guide](/light-token/cookbook/transfer-interface).

      <Tabs>
        <Tab title="TypeScript Client">
          <Prompt description="Transfer tokens between Light Token and SPL accounts" actions={["copy", "cursor"]}>
            {`---
                        description: Transfer tokens between Light Token and SPL accounts
                        allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
                        ---

                        ## Transfer tokens between Light Token and SPL accounts

                        Context:
                        - Guide: https://zkcompression.com/light-token/cookbook/transfer-interface
                        - Skills and resources index: https://zkcompression.com/skill.md
                        - SPL to Light reference: https://zkcompression.com/api-reference/solana-to-light-comparison
                        - Packages: @lightprotocol/compressed-token, @lightprotocol/stateless.js

                        transferInterface() transfers tokens in a single call. The recipient parameter is a wallet public key.
                        Pass the source token-account owner pubkey and the signing authority separately: owner-signed flows use (owner.publicKey, owner); delegated flows use (owner.publicKey, delegate). Do not use removed InterfaceOptions.owner.
                        The SDK derives and creates the destination ATA internally. All transfers use transferChecked under the hood.
                        - Light Token → Light Token: transfers between Light Token accounts
                        - SPL → Light Token: locks SPL tokens in interface PDA, mints to Light Token account
                        - Light Token → SPL: burns Light Token balance, releases SPL tokens from interface PDA

                        Edge case: for explicit destination token accounts (PDA/program-owned), use transferToAccountInterface()
                        or createTransferToAccountInterfaceInstructions(). Most integrations should use transferInterface().

                        ### 1. Index project
                        - Grep \`@solana/spl-token|Connection|Keypair|transfer|transferInterface\` across src/
                        - Glob \`**/*.ts\` for project structure
                        - Identify: RPC setup, existing transfer logic, entry point for transfers
                        - Task subagent (Grep/Read/WebFetch) if project has multiple packages to scan in parallel

                        ### 2. Read references
                        - WebFetch the guide above — follow the TypeScript Client tab
                        - WebFetch skill.md — check for a dedicated skill and resources matching this task
                        - TaskCreate one todo per phase below to track progress

                        ### 3. Clarify intention
                        - AskUserQuestion: what is the goal? (new feature, migrate existing SPL code, add alongside existing)
                        - AskUserQuestion: does the project already have transfer operations to extend, or is this greenfield?
                        - Summarize findings and wait for user confirmation before implementing

                        ### 4. Create plan
                        - Based on steps 1–3, draft an implementation plan: which files to modify, what code to add, dependency changes
                        - Verify existing connection/signer setup is compatible with the cookbook prerequisites
                        - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
                        - Present the plan to the user for approval before proceeding

                        ### 5. Implement
                        - Add deps if missing: Bash \`npm install @lightprotocol/compressed-token @lightprotocol/stateless.js\`
                        - Follow the cookbook guide and the approved plan
                        - Write/Edit to create or modify files
                        - TaskUpdate to mark each step done

                        ### 6. Verify
                        - Bash \`tsc --noEmit\`
                        - Bash run existing test suite if present
                        - TaskUpdate to mark complete

                        ### Tools
                        - mcp__zkcompression__SearchLightProtocol("<query>") for API details
                        - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
                        - Task subagent with Grep/Read/WebFetch for parallel lookups
                        - TaskList to check remaining work`}
          </Prompt>

          ```text theme={null}
          ---
          description: Transfer tokens between Light Token and SPL accounts
          allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
          ---

          ## Transfer tokens between Light Token and SPL accounts

          Context:
          - Guide: https://zkcompression.com/light-token/cookbook/transfer-interface
          - Skills and resources index: https://zkcompression.com/skill.md
          - SPL to Light reference: https://zkcompression.com/api-reference/solana-to-light-comparison
          - Packages: @lightprotocol/compressed-token, @lightprotocol/stateless.js

          transferInterface() transfers tokens in a single call. The recipient parameter is a wallet public key.
          Pass the source token-account owner pubkey and the signing authority separately: owner-signed flows use (owner.publicKey, owner); delegated flows use (owner.publicKey, delegate). Do not use removed InterfaceOptions.owner.
          The SDK derives and creates the destination ATA internally. All transfers use transferChecked under the hood.
          - Light Token → Light Token: transfers between Light Token accounts
          - SPL → Light Token: locks SPL tokens in interface PDA, mints to Light Token account
          - Light Token → SPL: burns Light Token balance, releases SPL tokens from interface PDA

          Edge case: for explicit destination token accounts (PDA/program-owned), use transferToAccountInterface()
          or createTransferToAccountInterfaceInstructions(). Most integrations should use transferInterface().

          ### 1. Index project
          - Grep `@solana/spl-token|Connection|Keypair|transfer|transferInterface` across src/
          - Glob `**/*.ts` for project structure
          - Identify: RPC setup, existing transfer logic, entry point for transfers
          - Task subagent (Grep/Read/WebFetch) if project has multiple packages to scan in parallel

          ### 2. Read references
          - WebFetch the guide above — follow the TypeScript Client tab
          - WebFetch skill.md — check for a dedicated skill and resources matching this task
          - TaskCreate one todo per phase below to track progress

          ### 3. Clarify intention
          - AskUserQuestion: what is the goal? (new feature, migrate existing SPL code, add alongside existing)
          - AskUserQuestion: does the project already have transfer operations to extend, or is this greenfield?
          - Summarize findings and wait for user confirmation before implementing

          ### 4. Create plan
          - Based on steps 1–3, draft an implementation plan: which files to modify, what code to add, dependency changes
          - Verify existing connection/signer setup is compatible with the cookbook prerequisites
          - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
          - Present the plan to the user for approval before proceeding

          ### 5. Implement
          - Add deps if missing: Bash `npm install @lightprotocol/compressed-token @lightprotocol/stateless.js`
          - Follow the cookbook guide and the approved plan
          - Write/Edit to create or modify files
          - TaskUpdate to mark each step done

          ### 6. Verify
          - Bash `tsc --noEmit`
          - Bash run existing test suite if present
          - TaskUpdate to mark complete

          ### Tools
          - mcp__zkcompression__SearchLightProtocol("<query>") for API details
          - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
          - Task subagent with Grep/Read/WebFetch for parallel lookups
          - TaskList to check remaining work
          ```
        </Tab>

        <Tab title="Rust Client">
          <Prompt description="Transfer tokens between Light Token and SPL accounts" actions={["copy", "cursor"]}>
            {`---
                        description: Transfer tokens between Light Token and SPL accounts
                        allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
                        ---

                        ## Transfer tokens between Light Token and SPL accounts

                        Context:
                        - Guide: https://zkcompression.com/light-token/cookbook/transfer-interface
                        - Skills and resources index: https://zkcompression.com/skill.md
                        - SPL to Light reference: https://zkcompression.com/api-reference/solana-to-light-comparison
                        - Crates: light-token-client (actions), light-token (instructions), light-client (RPC)

                        TransferInterface transfers tokens between token accounts (SPL, Token 2022, or Light Token) in a single call.
                        - Light Token → Light Token: transfers between Light Token accounts
                        - SPL → Light Token: locks SPL tokens in interface PDA, mints to Light Token account
                        - Light Token → SPL: burns Light Token balance, releases SPL tokens from interface PDA

                        SPL equivalent: spl_token::instruction::transfer → Light Token: TransferInterface

                        ### 1. Index project
                        - Grep \`light_token::|light_token_client::|solana_sdk|Keypair|async|TransferInterface|transfer\` across src/
                        - Glob \`**/*.rs\` for project structure
                        - Identify: RPC setup, existing token ops, entry point for transfers
                        - Check Cargo.toml for existing light-* dependencies and solana-sdk version
                        - Task subagent (Grep/Read/WebFetch) if project has multiple crates to scan in parallel

                        ### 2. Read references
                        - WebFetch the guide above — follow the Rust Client tab
                        - WebFetch skill.md — check for a dedicated skill and resources matching this task
                        - TaskCreate one todo per phase below to track progress

                        ### 3. Clarify intention
                        - AskUserQuestion: what is the goal? (new feature, migrate existing SPL code, add alongside existing)
                        - AskUserQuestion: does the project already have transfer operations to extend, or is this greenfield?
                        - AskUserQuestion: action-level API (high-level, fewer lines) or instruction-level API (low-level, full control)?
                        - Summarize findings and wait for user confirmation before implementing

                        ### 4. Create plan
                        - Based on steps 1–3, draft an implementation plan: which files to modify, what code to add, dependency changes
                        - Verify existing Rpc/signer setup is compatible with the cookbook prerequisites (light_client::rpc::Rpc, solana_sdk::signature::Keypair)
                        - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
                        - Present the plan to the user for approval before proceeding

                        ### 5. Implement
                        - Add deps if missing: Bash \`cargo add light-token-client light-token light-client --features light-client/v2\`
                        - Follow the cookbook guide and the approved plan
                        - Write/Edit to create or modify files
                        - TaskUpdate to mark each step done

                        ### 6. Verify
                        - Bash \`cargo check\`
                        - Bash \`cargo test\` if tests exist
                        - TaskUpdate to mark complete

                        ### Tools
                        - mcp__zkcompression__SearchLightProtocol("<query>") for API details
                        - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
                        - Task subagent with Grep/Read/WebFetch for parallel lookups
                        - TaskList to check remaining work`}
          </Prompt>

          ```text theme={null}
          ---
          description: Transfer tokens between Light Token and SPL accounts
          allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
          ---

          ## Transfer tokens between Light Token and SPL accounts

          Context:
          - Guide: https://zkcompression.com/light-token/cookbook/transfer-interface
          - Skills and resources index: https://zkcompression.com/skill.md
          - SPL to Light reference: https://zkcompression.com/api-reference/solana-to-light-comparison
          - Crates: light-token-client (actions), light-token (instructions), light-client (RPC)

          TransferInterface transfers tokens between token accounts (SPL, Token 2022, or Light Token) in a single call.
          - Light Token → Light Token: transfers between Light Token accounts
          - SPL → Light Token: locks SPL tokens in interface PDA, mints to Light Token account
          - Light Token → SPL: burns Light Token balance, releases SPL tokens from interface PDA

          SPL equivalent: spl_token::instruction::transfer → Light Token: TransferInterface

          ### 1. Index project
          - Grep `light_token::|light_token_client::|solana_sdk|Keypair|async|TransferInterface|transfer` across src/
          - Glob `**/*.rs` for project structure
          - Identify: RPC setup, existing token ops, entry point for transfers
          - Check Cargo.toml for existing light-* dependencies and solana-sdk version
          - Task subagent (Grep/Read/WebFetch) if project has multiple crates to scan in parallel

          ### 2. Read references
          - WebFetch the guide above — follow the Rust Client tab
          - WebFetch skill.md — check for a dedicated skill and resources matching this task
          - TaskCreate one todo per phase below to track progress

          ### 3. Clarify intention
          - AskUserQuestion: what is the goal? (new feature, migrate existing SPL code, add alongside existing)
          - AskUserQuestion: does the project already have transfer operations to extend, or is this greenfield?
          - AskUserQuestion: action-level API (high-level, fewer lines) or instruction-level API (low-level, full control)?
          - Summarize findings and wait for user confirmation before implementing

          ### 4. Create plan
          - Based on steps 1–3, draft an implementation plan: which files to modify, what code to add, dependency changes
          - Verify existing Rpc/signer setup is compatible with the cookbook prerequisites (light_client::rpc::Rpc, solana_sdk::signature::Keypair)
          - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
          - Present the plan to the user for approval before proceeding

          ### 5. Implement
          - Add deps if missing: Bash `cargo add light-token-client light-token light-client --features light-client/v2`
          - Follow the cookbook guide and the approved plan
          - Write/Edit to create or modify files
          - TaskUpdate to mark each step done

          ### 6. Verify
          - Bash `cargo check`
          - Bash `cargo test` if tests exist
          - TaskUpdate to mark complete

          ### Tools
          - mcp__zkcompression__SearchLightProtocol("<query>") for API details
          - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
          - Task subagent with Grep/Read/WebFetch for parallel lookups
          - TaskList to check remaining work
          ```
        </Tab>

        <Tab title="Program CPI">
          <Prompt description="Add transfer-interface CPI to an Anchor program" actions={["copy", "cursor"]}>
            {`---
                        description: Add transfer-interface CPI to an Anchor program
                        allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
                        ---

                        ## Add transfer-interface CPI to an Anchor program

                        Context:
                        - Guide: https://zkcompression.com/light-token/cookbook/transfer-interface
                        - Skills and resources index: https://zkcompression.com/skill.md
                        - SPL to Light reference: https://zkcompression.com/api-reference/solana-to-light-comparison
                        - Crate: light-token (TransferInterfaceCpi)
                        - Example: https://github.com/Lightprotocol/examples-light-token/tree/main/programs/anchor/basic-instructions/transfer-interface

                        Key CPI struct: \`light_token::instruction::TransferInterfaceCpi\`

                        ### 1. Index project
                        - Grep \`declare_id|#\[program\]|anchor_lang|Account<|Pubkey|invoke|transfer|decimals|interface\` across src/
                        - Glob \`**/*.rs\` and \`**/Cargo.toml\` for project structure
                        - Identify: program ID, existing instructions, account structs, token accounts
                        - Read Cargo.toml — note existing dependencies and framework version
                        - Task subagent (Grep/Read/WebFetch) if project has multiple crates to scan in parallel

                        ### 2. Read references
                        - WebFetch the guide above — review the Program tab CPI code samples
                        - WebFetch skill.md — check for a dedicated skill and resources matching this task
                        - TaskCreate one todo per phase below to track progress

                        ### 3. Clarify intention
                        - AskUserQuestion: what is the goal? (add transfer-interface to existing program, new program from scratch, migrate from SPL transfer)
                        - AskUserQuestion: should the authority be an external signer or a PDA? (determines invoke vs invoke_signed)
                        - AskUserQuestion: which token types will be transferred? (SPL, Token 2022, Light Token, or all via interface)
                        - Summarize findings and wait for user confirmation before implementing

                        ### 4. Create plan
                        - Based on steps 1–3, draft an implementation plan: which files to modify, what code to add, dependency changes
                        - Follow the guide's step order: Build TransferInterfaceCpi → call .invoke() or .invoke_signed()
                        - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
                        - Present the plan to the user for approval before proceeding

                        ### 5. Implement
                        - Add deps if missing: Bash \`cargo add light-token anchor-lang@0.31\`
                        - Follow the guide and the approved plan
                        - Write/Edit to create or modify files
                        - TaskUpdate to mark each step done

                        ### 6. Verify
                        - Bash \`anchor build\`
                        - Bash \`anchor test\` if tests exist
                        - TaskUpdate to mark complete

                        ### Tools
                        - mcp__zkcompression__SearchLightProtocol("<query>") for API details
                        - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
                        - Task subagent with Grep/Read/WebFetch for parallel lookups
                        - TaskList to check remaining work`}
          </Prompt>

          ```text theme={null}
          ---
          description: Add transfer-interface CPI to an Anchor program
          allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
          ---

          ## Add transfer-interface CPI to an Anchor program

          Context:
          - Guide: https://zkcompression.com/light-token/cookbook/transfer-interface
          - Skills and resources index: https://zkcompression.com/skill.md
          - SPL to Light reference: https://zkcompression.com/api-reference/solana-to-light-comparison
          - Crate: light-token (TransferInterfaceCpi)
          - Example: https://github.com/Lightprotocol/examples-light-token/tree/main/programs/anchor/basic-instructions/transfer-interface

          Key CPI struct: `light_token::instruction::TransferInterfaceCpi`

          ### 1. Index project
          - Grep `declare_id|#\[program\]|anchor_lang|Account<|Pubkey|invoke|transfer|decimals|interface` across src/
          - Glob `**/*.rs` and `**/Cargo.toml` for project structure
          - Identify: program ID, existing instructions, account structs, token accounts
          - Read Cargo.toml — note existing dependencies and framework version
          - Task subagent (Grep/Read/WebFetch) if project has multiple crates to scan in parallel

          ### 2. Read references
          - WebFetch the guide above — review the Program tab CPI code samples
          - WebFetch skill.md — check for a dedicated skill and resources matching this task
          - TaskCreate one todo per phase below to track progress

          ### 3. Clarify intention
          - AskUserQuestion: what is the goal? (add transfer-interface to existing program, new program from scratch, migrate from SPL transfer)
          - AskUserQuestion: should the authority be an external signer or a PDA? (determines invoke vs invoke_signed)
          - AskUserQuestion: which token types will be transferred? (SPL, Token 2022, Light Token, or all via interface)
          - Summarize findings and wait for user confirmation before implementing

          ### 4. Create plan
          - Based on steps 1–3, draft an implementation plan: which files to modify, what code to add, dependency changes
          - Follow the guide's step order: Build TransferInterfaceCpi → call .invoke() or .invoke_signed()
          - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
          - Present the plan to the user for approval before proceeding

          ### 5. Implement
          - Add deps if missing: Bash `cargo add light-token anchor-lang@0.31`
          - Follow the guide and the approved plan
          - Write/Edit to create or modify files
          - TaskUpdate to mark each step done

          ### 6. Verify
          - Bash `anchor build`
          - Bash `anchor test` if tests exist
          - TaskUpdate to mark complete

          ### Tools
          - mcp__zkcompression__SearchLightProtocol("<query>") for API details
          - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
          - Task subagent with Grep/Read/WebFetch for parallel lookups
          - TaskList to check remaining work
          ```
        </Tab>
      </Tabs>
    </Accordion>

    <Accordion title="Transfer (checked)">
      Copy the prompt below or view the [guide](/light-token/cookbook/transfer-checked).

      <Tabs>
        <Tab title="Rust Client">
          <Prompt description="Transfer tokens with decimal validation" actions={["copy", "cursor"]}>
            {`---
                        description: Transfer tokens with decimal validation
                        allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
                        ---

                        ## Transfer tokens with decimal validation

                        Context:
                        - Guide: https://zkcompression.com/light-token/cookbook/transfer-checked
                        - Skills and resources index: https://zkcompression.com/skill.md
                        - SPL to Light reference: https://zkcompression.com/api-reference/solana-to-light-comparison
                        - Crates: light-token-client (actions), light-token (instructions), light-client (RPC)

                        TransferChecked validates that the decimals parameter matches the mint's decimals. Use for Light→Light transfers when you need decimal verification. For transfers involving SPL or Token 2022 accounts, use TransferInterface instead.

                        SPL equivalent: spl_token::instruction::transfer_checked → Light Token: TransferChecked

                        ### 1. Index project
                        - Grep \`light_token::|light_token_client::|solana_sdk|Keypair|async|TransferChecked|transfer_checked\` across src/
                        - Glob \`**/*.rs\` for project structure
                        - Identify: RPC setup, existing token ops, entry point for transfer checked
                        - Check Cargo.toml for existing light-* dependencies and solana-sdk version
                        - Task subagent (Grep/Read/WebFetch) if project has multiple crates to scan in parallel

                        ### 2. Read references
                        - WebFetch the guide above — follow the Rust Client tab
                        - WebFetch skill.md — check for a dedicated skill and resources matching this task
                        - TaskCreate one todo per phase below to track progress

                        ### 3. Clarify intention
                        - AskUserQuestion: what is the goal? (new feature, migrate existing SPL code, add alongside existing)
                        - AskUserQuestion: does the project already have transfer operations to extend, or is this greenfield?
                        - AskUserQuestion: action-level API (high-level, fewer lines) or instruction-level API (low-level, full control)?
                        - Summarize findings and wait for user confirmation before implementing

                        ### 4. Create plan
                        - Based on steps 1–3, draft an implementation plan: which files to modify, what code to add, dependency changes
                        - Verify existing Rpc/signer setup is compatible with the cookbook prerequisites (light_client::rpc::Rpc, solana_sdk::signature::Keypair)
                        - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
                        - Present the plan to the user for approval before proceeding

                        ### 5. Implement
                        - Add deps if missing: Bash \`cargo add light-token-client light-token light-client --features light-client/v2\`
                        - Follow the cookbook guide and the approved plan
                        - Write/Edit to create or modify files
                        - TaskUpdate to mark each step done

                        ### 6. Verify
                        - Bash \`cargo check\`
                        - Bash \`cargo test\` if tests exist
                        - TaskUpdate to mark complete

                        ### Tools
                        - mcp__zkcompression__SearchLightProtocol("<query>") for API details
                        - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
                        - Task subagent with Grep/Read/WebFetch for parallel lookups
                        - TaskList to check remaining work`}
          </Prompt>

          ```text theme={null}
          ---
          description: Transfer tokens with decimal validation
          allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
          ---

          ## Transfer tokens with decimal validation

          Context:
          - Guide: https://zkcompression.com/light-token/cookbook/transfer-checked
          - Skills and resources index: https://zkcompression.com/skill.md
          - SPL to Light reference: https://zkcompression.com/api-reference/solana-to-light-comparison
          - Crates: light-token-client (actions), light-token (instructions), light-client (RPC)

          TransferChecked validates that the decimals parameter matches the mint's decimals. Use for Light→Light transfers when you need decimal verification. For transfers involving SPL or Token 2022 accounts, use TransferInterface instead.

          SPL equivalent: spl_token::instruction::transfer_checked → Light Token: TransferChecked

          ### 1. Index project
          - Grep `light_token::|light_token_client::|solana_sdk|Keypair|async|TransferChecked|transfer_checked` across src/
          - Glob `**/*.rs` for project structure
          - Identify: RPC setup, existing token ops, entry point for transfer checked
          - Check Cargo.toml for existing light-* dependencies and solana-sdk version
          - Task subagent (Grep/Read/WebFetch) if project has multiple crates to scan in parallel

          ### 2. Read references
          - WebFetch the guide above — follow the Rust Client tab
          - WebFetch skill.md — check for a dedicated skill and resources matching this task
          - TaskCreate one todo per phase below to track progress

          ### 3. Clarify intention
          - AskUserQuestion: what is the goal? (new feature, migrate existing SPL code, add alongside existing)
          - AskUserQuestion: does the project already have transfer operations to extend, or is this greenfield?
          - AskUserQuestion: action-level API (high-level, fewer lines) or instruction-level API (low-level, full control)?
          - Summarize findings and wait for user confirmation before implementing

          ### 4. Create plan
          - Based on steps 1–3, draft an implementation plan: which files to modify, what code to add, dependency changes
          - Verify existing Rpc/signer setup is compatible with the cookbook prerequisites (light_client::rpc::Rpc, solana_sdk::signature::Keypair)
          - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
          - Present the plan to the user for approval before proceeding

          ### 5. Implement
          - Add deps if missing: Bash `cargo add light-token-client light-token light-client --features light-client/v2`
          - Follow the cookbook guide and the approved plan
          - Write/Edit to create or modify files
          - TaskUpdate to mark each step done

          ### 6. Verify
          - Bash `cargo check`
          - Bash `cargo test` if tests exist
          - TaskUpdate to mark complete

          ### Tools
          - mcp__zkcompression__SearchLightProtocol("<query>") for API details
          - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
          - Task subagent with Grep/Read/WebFetch for parallel lookups
          - TaskList to check remaining work
          ```
        </Tab>

        <Tab title="Program CPI">
          <Prompt description="Add transfer-checked CPI to an Anchor program" actions={["copy", "cursor"]}>
            {`---
                        description: Add transfer-checked CPI to an Anchor program
                        allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
                        ---

                        ## Add transfer-checked CPI to an Anchor program

                        Context:
                        - Guide: https://zkcompression.com/light-token/cookbook/transfer-checked
                        - Skills and resources index: https://zkcompression.com/skill.md
                        - SPL to Light reference: https://zkcompression.com/api-reference/solana-to-light-comparison
                        - Crate: light-token (TransferCheckedCpi)
                        - Example: https://github.com/Lightprotocol/examples-light-token/tree/main/programs/anchor/basic-instructions/transfer-checked

                        Key CPI struct: \`light_token::instruction::TransferCheckedCpi\`

                        Note: TransferInterface uses TransferChecked under the hood for Light-to-Light transfers.
                        Use TransferChecked/TransferCheckedCpi directly only when you need Light-to-Light without interface routing.

                        ### 1. Index project
                        - Grep \`declare_id|#\[program\]|anchor_lang|Account<|Pubkey|invoke|transfer|decimals|amount\` across src/
                        - Glob \`**/*.rs\` and \`**/Cargo.toml\` for project structure
                        - Identify: program ID, existing instructions, account structs, token accounts
                        - Read Cargo.toml — note existing dependencies and framework version
                        - Task subagent (Grep/Read/WebFetch) if project has multiple crates to scan in parallel

                        ### 2. Read references
                        - WebFetch the guide above — review the Program tab CPI code samples
                        - WebFetch skill.md — check for a dedicated skill and resources matching this task
                        - TaskCreate one todo per phase below to track progress

                        ### 3. Clarify intention
                        - AskUserQuestion: what is the goal? (add transfer-checked to existing program, new program from scratch, migrate from SPL transfer_checked)
                        - AskUserQuestion: should the authority be an external signer or a PDA? (determines invoke vs invoke_signed)
                        - Summarize findings and wait for user confirmation before implementing

                        ### 4. Create plan
                        - Based on steps 1–3, draft an implementation plan: which files to modify, what code to add, dependency changes
                        - Follow the guide's step order: Build TransferCheckedCpi struct → call .invoke() or .invoke_signed()
                        - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
                        - Present the plan to the user for approval before proceeding

                        ### 5. Implement
                        - Add deps if missing: Bash \`cargo add light-token anchor-lang@0.31\`
                        - Follow the guide and the approved plan
                        - Write/Edit to create or modify files
                        - TaskUpdate to mark each step done

                        ### 6. Verify
                        - Bash \`anchor build\`
                        - Bash \`anchor test\` if tests exist
                        - TaskUpdate to mark complete

                        ### Tools
                        - mcp__zkcompression__SearchLightProtocol("<query>") for API details
                        - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
                        - Task subagent with Grep/Read/WebFetch for parallel lookups
                        - TaskList to check remaining work`}
          </Prompt>

          ```text theme={null}
          ---
          description: Add transfer-checked CPI to an Anchor program
          allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
          ---

          ## Add transfer-checked CPI to an Anchor program

          Context:
          - Guide: https://zkcompression.com/light-token/cookbook/transfer-checked
          - Skills and resources index: https://zkcompression.com/skill.md
          - SPL to Light reference: https://zkcompression.com/api-reference/solana-to-light-comparison
          - Crate: light-token (TransferCheckedCpi)
          - Example: https://github.com/Lightprotocol/examples-light-token/tree/main/programs/anchor/basic-instructions/transfer-checked

          Key CPI struct: `light_token::instruction::TransferCheckedCpi`

          Note: TransferInterface uses TransferChecked under the hood for Light-to-Light transfers.
          Use TransferChecked/TransferCheckedCpi directly only when you need Light-to-Light without interface routing.

          ### 1. Index project
          - Grep `declare_id|#\[program\]|anchor_lang|Account<|Pubkey|invoke|transfer|decimals|amount` across src/
          - Glob `**/*.rs` and `**/Cargo.toml` for project structure
          - Identify: program ID, existing instructions, account structs, token accounts
          - Read Cargo.toml — note existing dependencies and framework version
          - Task subagent (Grep/Read/WebFetch) if project has multiple crates to scan in parallel

          ### 2. Read references
          - WebFetch the guide above — review the Program tab CPI code samples
          - WebFetch skill.md — check for a dedicated skill and resources matching this task
          - TaskCreate one todo per phase below to track progress

          ### 3. Clarify intention
          - AskUserQuestion: what is the goal? (add transfer-checked to existing program, new program from scratch, migrate from SPL transfer_checked)
          - AskUserQuestion: should the authority be an external signer or a PDA? (determines invoke vs invoke_signed)
          - Summarize findings and wait for user confirmation before implementing

          ### 4. Create plan
          - Based on steps 1–3, draft an implementation plan: which files to modify, what code to add, dependency changes
          - Follow the guide's step order: Build TransferCheckedCpi struct → call .invoke() or .invoke_signed()
          - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
          - Present the plan to the user for approval before proceeding

          ### 5. Implement
          - Add deps if missing: Bash `cargo add light-token anchor-lang@0.31`
          - Follow the guide and the approved plan
          - Write/Edit to create or modify files
          - TaskUpdate to mark each step done

          ### 6. Verify
          - Bash `anchor build`
          - Bash `anchor test` if tests exist
          - TaskUpdate to mark complete

          ### Tools
          - mcp__zkcompression__SearchLightProtocol("<query>") for API details
          - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
          - Task subagent with Grep/Read/WebFetch for parallel lookups
          - TaskList to check remaining work
          ```
        </Tab>
      </Tabs>
    </Accordion>

    <Accordion title="Approve and revoke">
      Copy the prompt below or view the [guide](/light-token/cookbook/approve-revoke).

      <Tabs>
        <Tab title="TypeScript Client">
          <Prompt description="Approve and revoke token delegates" actions={["copy", "cursor"]}>
            {`---
                        description: Approve and revoke token delegates
                        allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
                        ---

                        ## Approve and revoke token delegates

                        Context:
                        - Guide: https://zkcompression.com/light-token/cookbook/approve-revoke
                        - Skills and resources index: https://zkcompression.com/skill.md
                        - SPL to Light reference: https://zkcompression.com/api-reference/solana-to-light-comparison
                        - Packages: @lightprotocol/compressed-token, @lightprotocol/stateless.js

                        SPL equivalent: approve() / revoke() → Light Token: approve() / revoke()

                        ### 1. Index project
                        - Grep \`@solana/spl-token|Connection|Keypair|approve|revoke|delegate\` across src/
                        - Glob \`**/*.ts\` for project structure
                        - Identify: RPC setup, existing delegation logic, entry point for delegation
                        - Task subagent (Grep/Read/WebFetch) if project has multiple packages to scan in parallel

                        ### 2. Read references
                        - WebFetch the guide above — follow the TypeScript Client tab
                        - WebFetch skill.md — check for a dedicated skill and resources matching this task
                        - TaskCreate one todo per phase below to track progress

                        ### 3. Clarify intention
                        - AskUserQuestion: what is the goal? (new feature, migrate existing SPL code, add alongside existing)
                        - AskUserQuestion: does the project already have delegate operations to extend, or is this greenfield?
                        - Summarize findings and wait for user confirmation before implementing

                        ### 4. Create plan
                        - Based on steps 1–3, draft an implementation plan: which files to modify, what code to add, dependency changes
                        - Verify existing connection/signer setup is compatible with the cookbook prerequisites
                        - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
                        - Present the plan to the user for approval before proceeding

                        ### 5. Implement
                        - Add deps if missing: Bash \`npm install @lightprotocol/compressed-token @lightprotocol/stateless.js\`
                        - Follow the cookbook guide and the approved plan
                        - Write/Edit to create or modify files
                        - TaskUpdate to mark each step done

                        ### 6. Verify
                        - Bash \`tsc --noEmit\`
                        - Bash run existing test suite if present
                        - TaskUpdate to mark complete

                        ### Tools
                        - mcp__zkcompression__SearchLightProtocol("<query>") for API details
                        - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
                        - Task subagent with Grep/Read/WebFetch for parallel lookups
                        - TaskList to check remaining work`}
          </Prompt>

          ```text theme={null}
          ---
          description: Approve and revoke token delegates
          allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
          ---

          ## Approve and revoke token delegates

          Context:
          - Guide: https://zkcompression.com/light-token/cookbook/approve-revoke
          - Skills and resources index: https://zkcompression.com/skill.md
          - SPL to Light reference: https://zkcompression.com/api-reference/solana-to-light-comparison
          - Packages: @lightprotocol/compressed-token, @lightprotocol/stateless.js

          SPL equivalent: approve() / revoke() → Light Token: approve() / revoke()

          ### 1. Index project
          - Grep `@solana/spl-token|Connection|Keypair|approve|revoke|delegate` across src/
          - Glob `**/*.ts` for project structure
          - Identify: RPC setup, existing delegation logic, entry point for delegation
          - Task subagent (Grep/Read/WebFetch) if project has multiple packages to scan in parallel

          ### 2. Read references
          - WebFetch the guide above — follow the TypeScript Client tab
          - WebFetch skill.md — check for a dedicated skill and resources matching this task
          - TaskCreate one todo per phase below to track progress

          ### 3. Clarify intention
          - AskUserQuestion: what is the goal? (new feature, migrate existing SPL code, add alongside existing)
          - AskUserQuestion: does the project already have delegate operations to extend, or is this greenfield?
          - Summarize findings and wait for user confirmation before implementing

          ### 4. Create plan
          - Based on steps 1–3, draft an implementation plan: which files to modify, what code to add, dependency changes
          - Verify existing connection/signer setup is compatible with the cookbook prerequisites
          - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
          - Present the plan to the user for approval before proceeding

          ### 5. Implement
          - Add deps if missing: Bash `npm install @lightprotocol/compressed-token @lightprotocol/stateless.js`
          - Follow the cookbook guide and the approved plan
          - Write/Edit to create or modify files
          - TaskUpdate to mark each step done

          ### 6. Verify
          - Bash `tsc --noEmit`
          - Bash run existing test suite if present
          - TaskUpdate to mark complete

          ### Tools
          - mcp__zkcompression__SearchLightProtocol("<query>") for API details
          - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
          - Task subagent with Grep/Read/WebFetch for parallel lookups
          - TaskList to check remaining work
          ```
        </Tab>

        <Tab title="Rust Client">
          <Prompt description="Approve and revoke token delegates" actions={["copy", "cursor"]}>
            {`---
                        description: Approve and revoke token delegates
                        allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
                        ---

                        ## Approve and revoke token delegates

                        Context:
                        - Guide: https://zkcompression.com/light-token/cookbook/approve-revoke
                        - Skills and resources index: https://zkcompression.com/skill.md
                        - SPL to Light reference: https://zkcompression.com/api-reference/solana-to-light-comparison
                        - Crates: light-token-client (actions), light-token (instructions), light-client (RPC)

                        SPL equivalent: spl_token::instruction::approve / revoke → Light Token: Approve / Revoke

                        ### 1. Index project
                        - Grep \`light_token::|light_token_client::|solana_sdk|Keypair|async|Approve|Revoke|delegate\` across src/
                        - Glob \`**/*.rs\` for project structure
                        - Identify: RPC setup, existing token ops, entry point for delegation
                        - Check Cargo.toml for existing light-* dependencies and solana-sdk version
                        - Task subagent (Grep/Read/WebFetch) if project has multiple crates to scan in parallel

                        ### 2. Read references
                        - WebFetch the guide above — follow the Rust Client tab
                        - WebFetch skill.md — check for a dedicated skill and resources matching this task
                        - TaskCreate one todo per phase below to track progress

                        ### 3. Clarify intention
                        - AskUserQuestion: what is the goal? (new feature, migrate existing SPL code, add alongside existing)
                        - AskUserQuestion: does the project already have delegation operations to extend, or is this greenfield?
                        - AskUserQuestion: action-level API (high-level, fewer lines) or instruction-level API (low-level, full control)?
                        - Summarize findings and wait for user confirmation before implementing

                        ### 4. Create plan
                        - Based on steps 1–3, draft an implementation plan: which files to modify, what code to add, dependency changes
                        - Verify existing Rpc/signer setup is compatible with the cookbook prerequisites (light_client::rpc::Rpc, solana_sdk::signature::Keypair)
                        - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
                        - Present the plan to the user for approval before proceeding

                        ### 5. Implement
                        - Add deps if missing: Bash \`cargo add light-token-client light-token light-client --features light-client/v2\`
                        - Follow the cookbook guide and the approved plan
                        - Write/Edit to create or modify files
                        - TaskUpdate to mark each step done

                        ### 6. Verify
                        - Bash \`cargo check\`
                        - Bash \`cargo test\` if tests exist
                        - TaskUpdate to mark complete

                        ### Tools
                        - mcp__zkcompression__SearchLightProtocol("<query>") for API details
                        - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
                        - Task subagent with Grep/Read/WebFetch for parallel lookups
                        - TaskList to check remaining work`}
          </Prompt>

          ```text theme={null}
          ---
          description: Approve and revoke token delegates
          allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
          ---

          ## Approve and revoke token delegates

          Context:
          - Guide: https://zkcompression.com/light-token/cookbook/approve-revoke
          - Skills and resources index: https://zkcompression.com/skill.md
          - SPL to Light reference: https://zkcompression.com/api-reference/solana-to-light-comparison
          - Crates: light-token-client (actions), light-token (instructions), light-client (RPC)

          SPL equivalent: spl_token::instruction::approve / revoke → Light Token: Approve / Revoke

          ### 1. Index project
          - Grep `light_token::|light_token_client::|solana_sdk|Keypair|async|Approve|Revoke|delegate` across src/
          - Glob `**/*.rs` for project structure
          - Identify: RPC setup, existing token ops, entry point for delegation
          - Check Cargo.toml for existing light-* dependencies and solana-sdk version
          - Task subagent (Grep/Read/WebFetch) if project has multiple crates to scan in parallel

          ### 2. Read references
          - WebFetch the guide above — follow the Rust Client tab
          - WebFetch skill.md — check for a dedicated skill and resources matching this task
          - TaskCreate one todo per phase below to track progress

          ### 3. Clarify intention
          - AskUserQuestion: what is the goal? (new feature, migrate existing SPL code, add alongside existing)
          - AskUserQuestion: does the project already have delegation operations to extend, or is this greenfield?
          - AskUserQuestion: action-level API (high-level, fewer lines) or instruction-level API (low-level, full control)?
          - Summarize findings and wait for user confirmation before implementing

          ### 4. Create plan
          - Based on steps 1–3, draft an implementation plan: which files to modify, what code to add, dependency changes
          - Verify existing Rpc/signer setup is compatible with the cookbook prerequisites (light_client::rpc::Rpc, solana_sdk::signature::Keypair)
          - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
          - Present the plan to the user for approval before proceeding

          ### 5. Implement
          - Add deps if missing: Bash `cargo add light-token-client light-token light-client --features light-client/v2`
          - Follow the cookbook guide and the approved plan
          - Write/Edit to create or modify files
          - TaskUpdate to mark each step done

          ### 6. Verify
          - Bash `cargo check`
          - Bash `cargo test` if tests exist
          - TaskUpdate to mark complete

          ### Tools
          - mcp__zkcompression__SearchLightProtocol("<query>") for API details
          - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
          - Task subagent with Grep/Read/WebFetch for parallel lookups
          - TaskList to check remaining work
          ```
        </Tab>

        <Tab title="Program CPI">
          <Prompt description="Add approve and revoke CPI to an Anchor program" actions={["copy", "cursor"]}>
            {`---
                        description: Add approve and revoke CPI to an Anchor program
                        allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
                        ---

                        ## Add approve and revoke CPI to an Anchor program

                        Context:
                        - Guide: https://zkcompression.com/light-token/cookbook/approve-revoke
                        - Skills and resources index: https://zkcompression.com/skill.md
                        - SPL to Light reference: https://zkcompression.com/api-reference/solana-to-light-comparison
                        - Crate: light-token (ApproveCpi, RevokeCpi)
                        - Example: https://github.com/Lightprotocol/examples-light-token/tree/main/programs/anchor/basic-instructions/approve

                        Key CPI structs: \`light_token::instruction::ApproveCpi\`, \`light_token::instruction::RevokeCpi\`

                        ### 1. Index project
                        - Grep \`declare_id|#\[program\]|anchor_lang|Account<|Pubkey|invoke|approve|revoke|delegate\` across src/
                        - Glob \`**/*.rs\` and \`**/Cargo.toml\` for project structure
                        - Identify: program ID, existing instructions, account structs, delegate accounts
                        - Read Cargo.toml — note existing dependencies and framework version
                        - Task subagent (Grep/Read/WebFetch) if project has multiple crates to scan in parallel

                        ### 2. Read references
                        - WebFetch the guide above — review both Approve and Revoke CPI code samples
                        - WebFetch skill.md — check for a dedicated skill and resources matching this task
                        - TaskCreate one todo per phase below to track progress

                        ### 3. Clarify intention
                        - AskUserQuestion: what is the goal? (add approve/revoke to existing program, new program from scratch, migrate from SPL approve/revoke)
                        - AskUserQuestion: should the owner be an external signer or a PDA? (determines invoke vs invoke_signed)
                        - AskUserQuestion: do you need both approve and revoke, or just one?
                        - Summarize findings and wait for user confirmation before implementing

                        ### 4. Create plan
                        - Based on steps 1–3, draft an implementation plan: which files to modify, what code to add, dependency changes
                        - Follow the guide's step order: Build ApproveCpi/RevokeCpi structs → call .invoke() or .invoke_signed()
                        - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
                        - Present the plan to the user for approval before proceeding

                        ### 5. Implement
                        - Add deps if missing: Bash \`cargo add light-token anchor-lang@0.31\`
                        - Follow the guide and the approved plan
                        - Write/Edit to create or modify files
                        - TaskUpdate to mark each step done

                        ### 6. Verify
                        - Bash \`anchor build\`
                        - Bash \`anchor test\` if tests exist
                        - TaskUpdate to mark complete

                        ### Tools
                        - mcp__zkcompression__SearchLightProtocol("<query>") for API details
                        - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
                        - Task subagent with Grep/Read/WebFetch for parallel lookups
                        - TaskList to check remaining work`}
          </Prompt>

          ```text theme={null}
          ---
          description: Add approve and revoke CPI to an Anchor program
          allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
          ---

          ## Add approve and revoke CPI to an Anchor program

          Context:
          - Guide: https://zkcompression.com/light-token/cookbook/approve-revoke
          - Skills and resources index: https://zkcompression.com/skill.md
          - SPL to Light reference: https://zkcompression.com/api-reference/solana-to-light-comparison
          - Crate: light-token (ApproveCpi, RevokeCpi)
          - Example: https://github.com/Lightprotocol/examples-light-token/tree/main/programs/anchor/basic-instructions/approve

          Key CPI structs: `light_token::instruction::ApproveCpi`, `light_token::instruction::RevokeCpi`

          ### 1. Index project
          - Grep `declare_id|#\[program\]|anchor_lang|Account<|Pubkey|invoke|approve|revoke|delegate` across src/
          - Glob `**/*.rs` and `**/Cargo.toml` for project structure
          - Identify: program ID, existing instructions, account structs, delegate accounts
          - Read Cargo.toml — note existing dependencies and framework version
          - Task subagent (Grep/Read/WebFetch) if project has multiple crates to scan in parallel

          ### 2. Read references
          - WebFetch the guide above — review both Approve and Revoke CPI code samples
          - WebFetch skill.md — check for a dedicated skill and resources matching this task
          - TaskCreate one todo per phase below to track progress

          ### 3. Clarify intention
          - AskUserQuestion: what is the goal? (add approve/revoke to existing program, new program from scratch, migrate from SPL approve/revoke)
          - AskUserQuestion: should the owner be an external signer or a PDA? (determines invoke vs invoke_signed)
          - AskUserQuestion: do you need both approve and revoke, or just one?
          - Summarize findings and wait for user confirmation before implementing

          ### 4. Create plan
          - Based on steps 1–3, draft an implementation plan: which files to modify, what code to add, dependency changes
          - Follow the guide's step order: Build ApproveCpi/RevokeCpi structs → call .invoke() or .invoke_signed()
          - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
          - Present the plan to the user for approval before proceeding

          ### 5. Implement
          - Add deps if missing: Bash `cargo add light-token anchor-lang@0.31`
          - Follow the guide and the approved plan
          - Write/Edit to create or modify files
          - TaskUpdate to mark each step done

          ### 6. Verify
          - Bash `anchor build`
          - Bash `anchor test` if tests exist
          - TaskUpdate to mark complete

          ### Tools
          - mcp__zkcompression__SearchLightProtocol("<query>") for API details
          - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
          - Task subagent with Grep/Read/WebFetch for parallel lookups
          - TaskList to check remaining work
          ```
        </Tab>
      </Tabs>
    </Accordion>

    <Accordion title="Freeze and thaw">
      Copy the prompt below or view the [guide](/light-token/cookbook/freeze-thaw).

      <Tabs>
        <Tab title="Rust Client">
          <Prompt description="Freeze and thaw Light Token accounts" actions={["copy", "cursor"]}>
            {`---
                        description: Freeze and thaw Light Token accounts
                        allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
                        ---

                        ## Freeze and thaw Light Token accounts

                        Context:
                        - Guide: https://zkcompression.com/light-token/cookbook/freeze-thaw
                        - Skills and resources index: https://zkcompression.com/skill.md
                        - SPL to Light reference: https://zkcompression.com/api-reference/solana-to-light-comparison
                        - Crates: light-token-client (actions), light-token (instructions), light-client (RPC)

                        - Freeze: prevents all transfers or token burns from a specific Light Token account
                        - Thaw: re-enables transfers on a frozen Light Token account
                        - Only the freeze authority (set at mint creation) can freeze or thaw accounts

                        SPL equivalent: spl_token::instruction::freeze_account / thaw_account → Light Token: Freeze / Thaw

                        ### 1. Index project
                        - Grep \`light_token::|light_token_client::|solana_sdk|Keypair|async|Freeze|Thaw|freeze_account|thaw_account\` across src/
                        - Glob \`**/*.rs\` for project structure
                        - Identify: RPC setup, existing token ops, entry point for freeze/thaw
                        - Check Cargo.toml for existing light-* dependencies and solana-sdk version
                        - Task subagent (Grep/Read/WebFetch) if project has multiple crates to scan in parallel

                        ### 2. Read references
                        - WebFetch the guide above — follow the Rust Client tab
                        - WebFetch skill.md — check for a dedicated skill and resources matching this task
                        - TaskCreate one todo per phase below to track progress

                        ### 3. Clarify intention
                        - AskUserQuestion: what is the goal? (new feature, migrate existing SPL code, add alongside existing)
                        - AskUserQuestion: does the project already have freeze/thaw operations to extend, or is this greenfield?
                        - AskUserQuestion: action-level API (high-level, fewer lines) or instruction-level API (low-level, full control)?
                        - Summarize findings and wait for user confirmation before implementing

                        ### 4. Create plan
                        - Based on steps 1–3, draft an implementation plan: which files to modify, what code to add, dependency changes
                        - Verify existing Rpc/signer setup is compatible with the cookbook prerequisites (light_client::rpc::Rpc, solana_sdk::signature::Keypair)
                        - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
                        - Present the plan to the user for approval before proceeding

                        ### 5. Implement
                        - Add deps if missing: Bash \`cargo add light-token-client light-token light-client --features light-client/v2\`
                        - Follow the cookbook guide and the approved plan
                        - Write/Edit to create or modify files
                        - TaskUpdate to mark each step done

                        ### 6. Verify
                        - Bash \`cargo check\`
                        - Bash \`cargo test\` if tests exist
                        - TaskUpdate to mark complete

                        ### Tools
                        - mcp__zkcompression__SearchLightProtocol("<query>") for API details
                        - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
                        - Task subagent with Grep/Read/WebFetch for parallel lookups
                        - TaskList to check remaining work`}
          </Prompt>

          ```text theme={null}
          ---
          description: Freeze and thaw Light Token accounts
          allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
          ---

          ## Freeze and thaw Light Token accounts

          Context:
          - Guide: https://zkcompression.com/light-token/cookbook/freeze-thaw
          - Skills and resources index: https://zkcompression.com/skill.md
          - SPL to Light reference: https://zkcompression.com/api-reference/solana-to-light-comparison
          - Crates: light-token-client (actions), light-token (instructions), light-client (RPC)

          - Freeze: prevents all transfers or token burns from a specific Light Token account
          - Thaw: re-enables transfers on a frozen Light Token account
          - Only the freeze authority (set at mint creation) can freeze or thaw accounts

          SPL equivalent: spl_token::instruction::freeze_account / thaw_account → Light Token: Freeze / Thaw

          ### 1. Index project
          - Grep `light_token::|light_token_client::|solana_sdk|Keypair|async|Freeze|Thaw|freeze_account|thaw_account` across src/
          - Glob `**/*.rs` for project structure
          - Identify: RPC setup, existing token ops, entry point for freeze/thaw
          - Check Cargo.toml for existing light-* dependencies and solana-sdk version
          - Task subagent (Grep/Read/WebFetch) if project has multiple crates to scan in parallel

          ### 2. Read references
          - WebFetch the guide above — follow the Rust Client tab
          - WebFetch skill.md — check for a dedicated skill and resources matching this task
          - TaskCreate one todo per phase below to track progress

          ### 3. Clarify intention
          - AskUserQuestion: what is the goal? (new feature, migrate existing SPL code, add alongside existing)
          - AskUserQuestion: does the project already have freeze/thaw operations to extend, or is this greenfield?
          - AskUserQuestion: action-level API (high-level, fewer lines) or instruction-level API (low-level, full control)?
          - Summarize findings and wait for user confirmation before implementing

          ### 4. Create plan
          - Based on steps 1–3, draft an implementation plan: which files to modify, what code to add, dependency changes
          - Verify existing Rpc/signer setup is compatible with the cookbook prerequisites (light_client::rpc::Rpc, solana_sdk::signature::Keypair)
          - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
          - Present the plan to the user for approval before proceeding

          ### 5. Implement
          - Add deps if missing: Bash `cargo add light-token-client light-token light-client --features light-client/v2`
          - Follow the cookbook guide and the approved plan
          - Write/Edit to create or modify files
          - TaskUpdate to mark each step done

          ### 6. Verify
          - Bash `cargo check`
          - Bash `cargo test` if tests exist
          - TaskUpdate to mark complete

          ### Tools
          - mcp__zkcompression__SearchLightProtocol("<query>") for API details
          - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
          - Task subagent with Grep/Read/WebFetch for parallel lookups
          - TaskList to check remaining work
          ```
        </Tab>

        <Tab title="Program CPI">
          <Prompt description="Add freeze and thaw CPI to an Anchor program" actions={["copy", "cursor"]}>
            {`---
                        description: Add freeze and thaw CPI to an Anchor program
                        allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
                        ---

                        ## Add freeze and thaw CPI to an Anchor program

                        Context:
                        - Guide: https://zkcompression.com/light-token/cookbook/freeze-thaw
                        - Skills and resources index: https://zkcompression.com/skill.md
                        - SPL to Light reference: https://zkcompression.com/api-reference/solana-to-light-comparison
                        - Crate: light-token (FreezeCpi, ThawCpi)
                        - Example: https://github.com/Lightprotocol/examples-light-token/tree/main/programs/anchor/basic-instructions/freeze

                        Key CPI structs: \`light_token::instruction::FreezeCpi\`, \`light_token::instruction::ThawCpi\`

                        ### 1. Index project
                        - Grep \`declare_id|#\[program\]|anchor_lang|Account<|Pubkey|invoke|freeze|thaw|authority\` across src/
                        - Glob \`**/*.rs\` and \`**/Cargo.toml\` for project structure
                        - Identify: program ID, existing instructions, account structs, freeze authority
                        - Read Cargo.toml — note existing dependencies and framework version
                        - Task subagent (Grep/Read/WebFetch) if project has multiple crates to scan in parallel

                        ### 2. Read references
                        - WebFetch the guide above — review both Freeze and Thaw CPI code samples
                        - WebFetch skill.md — check for a dedicated skill and resources matching this task
                        - TaskCreate one todo per phase below to track progress

                        ### 3. Clarify intention
                        - AskUserQuestion: what is the goal? (add freeze/thaw to existing program, new program from scratch, migrate from SPL freeze/thaw)
                        - AskUserQuestion: should the freeze authority be an external signer or a PDA? (determines invoke vs invoke_signed)
                        - AskUserQuestion: do you need both freeze and thaw, or just one?
                        - Summarize findings and wait for user confirmation before implementing

                        ### 4. Create plan
                        - Based on steps 1–3, draft an implementation plan: which files to modify, what code to add, dependency changes
                        - Follow the guide's step order: Build FreezeCpi/ThawCpi structs → call .invoke() or .invoke_signed()
                        - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
                        - Present the plan to the user for approval before proceeding

                        ### 5. Implement
                        - Add deps if missing: Bash \`cargo add light-token anchor-lang@0.31\`
                        - Follow the guide and the approved plan
                        - Write/Edit to create or modify files
                        - TaskUpdate to mark each step done

                        ### 6. Verify
                        - Bash \`anchor build\`
                        - Bash \`anchor test\` if tests exist
                        - TaskUpdate to mark complete

                        ### Tools
                        - mcp__zkcompression__SearchLightProtocol("<query>") for API details
                        - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
                        - Task subagent with Grep/Read/WebFetch for parallel lookups
                        - TaskList to check remaining work`}
          </Prompt>

          ```text theme={null}
          ---
          description: Add freeze and thaw CPI to an Anchor program
          allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
          ---

          ## Add freeze and thaw CPI to an Anchor program

          Context:
          - Guide: https://zkcompression.com/light-token/cookbook/freeze-thaw
          - Skills and resources index: https://zkcompression.com/skill.md
          - SPL to Light reference: https://zkcompression.com/api-reference/solana-to-light-comparison
          - Crate: light-token (FreezeCpi, ThawCpi)
          - Example: https://github.com/Lightprotocol/examples-light-token/tree/main/programs/anchor/basic-instructions/freeze

          Key CPI structs: `light_token::instruction::FreezeCpi`, `light_token::instruction::ThawCpi`

          ### 1. Index project
          - Grep `declare_id|#\[program\]|anchor_lang|Account<|Pubkey|invoke|freeze|thaw|authority` across src/
          - Glob `**/*.rs` and `**/Cargo.toml` for project structure
          - Identify: program ID, existing instructions, account structs, freeze authority
          - Read Cargo.toml — note existing dependencies and framework version
          - Task subagent (Grep/Read/WebFetch) if project has multiple crates to scan in parallel

          ### 2. Read references
          - WebFetch the guide above — review both Freeze and Thaw CPI code samples
          - WebFetch skill.md — check for a dedicated skill and resources matching this task
          - TaskCreate one todo per phase below to track progress

          ### 3. Clarify intention
          - AskUserQuestion: what is the goal? (add freeze/thaw to existing program, new program from scratch, migrate from SPL freeze/thaw)
          - AskUserQuestion: should the freeze authority be an external signer or a PDA? (determines invoke vs invoke_signed)
          - AskUserQuestion: do you need both freeze and thaw, or just one?
          - Summarize findings and wait for user confirmation before implementing

          ### 4. Create plan
          - Based on steps 1–3, draft an implementation plan: which files to modify, what code to add, dependency changes
          - Follow the guide's step order: Build FreezeCpi/ThawCpi structs → call .invoke() or .invoke_signed()
          - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
          - Present the plan to the user for approval before proceeding

          ### 5. Implement
          - Add deps if missing: Bash `cargo add light-token anchor-lang@0.31`
          - Follow the guide and the approved plan
          - Write/Edit to create or modify files
          - TaskUpdate to mark each step done

          ### 6. Verify
          - Bash `anchor build`
          - Bash `anchor test` if tests exist
          - TaskUpdate to mark complete

          ### Tools
          - mcp__zkcompression__SearchLightProtocol("<query>") for API details
          - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
          - Task subagent with Grep/Read/WebFetch for parallel lookups
          - TaskList to check remaining work
          ```
        </Tab>
      </Tabs>
    </Accordion>

    <Accordion title="Wrap and unwrap">
      Copy the prompt below or view the [guide](/light-token/cookbook/wrap-unwrap).

      <Tabs>
        <Tab title="TypeScript Client">
          <Prompt description="Wrap and unwrap SPL tokens to Light Token" actions={["copy", "cursor"]}>
            {`---
                        description: Wrap and unwrap SPL tokens to Light Token
                        allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
                        ---

                        ## Wrap and unwrap SPL tokens to Light Token

                        Context:
                        - Guide: https://zkcompression.com/light-token/cookbook/wrap-unwrap
                        - Skills and resources index: https://zkcompression.com/skill.md
                        - SPL to Light reference: https://zkcompression.com/api-reference/solana-to-light-comparison
                        - Packages: @lightprotocol/compressed-token, @lightprotocol/stateless.js

                        - Wrap: Move tokens from SPL or Token 2022 account → Light Token associated token account (hot balance)
                        - Unwrap: Move tokens from Light Token associated token account (hot balance) → SPL or Token 2022 account

                        ### 1. Index project
                        - Grep \`@solana/spl-token|Connection|Keypair|wrap|unwrap|WrapTokens|UnwrapTokens\` across src/
                        - Glob \`**/*.ts\` for project structure
                        - Identify: RPC setup, existing wrap/unwrap logic, entry point for wrap/unwrap
                        - Task subagent (Grep/Read/WebFetch) if project has multiple packages to scan in parallel

                        ### 2. Read references
                        - WebFetch the guide above — follow the TypeScript Client tab
                        - WebFetch skill.md — check for a dedicated skill and resources matching this task
                        - TaskCreate one todo per phase below to track progress

                        ### 3. Clarify intention
                        - AskUserQuestion: what is the goal? (new feature, migrate existing SPL code, add alongside existing)
                        - AskUserQuestion: does the project already have wrap/unwrap operations to extend, or is this greenfield?
                        - Summarize findings and wait for user confirmation before implementing

                        ### 4. Create plan
                        - Based on steps 1–3, draft an implementation plan: which files to modify, what code to add, dependency changes
                        - Verify existing connection/signer setup is compatible with the cookbook prerequisites
                        - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
                        - Present the plan to the user for approval before proceeding

                        ### 5. Implement
                        - Add deps if missing: Bash \`npm install @lightprotocol/compressed-token @lightprotocol/stateless.js\`
                        - Follow the cookbook guide and the approved plan
                        - Write/Edit to create or modify files
                        - TaskUpdate to mark each step done

                        ### 6. Verify
                        - Bash \`tsc --noEmit\`
                        - Bash run existing test suite if present
                        - TaskUpdate to mark complete

                        ### Tools
                        - mcp__zkcompression__SearchLightProtocol("<query>") for API details
                        - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
                        - Task subagent with Grep/Read/WebFetch for parallel lookups
                        - TaskList to check remaining work`}
          </Prompt>

          ```text theme={null}
          ---
          description: Wrap and unwrap SPL tokens to Light Token
          allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
          ---

          ## Wrap and unwrap SPL tokens to Light Token

          Context:
          - Guide: https://zkcompression.com/light-token/cookbook/wrap-unwrap
          - Skills and resources index: https://zkcompression.com/skill.md
          - SPL to Light reference: https://zkcompression.com/api-reference/solana-to-light-comparison
          - Packages: @lightprotocol/compressed-token, @lightprotocol/stateless.js

          - Wrap: Move tokens from SPL or Token 2022 account → Light Token associated token account (hot balance)
          - Unwrap: Move tokens from Light Token associated token account (hot balance) → SPL or Token 2022 account

          ### 1. Index project
          - Grep `@solana/spl-token|Connection|Keypair|wrap|unwrap|WrapTokens|UnwrapTokens` across src/
          - Glob `**/*.ts` for project structure
          - Identify: RPC setup, existing wrap/unwrap logic, entry point for wrap/unwrap
          - Task subagent (Grep/Read/WebFetch) if project has multiple packages to scan in parallel

          ### 2. Read references
          - WebFetch the guide above — follow the TypeScript Client tab
          - WebFetch skill.md — check for a dedicated skill and resources matching this task
          - TaskCreate one todo per phase below to track progress

          ### 3. Clarify intention
          - AskUserQuestion: what is the goal? (new feature, migrate existing SPL code, add alongside existing)
          - AskUserQuestion: does the project already have wrap/unwrap operations to extend, or is this greenfield?
          - Summarize findings and wait for user confirmation before implementing

          ### 4. Create plan
          - Based on steps 1–3, draft an implementation plan: which files to modify, what code to add, dependency changes
          - Verify existing connection/signer setup is compatible with the cookbook prerequisites
          - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
          - Present the plan to the user for approval before proceeding

          ### 5. Implement
          - Add deps if missing: Bash `npm install @lightprotocol/compressed-token @lightprotocol/stateless.js`
          - Follow the cookbook guide and the approved plan
          - Write/Edit to create or modify files
          - TaskUpdate to mark each step done

          ### 6. Verify
          - Bash `tsc --noEmit`
          - Bash run existing test suite if present
          - TaskUpdate to mark complete

          ### Tools
          - mcp__zkcompression__SearchLightProtocol("<query>") for API details
          - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
          - Task subagent with Grep/Read/WebFetch for parallel lookups
          - TaskList to check remaining work
          ```
        </Tab>

        <Tab title="Rust Client">
          <Prompt description="Wrap and unwrap SPL tokens to Light Token" actions={["copy", "cursor"]}>
            {`---
                        description: Wrap and unwrap SPL tokens to Light Token
                        allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
                        ---

                        ## Wrap and unwrap SPL tokens to Light Token

                        Context:
                        - Guide: https://zkcompression.com/light-token/cookbook/wrap-unwrap
                        - Skills and resources index: https://zkcompression.com/skill.md
                        - SPL to Light reference: https://zkcompression.com/api-reference/solana-to-light-comparison
                        - Crates: light-token-client (actions), light-token (instructions), light-client (RPC)

                        - Wrap: move tokens from SPL or Token 2022 account → Light Token ATA (hot balance)
                        - Unwrap: move tokens from Light Token ATA (hot balance) → SPL or Token 2022 account

                        No direct SPL equivalent — Wrap/Unwrap are Light Token operations → Light Token: Wrap / Unwrap

                        ### 1. Index project
                        - Grep \`light_token::|light_token_client::|solana_sdk|Keypair|async|Wrap|Unwrap|wrap|unwrap\` across src/
                        - Glob \`**/*.rs\` for project structure
                        - Identify: RPC setup, existing token ops, entry point for wrap/unwrap
                        - Check Cargo.toml for existing light-* dependencies and solana-sdk version
                        - Task subagent (Grep/Read/WebFetch) if project has multiple crates to scan in parallel

                        ### 2. Read references
                        - WebFetch the guide above — follow the Rust Client tab
                        - WebFetch skill.md — check for a dedicated skill and resources matching this task
                        - TaskCreate one todo per phase below to track progress

                        ### 3. Clarify intention
                        - AskUserQuestion: what is the goal? (new feature, migrate existing SPL code, add alongside existing)
                        - AskUserQuestion: does the project already have wrap/unwrap operations to extend, or is this greenfield?
                        - AskUserQuestion: action-level API (high-level, fewer lines) or instruction-level API (low-level, full control)?
                        - Summarize findings and wait for user confirmation before implementing

                        ### 4. Create plan
                        - Based on steps 1–3, draft an implementation plan: which files to modify, what code to add, dependency changes
                        - Verify existing Rpc/signer setup is compatible with the cookbook prerequisites (light_client::rpc::Rpc, solana_sdk::signature::Keypair)
                        - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
                        - Present the plan to the user for approval before proceeding

                        ### 5. Implement
                        - Add deps if missing: Bash \`cargo add light-token-client light-token light-client --features light-client/v2\`
                        - Follow the cookbook guide and the approved plan
                        - Write/Edit to create or modify files
                        - TaskUpdate to mark each step done

                        ### 6. Verify
                        - Bash \`cargo check\`
                        - Bash \`cargo test\` if tests exist
                        - TaskUpdate to mark complete

                        ### Tools
                        - mcp__zkcompression__SearchLightProtocol("<query>") for API details
                        - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
                        - Task subagent with Grep/Read/WebFetch for parallel lookups
                        - TaskList to check remaining work`}
          </Prompt>

          ```text theme={null}
          ---
          description: Wrap and unwrap SPL tokens to Light Token
          allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
          ---

          ## Wrap and unwrap SPL tokens to Light Token

          Context:
          - Guide: https://zkcompression.com/light-token/cookbook/wrap-unwrap
          - Skills and resources index: https://zkcompression.com/skill.md
          - SPL to Light reference: https://zkcompression.com/api-reference/solana-to-light-comparison
          - Crates: light-token-client (actions), light-token (instructions), light-client (RPC)

          - Wrap: move tokens from SPL or Token 2022 account → Light Token ATA (hot balance)
          - Unwrap: move tokens from Light Token ATA (hot balance) → SPL or Token 2022 account

          No direct SPL equivalent — Wrap/Unwrap are Light Token operations → Light Token: Wrap / Unwrap

          ### 1. Index project
          - Grep `light_token::|light_token_client::|solana_sdk|Keypair|async|Wrap|Unwrap|wrap|unwrap` across src/
          - Glob `**/*.rs` for project structure
          - Identify: RPC setup, existing token ops, entry point for wrap/unwrap
          - Check Cargo.toml for existing light-* dependencies and solana-sdk version
          - Task subagent (Grep/Read/WebFetch) if project has multiple crates to scan in parallel

          ### 2. Read references
          - WebFetch the guide above — follow the Rust Client tab
          - WebFetch skill.md — check for a dedicated skill and resources matching this task
          - TaskCreate one todo per phase below to track progress

          ### 3. Clarify intention
          - AskUserQuestion: what is the goal? (new feature, migrate existing SPL code, add alongside existing)
          - AskUserQuestion: does the project already have wrap/unwrap operations to extend, or is this greenfield?
          - AskUserQuestion: action-level API (high-level, fewer lines) or instruction-level API (low-level, full control)?
          - Summarize findings and wait for user confirmation before implementing

          ### 4. Create plan
          - Based on steps 1–3, draft an implementation plan: which files to modify, what code to add, dependency changes
          - Verify existing Rpc/signer setup is compatible with the cookbook prerequisites (light_client::rpc::Rpc, solana_sdk::signature::Keypair)
          - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
          - Present the plan to the user for approval before proceeding

          ### 5. Implement
          - Add deps if missing: Bash `cargo add light-token-client light-token light-client --features light-client/v2`
          - Follow the cookbook guide and the approved plan
          - Write/Edit to create or modify files
          - TaskUpdate to mark each step done

          ### 6. Verify
          - Bash `cargo check`
          - Bash `cargo test` if tests exist
          - TaskUpdate to mark complete

          ### Tools
          - mcp__zkcompression__SearchLightProtocol("<query>") for API details
          - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
          - Task subagent with Grep/Read/WebFetch for parallel lookups
          - TaskList to check remaining work
          ```
        </Tab>
      </Tabs>
    </Accordion>

    <Accordion title="Close token account">
      Copy the prompt below or view the [guide](/light-token/cookbook/close-token-account).

      <Tabs>
        <Tab title="Rust Client">
          <Prompt description="Close Light Token account" actions={["copy", "cursor"]}>
            {`---
                        description: Close Light Token account
                        allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
                        ---

                        ## Close Light Token account

                        Context:
                        - Guide: https://zkcompression.com/light-token/cookbook/close-token-account
                        - Skills and resources index: https://zkcompression.com/skill.md
                        - SPL to Light reference: https://zkcompression.com/api-reference/solana-to-light-comparison
                        - Crates: light-token-client (actions), light-token (instructions), light-client (RPC)

                        SPL equivalent: spl_token::instruction::close_account → Light Token: CloseAccount

                        ### 1. Index project
                        - Grep \`light_token::|light_token_client::|solana_sdk|Keypair|async|CloseAccount|close_account\` across src/
                        - Glob \`**/*.rs\` for project structure
                        - Identify: RPC setup, existing token ops, entry point for close account
                        - Check Cargo.toml for existing light-* dependencies and solana-sdk version
                        - Task subagent (Grep/Read/WebFetch) if project has multiple crates to scan in parallel

                        ### 2. Read references
                        - WebFetch the guide above — follow the Rust Client tab
                        - WebFetch skill.md — check for a dedicated skill and resources matching this task
                        - TaskCreate one todo per phase below to track progress

                        ### 3. Clarify intention
                        - AskUserQuestion: what is the goal? (new feature, migrate existing SPL code, add alongside existing)
                        - AskUserQuestion: does the project already have close operations to extend, or is this greenfield?
                        - AskUserQuestion: action-level API (high-level, fewer lines) or instruction-level API (low-level, full control)?
                        - Summarize findings and wait for user confirmation before implementing

                        ### 4. Create plan
                        - Based on steps 1–3, draft an implementation plan: which files to modify, what code to add, dependency changes
                        - Verify existing Rpc/signer setup is compatible with the cookbook prerequisites (light_client::rpc::Rpc, solana_sdk::signature::Keypair)
                        - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
                        - Present the plan to the user for approval before proceeding

                        ### 5. Implement
                        - Add deps if missing: Bash \`cargo add light-token-client light-token light-client --features light-client/v2\`
                        - Follow the cookbook guide and the approved plan
                        - Write/Edit to create or modify files
                        - TaskUpdate to mark each step done

                        ### 6. Verify
                        - Bash \`cargo check\`
                        - Bash \`cargo test\` if tests exist
                        - TaskUpdate to mark complete

                        ### Tools
                        - mcp__zkcompression__SearchLightProtocol("<query>") for API details
                        - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
                        - Task subagent with Grep/Read/WebFetch for parallel lookups
                        - TaskList to check remaining work`}
          </Prompt>

          ```text theme={null}
          ---
          description: Close Light Token account
          allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
          ---

          ## Close Light Token account

          Context:
          - Guide: https://zkcompression.com/light-token/cookbook/close-token-account
          - Skills and resources index: https://zkcompression.com/skill.md
          - SPL to Light reference: https://zkcompression.com/api-reference/solana-to-light-comparison
          - Crates: light-token-client (actions), light-token (instructions), light-client (RPC)

          SPL equivalent: spl_token::instruction::close_account → Light Token: CloseAccount

          ### 1. Index project
          - Grep `light_token::|light_token_client::|solana_sdk|Keypair|async|CloseAccount|close_account` across src/
          - Glob `**/*.rs` for project structure
          - Identify: RPC setup, existing token ops, entry point for close account
          - Check Cargo.toml for existing light-* dependencies and solana-sdk version
          - Task subagent (Grep/Read/WebFetch) if project has multiple crates to scan in parallel

          ### 2. Read references
          - WebFetch the guide above — follow the Rust Client tab
          - WebFetch skill.md — check for a dedicated skill and resources matching this task
          - TaskCreate one todo per phase below to track progress

          ### 3. Clarify intention
          - AskUserQuestion: what is the goal? (new feature, migrate existing SPL code, add alongside existing)
          - AskUserQuestion: does the project already have close operations to extend, or is this greenfield?
          - AskUserQuestion: action-level API (high-level, fewer lines) or instruction-level API (low-level, full control)?
          - Summarize findings and wait for user confirmation before implementing

          ### 4. Create plan
          - Based on steps 1–3, draft an implementation plan: which files to modify, what code to add, dependency changes
          - Verify existing Rpc/signer setup is compatible with the cookbook prerequisites (light_client::rpc::Rpc, solana_sdk::signature::Keypair)
          - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
          - Present the plan to the user for approval before proceeding

          ### 5. Implement
          - Add deps if missing: Bash `cargo add light-token-client light-token light-client --features light-client/v2`
          - Follow the cookbook guide and the approved plan
          - Write/Edit to create or modify files
          - TaskUpdate to mark each step done

          ### 6. Verify
          - Bash `cargo check`
          - Bash `cargo test` if tests exist
          - TaskUpdate to mark complete

          ### Tools
          - mcp__zkcompression__SearchLightProtocol("<query>") for API details
          - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
          - Task subagent with Grep/Read/WebFetch for parallel lookups
          - TaskList to check remaining work
          ```
        </Tab>

        <Tab title="Program CPI">
          <Prompt description="Add close-account CPI to an Anchor program" actions={["copy", "cursor"]}>
            {`---
                        description: Add close-account CPI to an Anchor program
                        allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
                        ---

                        ## Add close-account CPI to an Anchor program

                        Context:
                        - Guide: https://zkcompression.com/light-token/cookbook/close-token-account
                        - Skills and resources index: https://zkcompression.com/skill.md
                        - SPL to Light reference: https://zkcompression.com/api-reference/solana-to-light-comparison
                        - Crate: light-token (CloseAccountCpi)
                        - Example: https://github.com/Lightprotocol/examples-light-token/tree/main/programs/anchor/basic-instructions/close

                        Key CPI struct: \`light_token::instruction::CloseAccountCpi\`

                        ### 1. Index project
                        - Grep \`declare_id|#\[program\]|anchor_lang|Account<|Pubkey|invoke|close|destination|rent\` across src/
                        - Glob \`**/*.rs\` and \`**/Cargo.toml\` for project structure
                        - Identify: program ID, existing instructions, account structs, token accounts
                        - Read Cargo.toml — note existing dependencies and framework version
                        - Task subagent (Grep/Read/WebFetch) if project has multiple crates to scan in parallel

                        ### 2. Read references
                        - WebFetch the guide above — review the Program tab CPI code samples
                        - WebFetch skill.md — check for a dedicated skill and resources matching this task
                        - TaskCreate one todo per phase below to track progress

                        ### 3. Clarify intention
                        - AskUserQuestion: what is the goal? (add close-account to existing program, new program from scratch, migrate from SPL close_account)
                        - AskUserQuestion: should the owner be an external signer or a PDA? (determines invoke vs invoke_signed)
                        - Summarize findings and wait for user confirmation before implementing

                        ### 4. Create plan
                        - Based on steps 1–3, draft an implementation plan: which files to modify, what code to add, dependency changes
                        - Follow the guide's step order: Build CloseAccountCpi struct → call .invoke() or .invoke_signed()
                        - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
                        - Present the plan to the user for approval before proceeding

                        ### 5. Implement
                        - Add deps if missing: Bash \`cargo add light-token anchor-lang@0.31\`
                        - Follow the guide and the approved plan
                        - Write/Edit to create or modify files
                        - TaskUpdate to mark each step done

                        ### 6. Verify
                        - Bash \`anchor build\`
                        - Bash \`anchor test\` if tests exist
                        - TaskUpdate to mark complete

                        ### Tools
                        - mcp__zkcompression__SearchLightProtocol("<query>") for API details
                        - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
                        - Task subagent with Grep/Read/WebFetch for parallel lookups
                        - TaskList to check remaining work`}
          </Prompt>

          ```text theme={null}
          ---
          description: Add close-account CPI to an Anchor program
          allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
          ---

          ## Add close-account CPI to an Anchor program

          Context:
          - Guide: https://zkcompression.com/light-token/cookbook/close-token-account
          - Skills and resources index: https://zkcompression.com/skill.md
          - SPL to Light reference: https://zkcompression.com/api-reference/solana-to-light-comparison
          - Crate: light-token (CloseAccountCpi)
          - Example: https://github.com/Lightprotocol/examples-light-token/tree/main/programs/anchor/basic-instructions/close

          Key CPI struct: `light_token::instruction::CloseAccountCpi`

          ### 1. Index project
          - Grep `declare_id|#\[program\]|anchor_lang|Account<|Pubkey|invoke|close|destination|rent` across src/
          - Glob `**/*.rs` and `**/Cargo.toml` for project structure
          - Identify: program ID, existing instructions, account structs, token accounts
          - Read Cargo.toml — note existing dependencies and framework version
          - Task subagent (Grep/Read/WebFetch) if project has multiple crates to scan in parallel

          ### 2. Read references
          - WebFetch the guide above — review the Program tab CPI code samples
          - WebFetch skill.md — check for a dedicated skill and resources matching this task
          - TaskCreate one todo per phase below to track progress

          ### 3. Clarify intention
          - AskUserQuestion: what is the goal? (add close-account to existing program, new program from scratch, migrate from SPL close_account)
          - AskUserQuestion: should the owner be an external signer or a PDA? (determines invoke vs invoke_signed)
          - Summarize findings and wait for user confirmation before implementing

          ### 4. Create plan
          - Based on steps 1–3, draft an implementation plan: which files to modify, what code to add, dependency changes
          - Follow the guide's step order: Build CloseAccountCpi struct → call .invoke() or .invoke_signed()
          - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
          - Present the plan to the user for approval before proceeding

          ### 5. Implement
          - Add deps if missing: Bash `cargo add light-token anchor-lang@0.31`
          - Follow the guide and the approved plan
          - Write/Edit to create or modify files
          - TaskUpdate to mark each step done

          ### 6. Verify
          - Bash `anchor build`
          - Bash `anchor test` if tests exist
          - TaskUpdate to mark complete

          ### Tools
          - mcp__zkcompression__SearchLightProtocol("<query>") for API details
          - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
          - Task subagent with Grep/Read/WebFetch for parallel lookups
          - TaskList to check remaining work
          ```
        </Tab>
      </Tabs>
    </Accordion>

    <Accordion title="Burn">
      Copy the prompt below or view the [guide](/light-token/cookbook/burn).

      <Tabs>
        <Tab title="Rust Client">
          <Prompt description="Burn Light Tokens" actions={["copy", "cursor"]}>
            {`---
                        description: Burn Light Tokens
                        allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
                        ---

                        ## Burn Light Tokens

                        Context:
                        - Guide: https://zkcompression.com/light-token/cookbook/burn
                        - Skills and resources index: https://zkcompression.com/skill.md
                        - SPL to Light reference: https://zkcompression.com/api-reference/solana-to-light-comparison
                        - Crates: light-token-client (actions), light-token (instructions), light-client (RPC)

                        SPL equivalent: spl_token::instruction::burn → Light Token: Burn

                        ### 1. Index project
                        - Grep \`light_token::|light_token_client::|solana_sdk|Keypair|async|Burn|burn\` across src/
                        - Glob \`**/*.rs\` for project structure
                        - Identify: RPC setup, existing token ops, entry point for burn
                        - Check Cargo.toml for existing light-* dependencies and solana-sdk version
                        - Task subagent (Grep/Read/WebFetch) if project has multiple crates to scan in parallel

                        ### 2. Read references
                        - WebFetch the guide above — follow the Rust Client tab
                        - WebFetch skill.md — check for a dedicated skill and resources matching this task
                        - TaskCreate one todo per phase below to track progress

                        ### 3. Clarify intention
                        - AskUserQuestion: what is the goal? (new feature, migrate existing SPL code, add alongside existing)
                        - AskUserQuestion: does the project already have burn operations to extend, or is this greenfield?
                        - AskUserQuestion: action-level API (high-level, fewer lines) or instruction-level API (low-level, full control)?
                        - Summarize findings and wait for user confirmation before implementing

                        ### 4. Create plan
                        - Based on steps 1–3, draft an implementation plan: which files to modify, what code to add, dependency changes
                        - Verify existing Rpc/signer setup is compatible with the cookbook prerequisites (light_client::rpc::Rpc, solana_sdk::signature::Keypair)
                        - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
                        - Present the plan to the user for approval before proceeding

                        ### 5. Implement
                        - Add deps if missing: Bash \`cargo add light-token-client light-token light-client --features light-client/v2\`
                        - Follow the cookbook guide and the approved plan
                        - Write/Edit to create or modify files
                        - TaskUpdate to mark each step done

                        ### 6. Verify
                        - Bash \`cargo check\`
                        - Bash \`cargo test\` if tests exist
                        - TaskUpdate to mark complete

                        ### Tools
                        - mcp__zkcompression__SearchLightProtocol("<query>") for API details
                        - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
                        - Task subagent with Grep/Read/WebFetch for parallel lookups
                        - TaskList to check remaining work`}
          </Prompt>

          ```text theme={null}
          ---
          description: Burn Light Tokens
          allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
          ---

          ## Burn Light Tokens

          Context:
          - Guide: https://zkcompression.com/light-token/cookbook/burn
          - Skills and resources index: https://zkcompression.com/skill.md
          - SPL to Light reference: https://zkcompression.com/api-reference/solana-to-light-comparison
          - Crates: light-token-client (actions), light-token (instructions), light-client (RPC)

          SPL equivalent: spl_token::instruction::burn → Light Token: Burn

          ### 1. Index project
          - Grep `light_token::|light_token_client::|solana_sdk|Keypair|async|Burn|burn` across src/
          - Glob `**/*.rs` for project structure
          - Identify: RPC setup, existing token ops, entry point for burn
          - Check Cargo.toml for existing light-* dependencies and solana-sdk version
          - Task subagent (Grep/Read/WebFetch) if project has multiple crates to scan in parallel

          ### 2. Read references
          - WebFetch the guide above — follow the Rust Client tab
          - WebFetch skill.md — check for a dedicated skill and resources matching this task
          - TaskCreate one todo per phase below to track progress

          ### 3. Clarify intention
          - AskUserQuestion: what is the goal? (new feature, migrate existing SPL code, add alongside existing)
          - AskUserQuestion: does the project already have burn operations to extend, or is this greenfield?
          - AskUserQuestion: action-level API (high-level, fewer lines) or instruction-level API (low-level, full control)?
          - Summarize findings and wait for user confirmation before implementing

          ### 4. Create plan
          - Based on steps 1–3, draft an implementation plan: which files to modify, what code to add, dependency changes
          - Verify existing Rpc/signer setup is compatible with the cookbook prerequisites (light_client::rpc::Rpc, solana_sdk::signature::Keypair)
          - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
          - Present the plan to the user for approval before proceeding

          ### 5. Implement
          - Add deps if missing: Bash `cargo add light-token-client light-token light-client --features light-client/v2`
          - Follow the cookbook guide and the approved plan
          - Write/Edit to create or modify files
          - TaskUpdate to mark each step done

          ### 6. Verify
          - Bash `cargo check`
          - Bash `cargo test` if tests exist
          - TaskUpdate to mark complete

          ### Tools
          - mcp__zkcompression__SearchLightProtocol("<query>") for API details
          - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
          - Task subagent with Grep/Read/WebFetch for parallel lookups
          - TaskList to check remaining work
          ```
        </Tab>

        <Tab title="Program CPI">
          <Prompt description="Add burn CPI to an Anchor program" actions={["copy", "cursor"]}>
            {`---
                        description: Add burn CPI to an Anchor program
                        allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
                        ---

                        ## Add burn CPI to an Anchor program

                        Context:
                        - Guide: https://zkcompression.com/light-token/cookbook/burn
                        - Skills and resources index: https://zkcompression.com/skill.md
                        - SPL to Light reference: https://zkcompression.com/api-reference/solana-to-light-comparison
                        - Crate: light-token (BurnCpi)
                        - Example: https://github.com/Lightprotocol/examples-light-token/tree/main/programs/anchor/basic-instructions/burn

                        Key CPI struct: \`light_token::instruction::BurnCpi\`

                        ### 1. Index project
                        - Grep \`declare_id|#\[program\]|anchor_lang|Account<|Pubkey|invoke|burn|destroy|supply\` across src/
                        - Glob \`**/*.rs\` and \`**/Cargo.toml\` for project structure
                        - Identify: program ID, existing instructions, account structs, token accounts
                        - Read Cargo.toml — note existing dependencies and framework version
                        - Task subagent (Grep/Read/WebFetch) if project has multiple crates to scan in parallel

                        ### 2. Read references
                        - WebFetch the guide above — review the Program tab CPI code samples
                        - WebFetch skill.md — check for a dedicated skill and resources matching this task
                        - TaskCreate one todo per phase below to track progress

                        ### 3. Clarify intention
                        - AskUserQuestion: what is the goal? (add burn to existing program, new program from scratch, migrate from SPL burn)
                        - AskUserQuestion: should the authority be an external signer or a PDA? (determines invoke vs invoke_signed)
                        - Summarize findings and wait for user confirmation before implementing

                        ### 4. Create plan
                        - Based on steps 1–3, draft an implementation plan: which files to modify, what code to add, dependency changes
                        - Follow the guide's step order: Build BurnCpi struct → call .invoke() or .invoke_signed()
                        - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
                        - Present the plan to the user for approval before proceeding

                        ### 5. Implement
                        - Add deps if missing: Bash \`cargo add light-token anchor-lang@0.31\`
                        - Follow the guide and the approved plan
                        - Write/Edit to create or modify files
                        - TaskUpdate to mark each step done

                        ### 6. Verify
                        - Bash \`anchor build\`
                        - Bash \`anchor test\` if tests exist
                        - TaskUpdate to mark complete

                        ### Tools
                        - mcp__zkcompression__SearchLightProtocol("<query>") for API details
                        - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
                        - Task subagent with Grep/Read/WebFetch for parallel lookups
                        - TaskList to check remaining work`}
          </Prompt>

          ```text theme={null}
          ---
          description: Add burn CPI to an Anchor program
          allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
          ---

          ## Add burn CPI to an Anchor program

          Context:
          - Guide: https://zkcompression.com/light-token/cookbook/burn
          - Skills and resources index: https://zkcompression.com/skill.md
          - SPL to Light reference: https://zkcompression.com/api-reference/solana-to-light-comparison
          - Crate: light-token (BurnCpi)
          - Example: https://github.com/Lightprotocol/examples-light-token/tree/main/programs/anchor/basic-instructions/burn

          Key CPI struct: `light_token::instruction::BurnCpi`

          ### 1. Index project
          - Grep `declare_id|#\[program\]|anchor_lang|Account<|Pubkey|invoke|burn|destroy|supply` across src/
          - Glob `**/*.rs` and `**/Cargo.toml` for project structure
          - Identify: program ID, existing instructions, account structs, token accounts
          - Read Cargo.toml — note existing dependencies and framework version
          - Task subagent (Grep/Read/WebFetch) if project has multiple crates to scan in parallel

          ### 2. Read references
          - WebFetch the guide above — review the Program tab CPI code samples
          - WebFetch skill.md — check for a dedicated skill and resources matching this task
          - TaskCreate one todo per phase below to track progress

          ### 3. Clarify intention
          - AskUserQuestion: what is the goal? (add burn to existing program, new program from scratch, migrate from SPL burn)
          - AskUserQuestion: should the authority be an external signer or a PDA? (determines invoke vs invoke_signed)
          - Summarize findings and wait for user confirmation before implementing

          ### 4. Create plan
          - Based on steps 1–3, draft an implementation plan: which files to modify, what code to add, dependency changes
          - Follow the guide's step order: Build BurnCpi struct → call .invoke() or .invoke_signed()
          - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
          - Present the plan to the user for approval before proceeding

          ### 5. Implement
          - Add deps if missing: Bash `cargo add light-token anchor-lang@0.31`
          - Follow the guide and the approved plan
          - Write/Edit to create or modify files
          - TaskUpdate to mark each step done

          ### 6. Verify
          - Bash `anchor build`
          - Bash `anchor test` if tests exist
          - TaskUpdate to mark complete

          ### Tools
          - mcp__zkcompression__SearchLightProtocol("<query>") for API details
          - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
          - Task subagent with Grep/Read/WebFetch for parallel lookups
          - TaskList to check remaining work
          ```
        </Tab>
      </Tabs>
    </Accordion>

    ## DeFi

    <Accordion title="Anchor DeFi program">
      Copy the prompt below or view the [guide](/light-token/defi/programs).

      <Prompt description="Add rent-free accounts to an Anchor DeFi program" actions={["copy", "cursor"]}>
        {`---
                description: Add rent-free accounts to an Anchor DeFi program
                allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
                ---

                ## Add rent-free accounts to an Anchor DeFi program

                Context:
                - Guide: https://zkcompression.com/light-token/defi/programs
                - Skills and resources index: https://zkcompression.com/skill.md
                - Dedicated skill: https://github.com/Lightprotocol/skills/tree/main/skills/light-sdk
                - Crates: light-sdk (features: anchor, v2, cpi-context), light-sdk-macros, light-token (features: anchor), light-anchor-spl
                - AMM reference: https://github.com/Lightprotocol/cp-swap-reference

                Key macros/APIs: #[light_program], LightAccount, LightAccounts, #[light_account(init)], CompressionInfo

                ### 1. Index project
                - Grep \`#\[program\]|anchor_lang|Account<|Accounts|InitSpace|seeds|init|payer\` across src/
                - Glob \`**/*.rs\` and \`**/Cargo.toml\` for project structure
                - Identify: existing program module, account structs, PDA seeds, token accounts, init instructions
                - Read Cargo.toml — note existing dependencies and framework version
                - Task subagent (Grep/Read/WebFetch) if project has multiple crates to scan in parallel

                ### 2. Read references
                - WebFetch the guide above
                - WebFetch skill.md — check for a dedicated skill and resources matching this task
                - TaskCreate one todo per phase below to track progress

                ### 3. Clarify intention
                - AskUserQuestion: what is the goal? (new program from scratch, migrate existing program to rent-free, add rent-free accounts to specific instructions)
                - AskUserQuestion: which account types need to be rent-free? (PDAs, token accounts, ATAs, mints)
                - Summarize findings and wait for user confirmation before implementing

                ### 4. Create plan
                - Based on steps 1–3, draft an implementation plan
                - Follow the guide's step order: Dependencies → State Struct → Program Module → Accounts Struct → Instructions
                - Identify which existing structs need changes (CompressionInfo field, LightAccount derive, etc.)
                - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
                - Present the plan to the user for approval before proceeding

                ### 5. Implement
                - Add deps if missing: Bash \`cargo add light-sdk@0.23 --features anchor,v2,cpi-context\` and \`cargo add light-sdk-macros@0.23\` and \`cargo add light-token@0.23 --features anchor\` and \`cargo add light-anchor-spl@0.31\`
                - Follow the guide and the approved plan
                - Write/Edit to create or modify files
                - TaskUpdate to mark each step done

                ### 6. Verify
                - Bash \`anchor build\`
                - Bash \`anchor test\` if tests exist
                - TaskUpdate to mark complete

                ### Tools
                - mcp__zkcompression__SearchLightProtocol("<query>") for API details
                - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
                - Task subagent with Grep/Read/WebFetch for parallel lookups
                - TaskList to check remaining work`}
      </Prompt>

      ```text theme={null}
      ---
      description: Add rent-free accounts to an Anchor DeFi program
      allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
      ---

      ## Add rent-free accounts to an Anchor DeFi program

      Context:
      - Guide: https://zkcompression.com/light-token/defi/programs
      - Skills and resources index: https://zkcompression.com/skill.md
      - Dedicated skill: https://github.com/Lightprotocol/skills/tree/main/skills/light-sdk
      - Crates: light-sdk (features: anchor, v2, cpi-context), light-sdk-macros, light-token (features: anchor), light-anchor-spl
      - AMM reference: https://github.com/Lightprotocol/cp-swap-reference

      Key macros/APIs: #[light_program], LightAccount, LightAccounts, #[light_account(init)], CompressionInfo

      ### 1. Index project
      - Grep `#\[program\]|anchor_lang|Account<|Accounts|InitSpace|seeds|init|payer` across src/
      - Glob `**/*.rs` and `**/Cargo.toml` for project structure
      - Identify: existing program module, account structs, PDA seeds, token accounts, init instructions
      - Read Cargo.toml — note existing dependencies and framework version
      - Task subagent (Grep/Read/WebFetch) if project has multiple crates to scan in parallel

      ### 2. Read references
      - WebFetch the guide above
      - WebFetch skill.md — check for a dedicated skill and resources matching this task
      - TaskCreate one todo per phase below to track progress

      ### 3. Clarify intention
      - AskUserQuestion: what is the goal? (new program from scratch, migrate existing program to rent-free, add rent-free accounts to specific instructions)
      - AskUserQuestion: which account types need to be rent-free? (PDAs, token accounts, ATAs, mints)
      - Summarize findings and wait for user confirmation before implementing

      ### 4. Create plan
      - Based on steps 1–3, draft an implementation plan
      - Follow the guide's step order: Dependencies → State Struct → Program Module → Accounts Struct → Instructions
      - Identify which existing structs need changes (CompressionInfo field, LightAccount derive, etc.)
      - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
      - Present the plan to the user for approval before proceeding

      ### 5. Implement
      - Add deps if missing: Bash `cargo add light-sdk@0.23 --features anchor,v2,cpi-context` and `cargo add light-sdk-macros@0.23` and `cargo add light-token@0.23 --features anchor` and `cargo add light-anchor-spl@0.31`
      - Follow the guide and the approved plan
      - Write/Edit to create or modify files
      - TaskUpdate to mark each step done

      ### 6. Verify
      - Bash `anchor build`
      - Bash `anchor test` if tests exist
      - TaskUpdate to mark complete

      ### Tools
      - mcp__zkcompression__SearchLightProtocol("<query>") for API details
      - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
      - Task subagent with Grep/Read/WebFetch for parallel lookups
      - TaskList to check remaining work
      ```
    </Accordion>

    <Accordion title="Pinocchio DeFi program">
      Copy the prompt below or view the [guide](/light-token/defi/programs-pinocchio).

      <Prompt description="Add rent-free accounts to a Pinocchio DeFi program" actions={["copy", "cursor"]}>
        {`---
                description: Add rent-free accounts to a Pinocchio DeFi program
                allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
                ---

                ## Add rent-free accounts to a Pinocchio DeFi program

                Context:
                - Guide: https://zkcompression.com/light-token/defi/programs-pinocchio
                - Skills and resources index: https://zkcompression.com/skill.md
                - Dedicated skill: https://github.com/Lightprotocol/skills/tree/main/skills/light-sdk
                - Crates: light-account-pinocchio (features: token, std), light-token-pinocchio, pinocchio
                - Swap reference: https://github.com/Lightprotocol/examples-light-token/tree/simplify-trait/pinocchio/swap

                Key macros/APIs: LightPinocchioAccount, LightProgramPinocchio, CreateTokenAccountCpi, derive_light_cpi_signer!

                ### 1. Index project
                - Grep \`pinocchio|entrypoint!|ProgramError|AccountInfo|process_instruction\` across src/
                - Glob \`**/*.rs\` and \`**/Cargo.toml\` for project structure
                - Identify: existing program module, account structs, PDA seeds, token accounts, init instructions
                - Read Cargo.toml — note existing dependencies and framework version
                - Task subagent (Grep/Read/WebFetch) if project has multiple crates to scan in parallel

                ### 2. Read references
                - WebFetch the guide above
                - WebFetch skill.md — check for a dedicated skill and resources matching this task
                - TaskCreate one todo per phase below to track progress

                ### 3. Clarify intention
                - AskUserQuestion: what is the goal? (new program from scratch, migrate existing program to rent-free, add rent-free accounts to specific instructions)
                - AskUserQuestion: which account types need to be rent-free? (PDAs, token accounts, ATAs, mints)
                - Summarize findings and wait for user confirmation before implementing

                ### 4. Create plan
                - Based on steps 1–3, draft an implementation plan
                - Follow the guide's step order: Dependencies → State Struct → Program Enum → Entrypoint → Init Handler
                - Identify which existing structs need changes (CompressionInfo field, LightPinocchioAccount derive, etc.)
                - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
                - Present the plan to the user for approval before proceeding

                ### 5. Implement
                - Add deps if missing: Bash \`cargo add light-account-pinocchio@0.23 --features token,std\` and \`cargo add light-token-pinocchio@0.23\` and \`cargo add pinocchio@0.9\`
                - Follow the guide and the approved plan
                - Write/Edit to create or modify files
                - TaskUpdate to mark each step done

                ### 6. Verify
                - Bash \`cargo build-sbf\`
                - Bash \`cargo test-sbf\` if tests exist
                - TaskUpdate to mark complete

                ### Tools
                - mcp__zkcompression__SearchLightProtocol("<query>") for API details
                - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
                - Task subagent with Grep/Read/WebFetch for parallel lookups
                - TaskList to check remaining work`}
      </Prompt>

      ```text theme={null}
      ---
      description: Add rent-free accounts to a Pinocchio DeFi program
      allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
      ---

      ## Add rent-free accounts to a Pinocchio DeFi program

      Context:
      - Guide: https://zkcompression.com/light-token/defi/programs-pinocchio
      - Skills and resources index: https://zkcompression.com/skill.md
      - Dedicated skill: https://github.com/Lightprotocol/skills/tree/main/skills/light-sdk
      - Crates: light-account-pinocchio (features: token, std), light-token-pinocchio, pinocchio
      - Swap reference: https://github.com/Lightprotocol/examples-light-token/tree/simplify-trait/pinocchio/swap

      Key macros/APIs: LightPinocchioAccount, LightProgramPinocchio, CreateTokenAccountCpi, derive_light_cpi_signer!

      ### 1. Index project
      - Grep `pinocchio|entrypoint!|ProgramError|AccountInfo|process_instruction` across src/
      - Glob `**/*.rs` and `**/Cargo.toml` for project structure
      - Identify: existing program module, account structs, PDA seeds, token accounts, init instructions
      - Read Cargo.toml — note existing dependencies and framework version
      - Task subagent (Grep/Read/WebFetch) if project has multiple crates to scan in parallel

      ### 2. Read references
      - WebFetch the guide above
      - WebFetch skill.md — check for a dedicated skill and resources matching this task
      - TaskCreate one todo per phase below to track progress

      ### 3. Clarify intention
      - AskUserQuestion: what is the goal? (new program from scratch, migrate existing program to rent-free, add rent-free accounts to specific instructions)
      - AskUserQuestion: which account types need to be rent-free? (PDAs, token accounts, ATAs, mints)
      - Summarize findings and wait for user confirmation before implementing

      ### 4. Create plan
      - Based on steps 1–3, draft an implementation plan
      - Follow the guide's step order: Dependencies → State Struct → Program Enum → Entrypoint → Init Handler
      - Identify which existing structs need changes (CompressionInfo field, LightPinocchioAccount derive, etc.)
      - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
      - Present the plan to the user for approval before proceeding

      ### 5. Implement
      - Add deps if missing: Bash `cargo add light-account-pinocchio@0.23 --features token,std` and `cargo add light-token-pinocchio@0.23` and `cargo add pinocchio@0.9`
      - Follow the guide and the approved plan
      - Write/Edit to create or modify files
      - TaskUpdate to mark each step done

      ### 6. Verify
      - Bash `cargo build-sbf`
      - Bash `cargo test-sbf` if tests exist
      - TaskUpdate to mark complete

      ### Tools
      - mcp__zkcompression__SearchLightProtocol("<query>") for API details
      - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
      - Task subagent with Grep/Read/WebFetch for parallel lookups
      - TaskList to check remaining work
      ```
    </Accordion>

    <Accordion title="Router integration">
      Copy the prompt below or view the [guide](/light-token/defi/routers).

      <Prompt description="Integrate rent-free AMM markets into a router or aggregator" actions={["copy", "cursor"]}>
        {`---
                description: Integrate rent-free AMM markets into a router or aggregator
                allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
                ---

                ## Integrate rent-free AMM markets into a router or aggregator

                Context:
                - Guide: https://zkcompression.com/light-token/defi/routers
                - Skills and resources index: https://zkcompression.com/skill.md
                - Dedicated skill: https://github.com/Lightprotocol/skills/tree/main/skills/light-sdk
                - Crate: light-client (features: v2) — provides AccountInterface, LightProgramInterface, create_load_instructions
                - AMM reference: https://github.com/Lightprotocol/cp-swap-reference
                - Streaming guides: https://zkcompression.com/light-token/streaming/tokens

                Key APIs: create_load_instructions(), LightProgramInterface trait, get_account_interface(), get_multiple_account_interfaces(), is_cold()

                ### 1. Index project
                - Grep \`LightProgramInterface|create_load_instructions|AccountInterface|is_cold|get_account_interface|swap|amm|router|aggregator\` across src/
                - Glob \`**/*.rs\` and \`**/Cargo.toml\` for project structure
                - Identify: existing routing/quoting logic, account caching, swap instruction building, streaming setup
                - Read Cargo.toml — note existing dependencies and light-client version
                - Task subagent (Grep/Read/WebFetch) if project has multiple crates to scan in parallel

                ### 2. Read references
                - WebFetch the guide above
                - WebFetch skill.md — check for a dedicated skill and resources matching this task
                - TaskCreate one todo per phase below to track progress

                ### 3. Clarify intention
                - AskUserQuestion: what is the goal? (add cold market support to existing router, build new router with rent-free market support, integrate a specific AMM SDK)
                - AskUserQuestion: does the project already stream account updates, or does it fetch at swap time?
                - AskUserQuestion: does the project use Jito bundles for multi-transaction swaps?
                - Summarize findings and wait for user confirmation before implementing

                ### 4. Create plan
                - Based on steps 1–3, draft an implementation plan
                - Follow the guide's progression: Cold Account Cache → Detecting Cold Accounts → Building Swap Transactions with Load Instructions
                - If streaming: add account + transaction subscriptions for the Light Token Program
                - If fetch-at-swap-time: add get_multiple_account_interfaces + is_cold() check before building swap tx
                - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
                - Present the plan to the user for approval before proceeding

                ### 5. Implement
                - Add deps if missing: Bash \`cargo add light-client@0.23 --features v2\`
                - Add AMM SDK dependency per the approved plan
                - Follow the guide and the approved plan
                - Write/Edit to create or modify files
                - TaskUpdate to mark each step done

                ### 6. Verify
                - Bash \`cargo check\`
                - Bash \`cargo test\` if tests exist
                - TaskUpdate to mark complete

                ### Tools
                - mcp__zkcompression__SearchLightProtocol("<query>") for API details
                - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
                - Task subagent with Grep/Read/WebFetch for parallel lookups
                - TaskList to check remaining work`}
      </Prompt>

      ```text theme={null}
      ---
      description: Integrate rent-free AMM markets into a router or aggregator
      allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
      ---

      ## Integrate rent-free AMM markets into a router or aggregator

      Context:
      - Guide: https://zkcompression.com/light-token/defi/routers
      - Skills and resources index: https://zkcompression.com/skill.md
      - Dedicated skill: https://github.com/Lightprotocol/skills/tree/main/skills/light-sdk
      - Crate: light-client (features: v2) — provides AccountInterface, LightProgramInterface, create_load_instructions
      - AMM reference: https://github.com/Lightprotocol/cp-swap-reference
      - Streaming guides: https://zkcompression.com/light-token/streaming/tokens

      Key APIs: create_load_instructions(), LightProgramInterface trait, get_account_interface(), get_multiple_account_interfaces(), is_cold()

      ### 1. Index project
      - Grep `LightProgramInterface|create_load_instructions|AccountInterface|is_cold|get_account_interface|swap|amm|router|aggregator` across src/
      - Glob `**/*.rs` and `**/Cargo.toml` for project structure
      - Identify: existing routing/quoting logic, account caching, swap instruction building, streaming setup
      - Read Cargo.toml — note existing dependencies and light-client version
      - Task subagent (Grep/Read/WebFetch) if project has multiple crates to scan in parallel

      ### 2. Read references
      - WebFetch the guide above
      - WebFetch skill.md — check for a dedicated skill and resources matching this task
      - TaskCreate one todo per phase below to track progress

      ### 3. Clarify intention
      - AskUserQuestion: what is the goal? (add cold market support to existing router, build new router with rent-free market support, integrate a specific AMM SDK)
      - AskUserQuestion: does the project already stream account updates, or does it fetch at swap time?
      - AskUserQuestion: does the project use Jito bundles for multi-transaction swaps?
      - Summarize findings and wait for user confirmation before implementing

      ### 4. Create plan
      - Based on steps 1–3, draft an implementation plan
      - Follow the guide's progression: Cold Account Cache → Detecting Cold Accounts → Building Swap Transactions with Load Instructions
      - If streaming: add account + transaction subscriptions for the Light Token Program
      - If fetch-at-swap-time: add get_multiple_account_interfaces + is_cold() check before building swap tx
      - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
      - Present the plan to the user for approval before proceeding

      ### 5. Implement
      - Add deps if missing: Bash `cargo add light-client@0.23 --features v2`
      - Add AMM SDK dependency per the approved plan
      - Follow the guide and the approved plan
      - Write/Edit to create or modify files
      - TaskUpdate to mark each step done

      ### 6. Verify
      - Bash `cargo check`
      - Bash `cargo test` if tests exist
      - TaskUpdate to mark complete

      ### Tools
      - mcp__zkcompression__SearchLightProtocol("<query>") for API details
      - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
      - Task subagent with Grep/Read/WebFetch for parallel lookups
      - TaskList to check remaining work
      ```
    </Accordion>

    ## Data Streaming

    <Accordion title="Streaming mint accounts">
      Copy the prompt below or view the [guide](/light-token/streaming/mints).

      <Prompt description="Stream light-mint accounts and metadata via Laserstream gRPC" actions={["copy", "cursor"]}>
        {`---
                description: Stream light-mint accounts and metadata via Laserstream gRPC
                allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
                ---

                ## Stream light-mint accounts and metadata via Laserstream gRPC

                Context:
                - Guide: https://zkcompression.com/light-token/streaming/mints
                - Skills and resources index: https://zkcompression.com/skill.md
                - Dedicated skill: https://github.com/Lightprotocol/skills/tree/main/skills/data-streaming
                - Crates: helius-laserstream, light-token-interface, borsh, futures
                - Token accounts streaming: https://zkcompression.com/light-token/streaming/tokens

                Key APIs: LaserstreamConfig, subscribe(), Mint::deserialize(), ExtensionStruct::TokenMetadata

                ### 1. Index project
                - Grep \`helius_laserstream|laserstream|subscribe|StreamExt|light_token_interface|Mint|cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m\` across src/
                - Glob \`**/*.rs\` and \`**/Cargo.toml\` for project structure
                - Identify: existing gRPC streaming setup, account caching, deserialization logic
                - Read Cargo.toml — note existing dependencies
                - Task subagent (Grep/Read/WebFetch) if project has multiple crates to scan in parallel

                ### 2. Read references
                - WebFetch the guide above — follow the Steps (Connect, Subscribe, Deserialize, Detect cold, Extract metadata)
                - WebFetch skill.md — check for a dedicated skill and resources matching this task
                - TaskCreate one todo per phase below to track progress

                ### 3. Clarify intention
                - AskUserQuestion: what is the goal? (new streaming pipeline for mints, add mint streaming to existing token streaming, specific use case like metadata indexing)
                - AskUserQuestion: mainnet or devnet?
                - AskUserQuestion: do you need cold/hot transition detection, or just live mint state?
                - Summarize findings and wait for user confirmation before implementing

                ### 4. Create plan
                - Based on steps 1–3, draft an implementation plan
                - Follow the guide's step order: Connect → Subscribe (account + transaction subs) → Deserialize Mint → Detect Cold → Extract Metadata
                - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
                - Present the plan to the user for approval before proceeding

                ### 5. Implement
                - Add deps if missing: Bash \`cargo add helius-laserstream@0.1 light-token-interface@0.5 borsh@0.10 futures@0.3 bs58@0.5 tokio --features full\`
                - Follow the guide and the approved plan
                - Write/Edit to create or modify files
                - TaskUpdate to mark each step done

                ### 6. Verify
                - Bash \`cargo check\`
                - Bash \`cargo test\` if tests exist
                - TaskUpdate to mark complete

                ### Tools
                - mcp__zkcompression__SearchLightProtocol("<query>") for API details
                - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
                - Task subagent with Grep/Read/WebFetch for parallel lookups
                - TaskList to check remaining work`}
      </Prompt>

      ```text theme={null}
      ---
      description: Stream light-mint accounts and metadata via Laserstream gRPC
      allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
      ---

      ## Stream light-mint accounts and metadata via Laserstream gRPC

      Context:
      - Guide: https://zkcompression.com/light-token/streaming/mints
      - Skills and resources index: https://zkcompression.com/skill.md
      - Dedicated skill: https://github.com/Lightprotocol/skills/tree/main/skills/data-streaming
      - Crates: helius-laserstream, light-token-interface, borsh, futures
      - Token accounts streaming: https://zkcompression.com/light-token/streaming/tokens

      Key APIs: LaserstreamConfig, subscribe(), Mint::deserialize(), ExtensionStruct::TokenMetadata

      ### 1. Index project
      - Grep `helius_laserstream|laserstream|subscribe|StreamExt|light_token_interface|Mint|cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m` across src/
      - Glob `**/*.rs` and `**/Cargo.toml` for project structure
      - Identify: existing gRPC streaming setup, account caching, deserialization logic
      - Read Cargo.toml — note existing dependencies
      - Task subagent (Grep/Read/WebFetch) if project has multiple crates to scan in parallel

      ### 2. Read references
      - WebFetch the guide above — follow the Steps (Connect, Subscribe, Deserialize, Detect cold, Extract metadata)
      - WebFetch skill.md — check for a dedicated skill and resources matching this task
      - TaskCreate one todo per phase below to track progress

      ### 3. Clarify intention
      - AskUserQuestion: what is the goal? (new streaming pipeline for mints, add mint streaming to existing token streaming, specific use case like metadata indexing)
      - AskUserQuestion: mainnet or devnet?
      - AskUserQuestion: do you need cold/hot transition detection, or just live mint state?
      - Summarize findings and wait for user confirmation before implementing

      ### 4. Create plan
      - Based on steps 1–3, draft an implementation plan
      - Follow the guide's step order: Connect → Subscribe (account + transaction subs) → Deserialize Mint → Detect Cold → Extract Metadata
      - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
      - Present the plan to the user for approval before proceeding

      ### 5. Implement
      - Add deps if missing: Bash `cargo add helius-laserstream@0.1 light-token-interface@0.5 borsh@0.10 futures@0.3 bs58@0.5 tokio --features full`
      - Follow the guide and the approved plan
      - Write/Edit to create or modify files
      - TaskUpdate to mark each step done

      ### 6. Verify
      - Bash `cargo check`
      - Bash `cargo test` if tests exist
      - TaskUpdate to mark complete

      ### Tools
      - mcp__zkcompression__SearchLightProtocol("<query>") for API details
      - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
      - Task subagent with Grep/Read/WebFetch for parallel lookups
      - TaskList to check remaining work
      ```
    </Accordion>

    <Accordion title="Streaming token accounts">
      Copy the prompt below or view the [guide](/light-token/streaming/tokens).

      <Prompt description="Stream light-token accounts via Laserstream gRPC" actions={["copy", "cursor"]}>
        {`---
                description: Stream light-token accounts via Laserstream gRPC
                allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
                ---

                ## Stream light-token accounts via Laserstream gRPC

                Context:
                - Guide: https://zkcompression.com/light-token/streaming/tokens
                - Skills and resources index: https://zkcompression.com/skill.md
                - Dedicated skill: https://github.com/Lightprotocol/skills/tree/main/skills/data-streaming
                - Crates: helius-laserstream, light-token-interface, spl-pod, spl-token-2022-interface, borsh, futures
                - Mint accounts streaming: https://zkcompression.com/light-token/streaming/mints
                - Point queries: light-client (LightClient, get_account_interface)

                Key APIs: LaserstreamConfig, subscribe(), PodAccount (pod_from_bytes), LightClient::get_account_interface()

                ### 1. Index project
                - Grep \`helius_laserstream|laserstream|subscribe|PodAccount|pod_from_bytes|spl_token_2022_interface|cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m\` across src/
                - Glob \`**/*.rs\` and \`**/Cargo.toml\` for project structure
                - Identify: existing gRPC streaming setup, token account caching, SPL parser usage
                - Read Cargo.toml — note existing dependencies
                - Task subagent (Grep/Read/WebFetch) if project has multiple crates to scan in parallel

                ### 2. Read references
                - WebFetch the guide above — follow the Steps (Connect, Subscribe) and the transition detection sections
                - WebFetch skill.md — check for a dedicated skill and resources matching this task
                - TaskCreate one todo per phase below to track progress

                ### 3. Clarify intention
                - AskUserQuestion: what is the goal? (new streaming pipeline for token accounts, add to existing pipeline, integrate cold/hot detection for routing)
                - AskUserQuestion: mainnet or devnet?
                - AskUserQuestion: do you need point queries (get_account_interface) in addition to streaming?
                - Summarize findings and wait for user confirmation before implementing

                ### 4. Create plan
                - Based on steps 1–3, draft an implementation plan
                - Follow the guide's structure: Connect → Subscribe (account + transaction subs) → Detect Transitions (hot-to-cold, cold-to-hot) → Point Queries (optional)
                - Token accounts use the same 165-byte SPL layout — existing SPL parsers work directly
                - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
                - Present the plan to the user for approval before proceeding

                ### 5. Implement
                - Add deps if missing: Bash \`cargo add helius-laserstream@0.1 light-token-interface@0.5 spl-pod spl-token-2022-interface borsh@0.10 futures@0.3 bs58@0.5 tokio --features full\`
                - For point queries, also: Bash \`cargo add light-client@0.23 --features v2\`
                - Follow the guide and the approved plan
                - Write/Edit to create or modify files
                - TaskUpdate to mark each step done

                ### 6. Verify
                - Bash \`cargo check\`
                - Bash \`cargo test\` if tests exist
                - TaskUpdate to mark complete

                ### Tools
                - mcp__zkcompression__SearchLightProtocol("<query>") for API details
                - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
                - Task subagent with Grep/Read/WebFetch for parallel lookups
                - TaskList to check remaining work`}
      </Prompt>

      ```text theme={null}
      ---
      description: Stream light-token accounts via Laserstream gRPC
      allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
      ---

      ## Stream light-token accounts via Laserstream gRPC

      Context:
      - Guide: https://zkcompression.com/light-token/streaming/tokens
      - Skills and resources index: https://zkcompression.com/skill.md
      - Dedicated skill: https://github.com/Lightprotocol/skills/tree/main/skills/data-streaming
      - Crates: helius-laserstream, light-token-interface, spl-pod, spl-token-2022-interface, borsh, futures
      - Mint accounts streaming: https://zkcompression.com/light-token/streaming/mints
      - Point queries: light-client (LightClient, get_account_interface)

      Key APIs: LaserstreamConfig, subscribe(), PodAccount (pod_from_bytes), LightClient::get_account_interface()

      ### 1. Index project
      - Grep `helius_laserstream|laserstream|subscribe|PodAccount|pod_from_bytes|spl_token_2022_interface|cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m` across src/
      - Glob `**/*.rs` and `**/Cargo.toml` for project structure
      - Identify: existing gRPC streaming setup, token account caching, SPL parser usage
      - Read Cargo.toml — note existing dependencies
      - Task subagent (Grep/Read/WebFetch) if project has multiple crates to scan in parallel

      ### 2. Read references
      - WebFetch the guide above — follow the Steps (Connect, Subscribe) and the transition detection sections
      - WebFetch skill.md — check for a dedicated skill and resources matching this task
      - TaskCreate one todo per phase below to track progress

      ### 3. Clarify intention
      - AskUserQuestion: what is the goal? (new streaming pipeline for token accounts, add to existing pipeline, integrate cold/hot detection for routing)
      - AskUserQuestion: mainnet or devnet?
      - AskUserQuestion: do you need point queries (get_account_interface) in addition to streaming?
      - Summarize findings and wait for user confirmation before implementing

      ### 4. Create plan
      - Based on steps 1–3, draft an implementation plan
      - Follow the guide's structure: Connect → Subscribe (account + transaction subs) → Detect Transitions (hot-to-cold, cold-to-hot) → Point Queries (optional)
      - Token accounts use the same 165-byte SPL layout — existing SPL parsers work directly
      - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
      - Present the plan to the user for approval before proceeding

      ### 5. Implement
      - Add deps if missing: Bash `cargo add helius-laserstream@0.1 light-token-interface@0.5 spl-pod spl-token-2022-interface borsh@0.10 futures@0.3 bs58@0.5 tokio --features full`
      - For point queries, also: Bash `cargo add light-client@0.23 --features v2`
      - Follow the guide and the approved plan
      - Write/Edit to create or modify files
      - TaskUpdate to mark each step done

      ### 6. Verify
      - Bash `cargo check`
      - Bash `cargo test` if tests exist
      - TaskUpdate to mark complete

      ### Tools
      - mcp__zkcompression__SearchLightProtocol("<query>") for API details
      - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
      - Task subagent with Grep/Read/WebFetch for parallel lookups
      - TaskList to check remaining work
      ```
    </Accordion>

    ## Wallets

    <Accordion title="Wallet integration">
      Copy the prompt below or view the [guide](/light-token/wallets/overview).

      <Prompt description="Add light-token support to a wallet application" actions={["copy", "cursor"]}>
        {`---
                description: Add light-token support to a wallet application
                allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
                ---

                ## Add light-token support to a wallet application

                Context:
                - Guide: https://zkcompression.com/light-token/wallets/overview
                - Skills and resources index: https://zkcompression.com/skill.md
                - SPL to Light reference: https://zkcompression.com/api-reference/solana-to-light-comparison
                - Dedicated skill: https://github.com/Lightprotocol/skills/tree/main/skills/payments
                - Packages: @lightprotocol/compressed-token, @lightprotocol/stateless.js
                - Full examples: https://github.com/Lightprotocol/examples-light-token/tree/main/toolkits/payments

                SPL → Light Token API mapping:
                | Operation    | SPL                               | Light Token                              |
                | Receive      | getOrCreateAssociatedTokenAccount() | createLoadAtaInstructions() / loadAta()  |
                | Transfer     | createTransferInstruction()        | createTransferInterfaceInstructions()    |
                | Get Balance  | getAccount()                      | getAtaInterface()                        |
                | Tx History   | getSignaturesForAddress()         | getSignaturesForOwnerInterface()         |
                | Wrap SPL     | N/A                               | createWrapInstruction() / wrap()         |
                | Unwrap       | N/A                               | createUnwrapInstructions() / unwrap()    |

                ### 1. Index project
                - Grep \`@solana/spl-token|@lightprotocol|createTransferInstruction|getAccount|wallet|signTransaction|signAllTransactions|Connection\` across src/
                - Glob \`**/*.ts\` and \`**/*.tsx\` for project structure
                - Identify: RPC setup, existing token display/balance logic, wallet adapter, transaction signing pattern
                - Check package.json for existing @lightprotocol/* or @solana/spl-token dependencies
                - Task subagent (Grep/Read/WebFetch) if project has multiple packages to scan in parallel

                ### 2. Read references
                - WebFetch the guide above — review Instruction and Action tabs for each operation
                - WebFetch skill.md — check for a dedicated skill and resources matching this task
                - TaskCreate one todo per phase below to track progress

                ### 3. Clarify intention
                - AskUserQuestion: what is the goal? (new wallet integration, migrate existing SPL wallet to light-token, add light-token alongside existing SPL)
                - AskUserQuestion: which operations? (receive, send, balance, history, wrap, unwrap — or all)
                - AskUserQuestion: instruction-level API (build your own transactions) or action-level API (high-level, fewer lines)?
                - Summarize findings and wait for user confirmation before implementing

                ### 4. Create plan
                - Based on steps 1–3, draft an implementation plan: which files to modify, what code to add, dependency changes
                - Verify existing connection/signer setup is compatible (createRpc with ZK Compression endpoint)
                - Key pattern: import from \`@lightprotocol/compressed-token/unified\` for all interface APIs
                - APIs return TransactionInstruction[][] — handle multi-tx case with signAllTransactions
                - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
                - Present the plan to the user for approval before proceeding

                ### 5. Implement
                - Add deps if missing: Bash \`npm install @lightprotocol/compressed-token @lightprotocol/stateless.js\`
                - Set up RPC: \`createRpc(RPC_ENDPOINT)\` with a ZK Compression endpoint (Helius, Triton)
                - Import from \`@lightprotocol/compressed-token/unified\` for the interface APIs
                - Follow the guide and the approved plan
                - Write/Edit to create or modify files
                - TaskUpdate to mark each step done

                ### 6. Verify
                - Bash \`tsc --noEmit\`
                - Bash run existing test suite if present
                - TaskUpdate to mark complete

                ### Tools
                - mcp__zkcompression__SearchLightProtocol("<query>") for API details
                - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
                - Task subagent with Grep/Read/WebFetch for parallel lookups
                - TaskList to check remaining work`}
      </Prompt>

      ```text theme={null}
      ---
      description: Add light-token support to a wallet application
      allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, AskUserQuestion, Task, TaskCreate, TaskGet, TaskList, TaskUpdate, TaskOutput, mcp__deepwiki, mcp__zkcompression
      ---

      ## Add light-token support to a wallet application

      Context:
      - Guide: https://zkcompression.com/light-token/wallets/overview
      - Skills and resources index: https://zkcompression.com/skill.md
      - SPL to Light reference: https://zkcompression.com/api-reference/solana-to-light-comparison
      - Dedicated skill: https://github.com/Lightprotocol/skills/tree/main/skills/payments
      - Packages: @lightprotocol/compressed-token, @lightprotocol/stateless.js
      - Full examples: https://github.com/Lightprotocol/examples-light-token/tree/main/toolkits/payments

      SPL → Light Token API mapping:
      | Operation    | SPL                               | Light Token                              |
      | Receive      | getOrCreateAssociatedTokenAccount() | createLoadAtaInstructions() / loadAta()  |
      | Transfer     | createTransferInstruction()        | createTransferInterfaceInstructions()    |
      | Get Balance  | getAccount()                      | getAtaInterface()                        |
      | Tx History   | getSignaturesForAddress()         | getSignaturesForOwnerInterface()         |
      | Wrap SPL     | N/A                               | createWrapInstruction() / wrap()         |
      | Unwrap       | N/A                               | createUnwrapInstructions() / unwrap()    |

      ### 1. Index project
      - Grep `@solana/spl-token|@lightprotocol|createTransferInstruction|getAccount|wallet|signTransaction|signAllTransactions|Connection` across src/
      - Glob `**/*.ts` and `**/*.tsx` for project structure
      - Identify: RPC setup, existing token display/balance logic, wallet adapter, transaction signing pattern
      - Check package.json for existing @lightprotocol/* or @solana/spl-token dependencies
      - Task subagent (Grep/Read/WebFetch) if project has multiple packages to scan in parallel

      ### 2. Read references
      - WebFetch the guide above — review Instruction and Action tabs for each operation
      - WebFetch skill.md — check for a dedicated skill and resources matching this task
      - TaskCreate one todo per phase below to track progress

      ### 3. Clarify intention
      - AskUserQuestion: what is the goal? (new wallet integration, migrate existing SPL wallet to light-token, add light-token alongside existing SPL)
      - AskUserQuestion: which operations? (receive, send, balance, history, wrap, unwrap — or all)
      - AskUserQuestion: instruction-level API (build your own transactions) or action-level API (high-level, fewer lines)?
      - Summarize findings and wait for user confirmation before implementing

      ### 4. Create plan
      - Based on steps 1–3, draft an implementation plan: which files to modify, what code to add, dependency changes
      - Verify existing connection/signer setup is compatible (createRpc with ZK Compression endpoint)
      - Key pattern: import from `@lightprotocol/compressed-token/unified` for all interface APIs
      - APIs return TransactionInstruction[][] — handle multi-tx case with signAllTransactions
      - If anything is unclear or ambiguous, loop back to step 3 (AskUserQuestion)
      - Present the plan to the user for approval before proceeding

      ### 5. Implement
      - Add deps if missing: Bash `npm install @lightprotocol/compressed-token @lightprotocol/stateless.js`
      - Set up RPC: `createRpc(RPC_ENDPOINT)` with a ZK Compression endpoint (Helius, Triton)
      - Import from `@lightprotocol/compressed-token/unified` for the interface APIs
      - Follow the guide and the approved plan
      - Write/Edit to create or modify files
      - TaskUpdate to mark each step done

      ### 6. Verify
      - Bash `tsc --noEmit`
      - Bash run existing test suite if present
      - TaskUpdate to mark complete

      ### Tools
      - mcp__zkcompression__SearchLightProtocol("<query>") for API details
      - mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "<q>") for architecture
      - Task subagent with Grep/Read/WebFetch for parallel lookups
      - TaskList to check remaining work
      ```
    </Accordion>
  </Tab>
</Tabs>

## API Reference

<CardGroup cols={2}>
  <Card title="Reference" icon="code" href="/api-reference/overview">
    SDK overview, Anchor constraints, and JSON RPC methods for Light Token and ZK Compression.
  </Card>

  <Card title="Solana to Light" icon="code-compare" href="/api-reference/solana-to-light-comparison">
    Instruction-by-instruction mapping from SPL and Solana to Light Token.
  </Card>
</CardGroup>

## SDK Reference

Structs, types, and generated docs. TypeScript and Rust client SDKs, plus program SDKs (light-sdk, light-token, macros).

### Client SDKs

<CardGroup cols={2}>
  <Card title="@lightprotocol/stateless.js" icon="js" href="https://lightprotocol.github.io/light-protocol/stateless.js/index.html">
    TypeScript RPC client for Light Token and Compressed Accounts.
  </Card>

  <Card title="light-client" icon="rust" href="https://docs.rs/light-client/latest/light_client/">
    Rust RPC client for Light Token and ZK Compression.
  </Card>

  <Card title="@lightprotocol/compressed-token" icon="coins" href="https://lightprotocol.github.io/light-protocol/compressed-token/index.html">
    TypeScript token operations for Light Token and Compressed Tokens.
  </Card>

  <Card title="light-token-client" icon="coins" href="https://docs.rs/light-token-client/latest/light_token_client/">
    Rust token operations for Light Token.
  </Card>
</CardGroup>

### Program

<CardGroup cols={2}>
  <Card title="light-sdk" icon="rust" href="https://docs.rs/light-sdk/latest/light_sdk/">
    Core SDK for on-chain programs.
  </Card>

  <Card title="light-sdk-macros" icon="rust" href="https://docs.rs/light-sdk-macros/latest/light_sdk_macros/">
    Procedural macros for Light accounts.
  </Card>

  <Card title="light-token" icon="rust" href="https://docs.rs/light-token/latest/light_token/">
    CPI instructions for Light Token program.
  </Card>

  <Card title="light-program-test" icon="rust" href="https://docs.rs/crate/light-program-test/latest">
    Local testing framework for programs.
  </Card>
</CardGroup>

# Next Steps

<Card title="Learn more in Frequently Answered Questions" icon="chevron-right" color="#0066ff" href="/faq" horizontal />
