Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
git clone --depth 1 https://github.com/hatch3r/hatch3rWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/rules/hatch3r/hatch3r/hatch3r-ai-ux-patterns)<a href="https://agentmods.dev/rules/hatch3r/hatch3r/hatch3r-ai-ux-patterns"><img src="https://agentmods.dev/badge/rules/hatch3r/hatch3r/hatch3r-ai-ux-patterns.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.03990 |
| Opus 5 | $0.00000 | $0.01995 |
| Sonnet 5 | $0.00000 | $0.00798 |
| Haiku 4.5 | $0.00000 | $0.00399 |
Grade A, and why
hatch3r-ai-ux-patterns scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 135 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AI/Agentic UX Patterns (2026)
Pillars: P2 (Scientific & Practical Quality), CQ2 (UX Quality)
Scope
This rule applies when the end-user project ships LLM-driven UI — chat, assistant, copilot, agent dashboards, generative UI surfaces. It does NOT govern the LLM backend itself (model selection, prompt engineering, retrieval pipeline). For non-AI UX rules (loading, empty, error, partial states; form patterns; microcopy), cross-reference rules/hatch3r-ux-states-and-flows.md. When both rules apply to the same surface, the non-AI rule sets the baseline and this rule layers AI-specific behavior on top.
Backend companion: rules/hatch3r-ai-evals.md defines eval harness, prompt versioning, cost telemetry, prompt caching, model fallback, and hallucination-as-SLI. Apply both rules for any LLM-driven feature.
Detection: this rule activates when the project imports an AI SDK (ai, @ai-sdk/*, openai, @anthropic-ai/sdk, @google/generative-ai), or contains files under ai/, chat/, assistant/, agents/, llm/, copilot/. Adding any of these to a project that previously had no AI surface triggers the full ruleset on the next agent run.
Streaming-First Defaults
- Every LLM-driven surface uses framework-agnostic streaming hooks:
useChat,useCompletion, oruseObjectfrom Vercel AI SDK UI (or equivalent for non-React stacks). Hand-rolled SSE orfetchagainst the model endpoint is a regression in 2026. - Render progressive tokens from the moment the request starts. Pair with a skeleton state during the pre-token window (request-sent, first-token-pending). A blank surface during model latency is a regression.
- Render markdown incrementally without re-parsing the whole buffer on every chunk (Vercel AI Elements
MessageResponsepattern). Use a streaming-safe markdown renderer that tracks last-rendered offset and appends from there. - Emit chunk-level error boundaries. If a stream fails mid-flight, retain prior tokens, render an inline retry control adjacent to the truncated response, and do not blank the surface or reset the message body.
- Indicate completion explicitly via a final-token marker or
onFinishcallback transition. Stale "thinking" indicators after stream-end erode trust and waste user attention. - Non-streaming responses on LLM-driven surfaces are a regression. The narrow exception is structured-output endpoints that must return a single validated JSON payload (
useObjectalready streams partial objects — prefer that). - Typing indicator policy: show only while no token has arrived; switch to streamed content the moment the first delta lands. Two-second indicator timeouts that linger past first-token are a regression.
- Backpressure: when the model emits faster than the renderer can paint, batch deltas to one paint per animation frame (
requestAnimationFrame) rather than dropping tokens or queuing into an unbounded buffer. - Message model — AI SDK 6+ breaking change (verify before pinning a version): since AI SDK 6 (GA 2025-12-22) and retained in AI SDK 7 (current stable major, GA 2026-06-25), every
useChatmessage is an orderedpartsarray, not a flatcontentstring, andhandleSubmit/handleInputChangeare replaced bysendMessage({ text }). Part types:text,reasoning,file,source-url/source-document, and — for tools —tool-${toolName}(static tools) ordynamic-tool(tools unknown at compile time, e.g. MCP); a tool invocation is one part whosestatefield transitionsinput-streaming→input-available→output-available/output-error, not separatetool-call/tool-resultentries — switching on those strings matches nothing. Render by iteratingmessage.parts; code that readsmessage.contentsilently drops the cards the §Tool-Call UI Cards section mandates — text still renders but the tool call never appears. Re-checkai-sdk.dev/docs/ai-sdk-uifor the current major before adopting a pinned version (part typing verified againstai-sdk.dev/docs/ai-sdk-ui/chatbot-tool-usage, accessed 2026-07-12).
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 4d ago First seen · 135 lines · 0 tokens per session scan A a74017c1a5f2
hatch3r-ai-ux-patterns is a cursor rule published in the GitHub repository hatch3r/hatch3r (26 stars, last pushed 3d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 3,990 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other cursor rules, from other repositories
ux-design-expert
AIOX agent @ux-design-expert - UX/UI Designer & Design System Architect.
ponytail
Ponytail, lazy senior dev mode. Always pick the simplest solution that works.
angular-20
This rule provides comprehensive best practices and coding standards for Angular development, focusing on modern TypeScript, standalone components, signals, and performance optimizations.
dev-standard
Apache Superset development standards and guidelines for Cursor IDE.
cli-error-handling
CLI command error handling patterns.
prefer-direct-imports-over-module-mocks
Prefer extracting a testable core over vi.mock / vi.resetModules when unit tests need to reach production logic entangled with config, env, or singletons.