agentrium: Skill for Claude Code

.claude/skills/frontend-patterns/SKILL.md

frontend-patterns is a skill for Claude Code from talayash/agentrium. It costs 16 tokens per session (247 once invoked), scanned A, original, MIT.

A set of React, TypeScript, terminal, event-listener, state-management, and inter-process communication patterns for a ClaudeTerminal frontend. It explains how to clean up terminal resources, handle events, and avoid outdated callback data.

In plain words
What is it for?
Use it when building or reviewing ClaudeTerminal frontend components, terminal windows, event listeners, Zustand state selectors, backend calls, loading states, or Tailwind styling.
Why use it?
It gives developers consistent rules for preventing resource leaks, unnecessary interface updates, broken event cleanup, and errors when the frontend talks to the Rust backend.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is talayash/agentrium's own configuration. It tells Claude Code how to work on agentrium itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything agentrium configures →

Reuse

Borrowing it

Nothing to install: this file belongs to talayash/agentrium. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/talayash/agentrium/master/.claude/skills/frontend-patterns/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/talayash/agentrium

Made for: Claude Code.

Wrote 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.

agentmods badge for frontend-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/talayash/agentrium/frontend-patterns/github.svg)](https://agentmods.dev/skills/talayash/agentrium/frontend-patterns)
Your own site
<a href="https://agentmods.dev/skills/talayash/agentrium/frontend-patterns"><img src="https://agentmods.dev/badge/skills/talayash/agentrium/frontend-patterns/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for frontend-patterns

Your own site · 80×15
<a href="https://agentmods.dev/skills/talayash/agentrium/frontend-patterns"><img src="https://agentmods.dev/badge/skills/talayash/agentrium/frontend-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 16 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 247 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00016 $0.00247
Opus 5.5 $0.00006 $0.00099
Sonnet 5.5 $0.00003 $0.00049
Haiku 4.5 $0.00002 $0.00025

Measured 1mo ago against content hash c4a4df0efc4f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

frontend-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 1mo 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.

.claude/skills/frontend-patterns/SKILL.md · 32 lines

What it actually says

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
Changes

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.

  1. 1mo ago Changed c4a4df0efc4f
  2. 1mo ago First seen · 32 lines · 16 tokens per session scan A b1e6029a6e85

Subscribe to this mod's changes

frontend-patterns is a skill published in the GitHub repository talayash/agentrium (46 stars, last pushed 2d ago), licensed MIT. It adds 16 tokens to every session and 247 once invoked, about $0.0001 per session on Opus 5.5. 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-08-30.

Related

Other skills, from other repositories

content-hash-cache-pattern

Cache expensive file processing results using SHA-256 content hashes — path-independent, auto-invalidating, with service layer separation.

affaan-m/ECC · 30 tokens

segment-create

Checklist for adding a new Oh My Posh segment. Use when asked to add or create a new segment: lists every file to touch, the existing segment to copy, and how to verify.

JanDeDobbeleer/oh-my-posh · 42 tokens

python-release

Handle Python SDK release, build, bump, packaging metadata, PyPI client pin, uv.lock, nox/build workflow, and publish verification changes. Use for Python release process work or dependency pin bumps; do not use for ordinary Python feature implementation.

ComposioHQ/composio · 53 tokens

setup-ts-deep-modules

A TypeScript repository setup that keeps each package's internal code private behind root-level entry files. A package is a reusable unit of code, and an entry point is the file other code is meant to import.

vinvcn/mattpocock-skills-zh-CN · 49 tokens

CreateCLI

Generates production-ready TypeScript CLIs via a 3-tier template system (manual arg parsing, Commander.js, oclif), each shipping full implementation, docs, package.json, strict config, JSON output, and exit-code compliance. USE WHEN create CLI, build CLI, command-line tool, wrap API, add command, upgrade tier…

danielmiessler/LifeOS · 88 tokens

moai-factory-foreman

One unattended factory foreman iteration: watch the backlog queue, dispatch the next operator-picked card to an isolated worker, collect completion evidence on read (not on claims), and report. This is the body the project's loop.md driver invokes each iteration of a bare /loop; it can also be invoked directly to test…

modu-ai/moai-adk · 75 tokens