Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Generative Ui Expert

ASecurity

Use when Generative UI mastery. Vercel AI SDK 3.0+, React Server Components (RSC) + LLMs, streaming UI elements, structured tool calling (Zod schemas), and managing client-side AI state via useChat/useObject.

5 stars
0 votes
0 copies
0 views
Added 9/27/2026
ai-agentstypescriptbashreactnextjsapi

Works with

cliapi

Security Analysis

A100/100

Scanned 9/27/2026

$npx -y skills add Harmitx7/tribunal-kit --skill generative-ui-expert --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Generative Ui Expert?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Generative Ui Expert
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/harmitx7-generative-ui-expert-tribunal-kit/badge)](https://www.skillsdirectory.com/skills/harmitx7-generative-ui-expert-tribunal-kit)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
Files
SKILL.md
---
name: generative-ui-expert
description: "Use when Generative UI mastery. Vercel AI SDK 3.0+, React Server Components (RSC) + LLMs, streaming UI elements, structured tool calling (Zod schemas), and managing client-side AI state via useChat/useObject."
version: 5.0.0
last-updated: 2026-09-13
skills:
  - nextjs-react-expert
  - react-specialist
  - browser-native-ai
tools: Read, Grep, Glob, Bash, Edit, Write
scripts-binding:
  - .agent/scripts/lint_runner.js
  - .agent/scripts/verify_all.js
---

# Generative UI Expert (Vercel AI SDK)

---

## 🛠️ Technical Architecture & Reference Recipes

---

## 1. Core Principles

- **No Markdown Slop:** Avoid dumping raw markdown when structured UI can be used. If the user asks for a weather report, stream a `<WeatherCard />`, not text.
- **Server-Driven UI:** Leverage React Server Components (`ai/rsc`) to stream actual React components over the wire as the LLM yields function calls.
- **Structured Data First:** Use strict Zod schemas (`useObject`, `streamObject`) whenever you need the LLM to output parsable data.
- **Progressive Disclosure:** Use `streamUI` to yield intermediate loading states (e.g., `<SkeletonLoader />`) while waiting for external APIs.

## 2. Vercel AI SDK Patterns

### A. Streaming React Components (`ai/rsc`)

When setting up `ai/rsc`, define explicit tool boundaries:

```typescript
import { createAI, getMutableAIState, streamUI } from "ai/rsc";
import { z } from "zod";

export const AI = createAI({
  actions: {
    submitMessage: async (message: string) => {
      "use server";
      return streamUI({
        model: openai("gpt-4-turbo"),
        system: "You are a helpful assistant.",
        prompt: message,
        tools: {
          getWeather: {
            description: "Get the weather for a location",
            parameters: z.object({ city: z.string() }),
            generate: async ({ city }) => {
              yield <WeatherSkeleton city={city} />;
              const temp = await fetchWeatherAPI(city);
              return <WeatherCard city={city} temp={temp} />;
            }
          }
        }
      });
    }
  }
});
```

### B. Structured Output (`streamObject`)

Use this when you need strict JSON streams for charts, tables, or complex states.

```typescript
const result = await streamObject({
  model: openai('gpt-4-turbo'),
  schema: z.object({
    points: z.array(z.object({ x: z.number(), y: z.number() })),
  }),
  prompt: 'Generate a sales forecast chart data',
});
// Client consumes via useObject
```

## 3. Client-Side State Management

- Use `useChat` for standard text+tool workflows.
- Use `useUIState` and `useAIState` to manage the UI payload array and the underlying LLM message history separately.
- Always include `id` and `role` in message schemas to prevent key-rendering bugs in React.

## 4. LLM Traps & Pre-Flight Checks

- **TRAP:** Sending client components directly over the wire from `generate:`.
- **FIX:** Server actions can only return Server Components. If returning an interactive widget, wrap it in a client component but yield it from the server.
- **TRAP:** Forgetting to yield intermediate states in slow tools.
- **FIX:** Always `yield <Loading />` before awaiting slow API calls inside a tool's `generate` function.

## Verification Protocol

Before submitting code, ensure:

1. `zod` is used for all tool parameters.
2. Server Actions are properly annotated with `"use server"`.
3. The model supports tool calling (e.g., `gpt-4o`, `claude-3-5-sonnet`).

Attribution

Harmitx7Harmitx7
View sourceSee grades on GitHubMore from Harmitx7 →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Caveman

Terse caveman voice: answer first, fluff gone, every technical fact kept. Use for /caveman, "caveman mode", "talk like caveman", "be brief", "less tokens". Stays on until "stop caveman" or "normal mode".

1100021 votes

Hyperplan

Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...

698621 votes

Writing Skills

Create and manage Claude Code skills in HASH repository following Anthropic best practices. Use when creating new skills, modifying skill-rules.json, understanding trigger patterns, working with hooks, debugging skill activation, or implementing progressive disclosure. Covers skill structure, YAML frontmatter, trigger types (keywords, intent patterns), UserPromptSubmit hook, and the 500-line rule. Includes validation and debugging with SKILL_DEBUG. Examples include rust-error-stack, cargo-dep...

3931 votes

Mcp Code Execution

Routes multi-tool workflows through MCP servers for large datasets and pipelines. Use when Bash tool overhead is limiting throughput on data-heavy tasks.

3421 votes

catchup

Recovers the conversation and failed tool calls of a previous Codex, Amp, Claude Code, Antigravity, Cline, Copilot CLI, Cursor, DeepSeek Harness, Grok Build, Kimi, OpenCode, Pi Agent, or ZCode session. Use when the user says "catch up", "what did the last session do", "get me up to speed", "I switched agents", asks to recover/summarize a previous session before continuing, or asks to diagnose or report a catchup failure. Do NOT use for the current conversation, git history, or any non-agent log.

741 votes
View all in ai-agents →