/stellar-forge:dappfrom stellar-forge
Provides React hooks (useStellarData, useContract, useStellarWallet) and a WalletProvider for building Stellar dApps. Handles blockchain queries, contract reads/writes, and wallet connection.
Ships in stellar-forge. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
All blockchain queries go through useStellarData(). Never write raw RPC or curl.
// providers/wallet-provider.tsx
import { WalletProvider } from "@/providers/wallet-provider";
export default function RootLayout({ children }: { children: React.ReactNode }) {
return (
<WalletProvider>
{children}
</WalletProvider>
);
}
useStellarData() — Blockchain queriesimport { useStellarData } from "@/hooks/use-stellar-data";
const {
getBalances, // (address: string) => { asset, balance }[]
queryContract, // (id: string, method: string, args: ScVal[]) => ScVal | null
getContractData, // (id: string, key: ScVal) => ScVal | null
getEvents, // (id: string, limit?: number) => Event[]
getTransaction, // (hash: string) => TxResponse | null
loading, // boolean
error, // string | null
rpc, // raw RPC client (fallback only)
} = useStellarData();
useContract(contractId) — Contract read/writeimport { useContract } from "@/hooks/use-contract";
const c = useContract("CA3...");
await c.read("name"); // simulation-only, no tx
await c.read("balance_of", [addressArg]); // any read method
await c.write(sender, "transfer", args, signFn); // full sign+submit
// c.data exposes the underlying useStellarData()
useStellarWallet() — Wallet connection + dataimport { useStellarWallet } from "@/hooks/use-stellar-wallet";
const {
address, // string | null
network, // string | null
connect, // () => Promise<void>
disconnect, // () => void
sign, // (xdr: string) => Promise<string>
getBalances, // () => Promise<{asset, balance}[]>
data, // useStellarData()
} = useStellarWallet();
useWallet() — From WalletProvider contextimport { useWallet, useContract, useStellarData } from "@/providers/wallet-provider";
const { address, sign, data, getBalances } = useWallet();
// Same as useStellarWallet() but from context — no need to call connect()
| File | Location | Contents |
|---|---|---|
| Hook source | hooks/use-stellar-data.ts | getBalances, queryContract, getContractData, getEvents, getTransaction |
| Hook source | hooks/use-contract.ts | read() (simulation), write() (sign+submit) |
| Hook source | hooks/use-stellar-wallet.ts | connect, disconnect, sign, getBalances |
| Provider | providers/wallet-provider.tsx | React context + useWallet() export |
| Components | components/connect-button.tsx | Connect + disconnect + XLM balance badge |
| Components | components/invoke-contract.tsx | Read/write any contract method from UI |
| Components | components/send-payment.tsx | Send XLM with balance refresh after send |
| Config | lib/stellar-config.ts | RPC config, network config, helper ScVal functions |
| Examples | examples/use-stellar-data-example.tsx | BalanceViewer, ContractReader, EventList, UsdcBalance, XlmBalanceBadge |
| Examples | examples/dashboard-page.tsx | Full dashboard layout with ConnectButton + InvokeContract |
function Balances({ address }: { address: string }) {
const { data } = useWallet();
const [bals, setBals] = useState<{asset:string,balance:string}[]>([]);
useEffect(() => { data.getBalances(address).then(setBals); }, [address]);
return <ul>{bals.map(b => <li key={b.asset}>{b.asset}: {b.balance}</li>)}</ul>;
}
function ContractName({ id }: { id: string }) {
const { read } = useContract(id);
const [name, setName] = useState("...");
useEffect(() => { read("name").then(r => r && setName(scvalToString(r))); }, [id]);
return <p>{name}</p>;
}
function Transfer({ id, to }: { id: string; to: string }) {
const { address, sign } = useWallet();
const { write } = useContract(id);
const [status, setStatus] = useState("");
async function handleTransfer() {
if (!address) return;
setStatus("sending...");
const res = await write(address, "transfer", [
addressToScVal(address), addressToScVal(to), i128ToScVal(100_000_000n)
], sign);
setStatus(`done: ${res.hash}`);
}
return <button onClick={handleTransfer}>{status || "Transfer 100 USDC"}</button>;
}
function Events({ id }: { id: string }) {
const { data } = useWallet();
const [events, setEvents] = useState<any[]>([]);
useEffect(() => { data.getEvents(id).then(setEvents); }, [id]);
return <ul>{events.slice(0,5).map((e,i) => <li key={i}>{e.type}</li>)}</ul>;
}
useStellarData() for every blockchain query — no fetch(), no curl, no raw RPCuseContract().read() for simulation-only reads (zero fees, no wallet prompt)useContract().write() for state-changing calls (handles sim + assemble + sign + submit + confirm)data.rpc.* only when none of the above methods fittemplates/frontend/examples/ — reference them directly when generating codecomponents/connect-button.tsx (opens in a new tab)components/invoke-contract.tsx (opens in a new tab)components/send-payment.tsx (opens in a new tab)examples/dashboard-page.tsx (opens in a new tab)examples/use-stellar-data-example.tsx (opens in a new tab)hooks/use-contract.ts (opens in a new tab)hooks/use-stellar-data.ts (opens in a new tab)hooks/use-stellar-wallet.ts (opens in a new tab)lib/stellar-config.ts (opens in a new tab)providers/wallet-provider.tsx (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Claude Code refuses to install this plugin
.claude-plugin/plugin.json: commands: Invalid input, agents.0: Invalid string: must start with "./", agents.1: Invalid string: must start with "./", agents.2: Invalid string: must start with "./", agents.3: Invalid string: must start with "./", agents.4: Invalid string: must start with "./", agents.5: Invalid string: must start with "./", skills.0: Invalid string: must start with "./"
.claude-plugin/plugin.json: commands: Invalid input, agents.0: Invalid string: must start with "./", agents.1: Invalid string: must start with "./", agents.2: Invalid string: must start with "./", agents.3: Invalid string: must start with "./", agents.4: Invalid string: must start with "./", agents.5: Invalid string: must start with "./", skills.0: Invalid string: must start with "./"
Checked against Claude Code 2.1.332's install rules. The listing below is what the repository ships; Claude Code cannot install it as published.
23 skills in this plugin
/agentic-paymentsAgentic and machine-to-machine payments on Stellar. Covers x402 (HTTP 402 paid APIs) and MPP (Machine Payments Protocol) Charge/Channel modes./assetsStellar classic assets, trustlines, and Stellar Asset Contract (SAC) bridge to smart contracts. Covers issuance, distribution, authorization flags, clawback, regulated assets, and SEP-41 token interop. Use when tokenizing real-world assets, issuing stablecoins, managing trustlines, or bridging classic assets to Soroban contracts.
/brandkitPremium brand-kit image generation skill for creating high-end brand-guidelines boards, logo systems, identity decks, and visual-world presentations. Trained for minimalist, cinematic, editorial, dark-tech, luxury, cultural, security, gaming, developer-tool, and consumer-app brand systems. Optimized for intentional logo concepting, refined composition, sparse typography, strong symbolic meaning, premium mockups, art-directed imagery, and flexible grid layouts./dataQuerying Stellar chain data via Stellar SDK (preferred), Stellar RPC, and Horizon (legacy). Covers SDK methods, JSON-RPC, REST endpoints, streaming, pagination, agentic kit integration./design-taste-frontendAnti-slop frontend skill for landing pages, portfolios, and redesigns. The agent reads the brief, infers the right design direction, and ships interfaces that do not look templated. Real design systems when applicable, audit-first on redesigns, strict pre-flight check./design-taste-frontend-v1The original v1 taste-skill, preserved for projects depending on its exact behavior. The current default is `design-taste-frontend` (v2 experimental), which is a substantial rewrite. Use this v1 install name only if you need exact backward compatibility.Other plugins' skills for the same job