agentleFS
rylsherdamz-rgbrylsherdamz-rgb/stellar-forge/skills/frontend-design/SKILL.md

frontend-design

Skill17 starsChanged 2 months agoMITView on GitHub

Create distinctive, production-grade Stellar dApp UI. Combines bold aesthetic direction with smart contract integration patterns — wallet connection flows, transaction UX, contract data displays, and agentic kit hook wiring. No generic "AI slop" aesthetics.

  • Reads credentials

187 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use instantly-campaign, albert-dm and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • yawningwhaleAISkill

    instantly-campaign

    Create a new Instantly cold-email campaign in the proven 5-email structure of the user's top-performing campaign (~16% reply rate). Use when the user wants to launch a new outbound campaign, write a cold email sequence, create an Instantly campaign, draft outreach for a new service or niche, or set up a sales sequence.

    Also in 6 projects that use this

  • yawningwhaleAISkill

    albert-dm

    Reply to DMs and messages the way Albert would. Use when the user asks "how would Albert reply to this", pastes a conversation and wants an Albert-style response, or asks you to draft/write a DM in Albert's voice. Albert sells AI voice agents / automations to local service businesses (Go High Level, lead follow-up, bookings).

    Also in 5 projects that use this

  • naman10parikhSkill

    ecosystem-reference

    Quick-access directory of Claude Code ecosystem repos, skills, plugins, MCPs, and patterns. Use when improving the harness.

    Also in 5 projects that use this

  • naman10parikhSkill

    fractal-delegation

    Also in 5 projects that use this

  • julianoczkowskiSkill

    brief-to-tasks

    Break a design brief into an ordered checklist of independently buildable tasks using vertical slices. Saves as a markdown checklist. Use when user wants to break down work, create tasks from a brief, plan implementation order, or mentions "tasks" or "breakdown".

    Also in 7 projects that use this

  • SeifBenayedSkill

    file-reading

    Use this skill when a file has been uploaded but its content is NOT in your context — only its path at /mnt/user-data/uploads/ is listed in an uploaded_files block. This skill is a router: it tells you which tool to use for each file type (pdf, docx, xlsx, csv, json, images, archives, ebooks) so you read the right amount the right way instead of blindly running cat on a binary. Triggers: any mention of /mnt/user-data/uploads/, an uploaded_files section, a file_path tag, or a user asking about an uploaded file you have not yet read. Do NOT use this skill if the file content is already visible in your context inside a documents block — you already have it.

    Also in 6 projects that use this

  • +6 more from naman10parikh

The file

Show its rules and text

We split this skill into the rules it gives an agent

13 rules. 0 are common, 6 are distinctive, and 7 are very specific to this project.

  • 0

    Common

    Most of the 181 edited versions we read keep these.

  • 6

    Distinctive

    This author's own choices. Worth a look.

  • 7

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before writing UI code, commit to a bold aesthetic direction:

    line 40
  2. Distinctive:

    Every dApp starts with wallet connect.

    line 58
  3. Distinctive:

    Empty state: Never show "0" without context — use "No tokens yet" with illustration

    line 94
  4. Very specific:

    All UI code must use Tailwind CSS (v4+, bundled with the scaffold).

    line 108
  5. Very specific:

    Every dApp must support both light and dark modes using Tailwind's dark: variant:

    line 151
  6. Distinctive:

    Never hardcode colors without a dark mode counterpart.

    line 157
  7. Distinctive:

    All Stellar data flows through the agentic kit hooks.

    line 161
  8. Very specific:

    Always handle error from contract.data.error or data.error

    line 179
  9. Very specific:

    Use addressToScVal / i128ToScVal from lib/stellar-config.ts for args

    line 180
  10. Very specific:

    Never display raw ScVal — always convert via scvalToString / scvalToNumber

    line 181
  11. Very specific:

    After a write() completes, auto-refresh relevant read() data

    line 182
  12. Very specific:

    All blockchain queries: use useStellarData() — no fetch(), no axios, no raw RPC

    line 287
  13. Distinctive:

    Loading states: use skeleton placeholders matching the content shape, not text spinners

    line 291

“Common” is measured: kept by at least 6 in 10 of the 181 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Frontend Design — Stellar dApp UI

Build visually distinctive Stellar dApp frontends that integrate wallet connection, contract interaction, and transaction flows — all while avoiding generic "AI slop" aesthetics.

When to Use

  • Designing wallet connect / disconnect UI that stands out
  • Displaying on-chain data (balances, token info, contract state) beautifully
  • Building transaction confirmation flows with loading + success states
  • Creating a cohesive dApp dashboard with contract read/write widgets
  • Styling agentic kit components (useStellarData, useContract, useWallet)
  • Any Stellar frontend task where visual polish matters

Design Thinking

Before writing UI code, commit to a bold aesthetic direction:

  • Purpose: What does this interface do? Who uses it — traders, devs, collectors?
  • Tone: Pick an extreme — brutalist dark, luxe-light editorial, retro-terminal, futuristic glassmorphism, industrial monochrome, playful neo-brutalism.
  • Blockchain UX constraints: Wallet not connected, waiting for confirmation, tx pending, tx confirmed, error states — each needs its own visual language.
  • Differentiation: What makes this UNFORGETTABLE? A custom loading spinner made from Stellar icons? Animated transaction history? A gradient that shifts with each new block?

CRITICAL: Execute with precision. Bold maximalism and refined minimalism both work — the key is intentionality, not intensity.

Stellar dApp UI Patterns

Pattern 1 — Wallet Connection

Every dApp starts with wallet connect. Design for the full lifecycle:

Disconnected → Connecting → Connected → Disconnecting
StateVisual treatment
DisconnectedProminent CTA, subtle pulse animation on the connect button
ConnectingSpinner, disabled button, "Opening Freighter..." text
ConnectedAddress badge (abbreviated), XLM balance chip, disconnect affordance
DisconnectingBrief fade before returning to disconnected state

Pattern 2 — Transaction Flow

A tx has 4 phases. Each needs distinct UI:

Simulate → Sign → Submit → Confirm
PhaseUX
SimulateShow 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
SubmitAnimated progress bar or spinner — "Waiting for ledger confirmation (~5s)"
ConfirmSuccess animation + updated balances. Or error with clear reason and retry button

Pattern 3 — Contract Data Display

For read-only contract state (useContract().read()):

  • Numeric values: Format with proper decimal places, show loading skeleton
  • Addresses: Truncate with G...abcd pattern, link to Stellar Expert
  • Timestamps: Relative ("2 min ago") + tooltip with absolute
  • Enums/status: Badge with color-coded status indicator
  • Empty state: Never show "0" without context — use "No tokens yet" with illustration

Pattern 4 — Error States

Blockchain errors are frequent. Design them in:

  • Wallet not connected: Context-aware prompt, not a red error box
  • User rejected: Subtle dismissal, no alarm
  • Insufficient XLM: Actionable — "You need at least 1.1 XLM for this transaction"
  • Network mismatch: Prominent banner with one-click network switch
  • RPC timeout: Retry button with exponential backoff indicator

Tailwind CSS — Mandatory Styling

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.

Tailwind Patterns for dApps

PatternTailwindWhen
Address displayfont-mono text-sm truncate max-w-[120px]All on-chain addresses
Loading skeletonanimate-pulse bg-muted rounded h-{n} w-{n}While contract data loads
Balance numberfont-mono tabular-numsNumeric on-chain values
Status badgerounded-full px-2 py-0.5 text-xs font-medium bg-{color}/10 text-{color}Tx status, token state
Cardrounded-lg border bg-card text-card-foreground shadow-smData sections
CTA buttonpx-4 py-2 bg-primary text-primary-foreground rounded-lg font-medium hover:bg-primary/90Primary actions
Error messagetext-sm text-destructive bg-destructive/10 rounded px-3 py-2Error states
Success toasttext-sm text-emerald-600 bg-emerald-50 dark:text-emerald-400 dark:bg-emerald-950/50Confirmation

Customizing the dApp Theme

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",
    },
  },
}

Dark Mode

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.

Agentic Kit Integration

All Stellar data flows through the agentic kit hooks. Every UI component must use these — never raw RPC.

Component → Hook Mapping

UI ConcernHookPurpose
Wallet buttonuseWallet()Connect/disconnect, address, sign
Balance listuseStellarData().getBalancesAll asset balances
Contract readeruseContract(id).read()Simulation-only read
Contract writeruseContract(id).write()Sign + submit + confirm
Event streamuseStellarData().getEventsOn-chain event display
Transaction statususeStellarData().getTransactionConfirmation check

Design Rules for Hook Data

  1. Show loading skeleton (not spinner) while getBalances or read() resolves
  2. Show last-updated timestamp for cached on-chain data
  3. Always handle error from contract.data.error or data.error
  4. Use addressToScVal / i128ToScVal from lib/stellar-config.ts for args
  5. Never display raw ScVal — always convert via scvalToString / scvalToNumber
  6. After a write() completes, auto-refresh relevant read() data

Source Files (published with this skill)

FileLocationContents
Providertemplates/frontend/providers/wallet-provider.tsxReact context + useWallet() export
Hook sourcetemplates/frontend/hooks/use-stellar-data.tsgetBalances, queryContract, getContractData, getEvents
Hook sourcetemplates/frontend/hooks/use-contract.tsread() (simulation), write() (sign+submit+confirm)
Hook sourcetemplates/frontend/hooks/use-stellar-wallet.tsconnect, disconnect, sign, getBalances
Componenttemplates/frontend/components/connect-button.tsxConnect + disconnect + XLM badge
Componenttemplates/frontend/components/invoke-contract.tsxRead/write any contract method from UI
Componenttemplates/frontend/components/send-payment.tsxSend XLM with balance refresh
Configtemplates/frontend/lib/stellar-config.tsRPC config, network config, ScVal helpers
Examplestemplates/frontend/examples/use-stellar-data-example.tsxBalanceViewer, ContractReader, EventList, UsdcBalance
Examplestemplates/frontend/examples/dashboard-page.tsxFull dashboard layout with ConnectButton + InvokeContract
Deploy trackerdata/deployments/<network>.jsonContract IDs + WASM hashes per network
Deploy scriptscripts/deploy-contract.shBuild → test gate → deploy → record → .env update
Env template.env.exampleAll env vars with contract address placeholders

Working Examples

Wallet connect with balance badge

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>
  );
}

Contract data with loading skeleton

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>;
}

Transaction flow with all 4 phases

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>
  );
}

Strict Rules

  1. All UI uses Tailwind CSS — no CSS modules, styled-components, or inline styles for layout/color
  2. Every dApp supports dark mode via dark: variant — never hardcode colors without a dark counterpart
  3. All blockchain queries use useStellarData() — no fetch(), no axios, no raw RPC
  4. Read-only uses useContract().read() — simulation, zero fees, no wallet prompt
  5. State-changing uses useContract().write() — handles sim + assemble + sign + submit + confirm
  6. Every transaction flow phase has a distinct visual state — never show a generic spinner
  7. Loading states use skeleton placeholders matching the content shape, not text spinners
  8. Error states are context-aware and actionable — not generic "Something went wrong"
  9. Wallet connection shows the full lifecycle: disconnected → connecting → connected → disconnecting
  10. After write() completion, auto-refresh read() data and balances
  11. Never display raw ScVal — convert via helpers from lib/stellar-config.ts
  12. Design with intention — pick a bold direction and execute precisely. No generic defaults.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.