From afc53ead132e7ffd4f212fe3e2497d32f6dec6d3 Mon Sep 17 00:00:00 2001 From: Rohit Yadav Date: Wed, 1 Jul 2026 02:17:51 +0530 Subject: [PATCH] feat: add agent-ux-skill for Solana Agent-UX audits --- agent-ux-skill/LICENSE | 21 + agent-ux-skill/README.md | 173 ++++++++ agent-ux-skill/install.sh | 110 +++++ agent-ux-skill/skill/SKILL.md | 68 ++++ agent-ux-skill/skill/gasless-flow.md | 343 ++++++++++++++++ agent-ux-skill/skill/scaffold-ui.md | 588 +++++++++++++++++++++++++++ agent-ux-skill/skill/ux-audit.md | 138 +++++++ 7 files changed, 1441 insertions(+) create mode 100644 agent-ux-skill/LICENSE create mode 100644 agent-ux-skill/README.md create mode 100644 agent-ux-skill/install.sh create mode 100644 agent-ux-skill/skill/SKILL.md create mode 100644 agent-ux-skill/skill/gasless-flow.md create mode 100644 agent-ux-skill/skill/scaffold-ui.md create mode 100644 agent-ux-skill/skill/ux-audit.md diff --git a/agent-ux-skill/LICENSE b/agent-ux-skill/LICENSE new file mode 100644 index 0000000..fef0ed9 --- /dev/null +++ b/agent-ux-skill/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 agent-ux-skill contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/agent-ux-skill/README.md b/agent-ux-skill/README.md new file mode 100644 index 0000000..8ef527a --- /dev/null +++ b/agent-ux-skill/README.md @@ -0,0 +1,173 @@ +# 🧩 agent-ux-skill + +> **AI skill for the Solana AI Kit** β€” Analyze dApp transaction flows, generate UX optimization reports, and scaffold production-ready frontend components. + +[![Solana](https://img.shields.io/badge/Solana-2026_Stack-9945FF?style=flat-square&logo=solana)](https://solana.com) +[![License](https://img.shields.io/badge/License-MIT-blue?style=flat-square)](./LICENSE) +[![Skill Bounty](https://img.shields.io/badge/Superteam-Skill_Bounty-14F195?style=flat-square)](https://github.com/solanabr/skill-bounty) + +--- + +## The Problem + +Web3 dApps lose **40–60% of users** at the transaction signing step due to: + +- πŸ”΄ Wallet connection failures with no fallback UI +- πŸ”΄ Cryptic error messages (`"custom program error: 0x1194"`) +- πŸ”΄ No loading states during 10-second confirmation waits +- πŸ”΄ Requiring SOL for gas before users can do anything +- πŸ”΄ Missing retry logic on `BlockhashNotFound` errors + +Founders know their UX is bad, but lack the tooling to systematically identify +and fix these issues. + +## The Solution + +**agent-ux-skill** is an AI skill that plugs into the +[Solana AI Kit](https://github.com/solana-labs/solana-ai-kit) and gives your +AI coding agent three superpowers: + +| Capability | What it does | +|-------------------------|------------------------------------------------------------------------------| +| **πŸ” UX Audit** | Analyzes your transaction flow against a 20+ point checklist and outputs a severity-ranked report. | +| **🧱 Scaffold UI** | Generates production-ready React/Vue components: wallet guards, transaction toasts, error boundaries, priority fee selectors. | +| **β›½ Gasless Flow** | Guides implementation of fee-payer architecture, Octane relays, or session keys so users never need SOL to transact. | + +--- + +## Architecture + +This skill follows the **progressive loading** pattern β€” the AI agent only +loads the specific instructions it needs, keeping token usage minimal: + +``` +skill/ +β”œβ”€β”€ SKILL.md ← Router (entry point β€” routes to sub-files) +β”œβ”€β”€ ux-audit.md ← UX audit checklist & report template +β”œβ”€β”€ scaffold-ui.md ← React/Vue component templates +└── gasless-flow.md ← Fee payer / relay / session key guides +``` + +The router (`SKILL.md`) evaluates the user's intent and loads **only the +relevant file** β€” never all three at once. + +--- + +## Installation + +### Option 1: Installer Script + +```bash +# Clone this repo +git clone https://github.com/your-username/agent-ux-skill.git +cd agent-ux-skill + +# Set the path to your Solana AI Kit installation +export SOLANA_AI_KIT_DIR="/path/to/solana-ai-kit" + +# Run the installer +chmod +x install.sh +./install.sh +``` + +### Option 2: Manual Copy + +```bash +cp -r skill/ /path/to/solana-ai-kit/skills/agent-ux-skill/ +``` + +### Option 3: Git Submodule + +```bash +cd /path/to/solana-ai-kit +git submodule add https://github.com/your-username/agent-ux-skill.git skills/agent-ux-skill +``` + +--- + +## Usage + +Once installed, your AI agent will automatically detect the skill. Use natural +language prompts: + +### UX Audit + +``` +"Audit the UX of my Solana dApp. My program ID is Fg6P...abc. +Here's a recent transaction: 5Kx9...xyz" +``` + +The agent will analyze your transaction flow and produce a structured report +with **Critical / Warning / Info** findings, each with a concrete fix. + +### Scaffold Components + +``` +"Scaffold wallet connection and transaction UI components for my +Next.js app using React and CSS Modules." +``` + +The agent generates 5 production-ready components: +- `WalletConnectionGuard` β€” conditional rendering based on wallet state +- `TransactionToast` β€” real-time tx status feedback +- `SendTransactionButton` β€” one-click send with simulation, retry, priority fees +- `SolanaErrorBoundary` β€” catches and decodes Anchor/program errors +- `PriorityFeeSelector` β€” user-facing tx speed picker (Slow / Standard / Fast) + +### Gasless Transactions + +``` +"Add gasless transactions to my dApp so users don't need SOL. +I want a server-side fee payer approach." +``` + +The agent provides a complete server endpoint + client hook with rate limiting, +security validation, and transaction co-signing. + +--- + +## Tech Stack + +| Layer | Technology | +|-----------------|-----------------------------------------------------------| +| Solana SDK | `@solana/web3.js` v2 | +| Wallet Adapter | `@solana/wallet-adapter-react` v0.15+ | +| React | React 19 with `"use client"` directives | +| Vue | Vue 3.5+ Composition API (`