Skip to content

talayash/agentrium / .claude/skills/frontend-patterns

frontend-patterns

Verified

React/TypeScript/xterm.js patterns for Agentrium frontend

Frontend Patterns for Agentrium

xterm.js Lifecycle

  • Create terminal instance in useEffect, dispose on unmount
  • Dispose all addons (fit, search, weblinks) before terminal
  • Never hold references to disposed terminals

Event Listeners

  • listen() returns unlisten function - call it in useEffect cleanup
  • Register listeners in App.tsx for global events (terminal-output, terminal-finished)

Zustand

  • terminalStore - NOT persisted (terminals are ephemeral)
  • appStore - persisted to localStorage (UI state)
  • Use selectors to avoid unnecessary re-renders
  • Avoid stale closures - use getState() in callbacks

IPC

  • Always wrap invoke() in try/catch
  • Handle both success and error cases
  • Show loading states for slow operations

Styling

  • Dark glassmorphic theme: bg-gray-800/80, border-gray-700/50, backdrop-blur
  • Use Tailwind classes - no hardcoded colors
  • Framer Motion for animations
brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).Stars: 319kUpdated Claude CodeCodexVerifiedInstall
brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.Stars: 196kUpdated Claude CodeCodexVerifiedInstall
frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.Stars: 196kUpdated Claude CodeCodexVerifiedInstall
mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).Stars: 196kUpdated Claude CodeCodexVerifiedInstall