/stellar-forge:frontend-designfrom stellar-forge
Crafts production-grade Stellar dApp UIs with wallet connection flows, transaction UX, and contract data displays. Helps avoid generic 'AI slop' aesthetics.
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.
None: SKILL.md is the whole skill.
Build visually distinctive Stellar dApp frontends that integrate wallet connection, contract interaction, and transaction flows — all while avoiding generic "AI slop" aesthetics.
useStellarData, useContract, useWallet)Before writing UI code, commit to a bold aesthetic direction:
CRITICAL: Execute with precision. Bold maximalism and refined minimalism both work — the key is intentionality, not intensity.
Every dApp starts with wallet connect. Design for the full lifecycle:
Disconnected → Connecting → Connected → Disconnecting
| State | Visual treatment |
|---|---|
| Disconnected | Prominent CTA, subtle pulse animation on the connect button |
| Connecting | Spinner, disabled button, "Opening Freighter..." text |
| Connected | Address badge (abbreviated), XLM balance chip, disconnect affordance |
| Disconnecting | Brief fade before returning to disconnected state |
A tx has 4 phases. Each needs distinct UI:
Simulate → Sign → Submit → Confirm
| Phase | UX |
|---|---|
| Simulate | Show expected state change: "You will send 100 USDC to G..." with gas estimate |
| Sign | "Check your wallet to approve" — wallet handles the modal, but show a waiting state |
| Submit | Animated progress bar or spinner — "Waiting for ledger confirmation (~5s)" |
| Confirm | Success animation + updated balances. Or error with clear reason and retry button |
For read-only contract state (useContract().read()):
G...abcd pattern, link to Stellar ExpertBlockchain errors are frequent. Design them in:
All UI code must use Tailwind CSS (v4+, bundled with the scaffold). No CSS modules, no styled-components, no inline styles for layout or color. Use tailwindcss for every design choice — typography, spacing, color, layout, animation.
| Pattern | Tailwind | When |
|---|---|---|
| Address display | font-mono text-sm truncate max-w-[120px] | All on-chain addresses |
| Loading skeleton | animate-pulse bg-muted rounded h-{n} w-{n} | While contract data loads |
| Balance number | font-mono tabular-nums | Numeric on-chain values |
| Status badge | rounded-full px-2 py-0.5 text-xs font-medium bg-{color}/10 text-{color} | Tx status, token state |
| Card | rounded-lg border bg-card text-card-foreground shadow-sm | Data sections |
| CTA button | px-4 py-2 bg-primary text-primary-foreground rounded-lg font-medium hover:bg-primary/90 | Primary actions |
| Error message | text-sm text-destructive bg-destructive/10 rounded px-3 py-2 | Error states |
| Success toast | text-sm text-emerald-600 bg-emerald-50 dark:text-emerald-400 dark:bg-emerald-950/50 | Confirmation |
In tailwind.config.ts, define semantic tokens for your dApp's brand:
theme: {
extend: {
colors: {
stellar: { // Stellar brand integration
blue: "#3e5b9c",
purple: "#7c3aed",
},
},
fontFamily: {
mono: ["JetBrains Mono", "Fira Code", "monospace"], // for addresses + data
},
keyframes: {
"slide-bar": { "0%": { width: "0%" }, "100%": { width: "100%" } },
},
animation: {
"slide-bar": "slide-bar 5s ease-in-out",
},
},
}
Every dApp must support both light and dark modes using Tailwind's dark: variant:
<div className="bg-white dark:bg-gray-950 text-gray-900 dark:text-gray-100">
Never hardcode colors without a dark mode counterpart.
All Stellar data flows through the agentic kit hooks. Every UI component must use these — never raw RPC.
| UI Concern | Hook | Purpose |
|---|---|---|
| Wallet button | useWallet() | Connect/disconnect, address, sign |
| Balance list | useStellarData().getBalances | All asset balances |
| Contract reader | useContract(id).read() | Simulation-only read |
| Contract writer | useContract(id).write() | Sign + submit + confirm |
| Event stream | useStellarData().getEvents | On-chain event display |
| Transaction status | useStellarData().getTransaction | Confirmation check |
getBalances or read() resolveserror from contract.data.error or data.erroraddressToScVal / i128ToScVal from lib/stellar-config.ts for argsScVal — always convert via scvalToString / scvalToNumberwrite() completes, auto-refresh relevant read() data| File | Location | Contents |
|---|---|---|
| Provider | templates/frontend/providers/wallet-provider.tsx | React context + useWallet() export |
| Hook source | templates/frontend/hooks/use-stellar-data.ts | getBalances, queryContract, getContractData, getEvents |
| Hook source | templates/frontend/hooks/use-contract.ts | read() (simulation), write() (sign+submit+confirm) |
| Hook source | templates/frontend/hooks/use-stellar-wallet.ts | connect, disconnect, sign, getBalances |
| Component | templates/frontend/components/connect-button.tsx | Connect + disconnect + XLM badge |
| Component | templates/frontend/components/invoke-contract.tsx | Read/write any contract method from UI |
| Component | templates/frontend/components/send-payment.tsx | Send XLM with balance refresh |
| Config | templates/frontend/lib/stellar-config.ts | RPC config, network config, ScVal helpers |
| Examples | templates/frontend/examples/use-stellar-data-example.tsx | BalanceViewer, ContractReader, EventList, UsdcBalance |
| Examples | templates/frontend/examples/dashboard-page.tsx | Full dashboard layout with ConnectButton + InvokeContract |
| Deploy tracker | data/deployments/<network>.json | Contract IDs + WASM hashes per network |
| Deploy script | scripts/deploy-contract.sh | Build → test gate → deploy → record → .env update |
| Env template | .env.example | All env vars with contract address placeholders |
function StellarStatusBar() {
const { address, connect, disconnect, getBalances } = useWallet();
return address ? (
<div className="flex items-center gap-3 px-4 py-2 border-b bg-card">
<div className="w-2 h-2 rounded-full bg-green-400" />
<span className="font-mono text-sm">{address.slice(0,6)}...{address.slice(-4)}</span>
<BalanceBadge onRefresh={() => getBalances()} />
<button onClick={disconnect} className="text-xs text-muted-foreground hover:text-destructive">
Disconnect
</button>
</div>
) : (
<button onClick={connect} className="px-4 py-2 bg-primary text-primary-foreground rounded-lg font-medium">
Connect Wallet
</button>
);
}
function TokenBalance({ contractId, address }: { contractId: string; address: string }) {
const { read } = useContract(contractId);
const [balance, setBalance] = useState<string | null>(null);
const [loading, setLoading] = useState(true);
useEffect(() => {
setLoading(true);
read("balance_of", [addressToScVal(address)])
.then(v => setBalance(v ? scvalToNumber(v).toLocaleString() : "0"))
.finally(() => setLoading(false));
}, [contractId, address]);
if (loading) return <div className="h-6 w-24 bg-muted animate-pulse rounded" />;
return <span className="font-mono tabular-nums">{balance}</span>;
}
function TransferForm({ contractId }: { contractId: string }) {
const { address, sign } = useWallet();
const { write, data } = useContract(contractId);
const [phase, setPhase] = useState<"idle"|"simulating"|"signing"|"submitting"|"confirmed"|"error">("idle");
const [errorMsg, setErrorMsg] = useState("");
async function handleTransfer(to: string, amount: bigint) {
if (!address) return;
setPhase("simulating");
try {
const res = await write(address, "transfer", [
addressToScVal(address), addressToScVal(to), i128ToScVal(amount),
], sign);
setPhase(res.hash ? "confirmed" : "error");
} catch (e: any) {
setErrorMsg(e.message);
setPhase("error");
}
}
return (
<div className="space-y-3">
{/* phase-specific UI */}
{phase === "simulating" && <p className="text-sm text-muted-foreground animate-pulse">Simulating transfer...</p>}
{phase === "signing" && <p className="text-sm text-muted-foreground">Check your wallet to approve</p>}
{phase === "submitting" && <div className="h-1 bg-muted rounded overflow-hidden"><div className="h-full bg-primary w-1/2 animate-slide" /></div>}
{phase === "confirmed" && <p className="text-sm text-green-500">Transfer confirmed!</p>}
{phase === "error" && <p className="text-sm text-destructive">{errorMsg}</p>}
{data.error && <p className="text-xs text-destructive">{data.error}</p>}
</div>
);
}
dark: variant — never hardcode colors without a dark counterpartuseStellarData() — no fetch(), no axios, no raw RPCuseContract().read() — simulation, zero fees, no wallet promptuseContract().write() — handles sim + assemble + sign + submit + confirmread() data and balanceslib/stellar-config.tsWhat SKILL.md sets; muted values are Claude Code's defaults
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.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.
Other plugins' skills for the same job