Skip to content
Back to skills

Frontend Patterns

ASecurity

React/TypeScript/xterm.js patterns for Agentrium frontend

  • 42 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 23, 2026
ai-agentstypescriptreactfrontend

Works with

  • terminal

Security analysis

A100/100

Scanned September 23, 2026

npx -y skills add talayash/agentrium --skill frontend-patterns --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Frontend Patterns?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Frontend Patterns
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/talayash-frontend-patterns/badge)](https://www.skillsdirectory.com/skills/talayash-frontend-patterns)

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

Download with Pro
SKILL.md
---
name: frontend-patterns
description: 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

Attribution

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

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.