harden

harden is a command for Claude Code from koolamusic/claudefiles. It costs 30 tokens per session (1,006 once invoked), scanned A, original, MIT.

A checklist for making user interfaces handle real-world conditions, including errors, unusual input, different languages, slow performance, and varied screen sizes.

In plain words
What is it for?
Use it to test and improve error handling, internationalization, performance, responsive layouts, keyboard and touch input, and unusual data.
Why use it?
It exposes problems that may not appear in a normal demo, such as long translations, right-to-left text, network failures, crowded lists, or small mobile screens.

Command for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the ux plugin — 1 skill, 6 commands shipped together

Install

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.

agentmods
npx agentmods add commands/koolamusic/claudefiles/harden
Clone the repo
git clone --depth 1 https://github.com/koolamusic/claudefiles

Made for: Claude Code.

Or install ux, the plugin that ships this one along with the rest of its 1 skill, 6 commands.

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 harden

README.md
[![agentmods](https://agentmods.dev/badge/commands/koolamusic/claudefiles/harden.svg)](https://agentmods.dev/commands/koolamusic/claudefiles/harden)
Your own site
<a href="https://agentmods.dev/commands/koolamusic/claudefiles/harden"><img src="https://agentmods.dev/badge/commands/koolamusic/claudefiles/harden.svg" alt="Measured on agentmods" height="20"></a>
Per session 30 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,006 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00030 $0.01006
Opus 5 $0.00015 $0.00503
Sonnet 5 $0.00006 $0.00201
Haiku 4.5 $0.00003 $0.00101

Measured 6d ago against content hash 6c5ad42cde06, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

harden 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 6d 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.

plugins/ux/commands/harden.md · 93 lines

How it starts

The opening of the file, as written. The whole thing — 93 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Strengthen interfaces against real-world usage: edge cases, errors, internationalization, performance bottlenecks, and cross-device adaptation.

First: Use the ux skill for design principles and anti-patterns.

Assess

  1. Test with extreme inputs: very long/short text, special characters (emoji, RTL), large numbers, many items (1000+), no data
  2. Test error scenarios: network failures, API errors (400-500), validation, permissions, rate limiting, concurrent ops
  3. Test i18n: long translations (German +30%), RTL, CJK characters, date/number formats, pluralization
  4. Measure performance: Core Web Vitals (LCP, INP, CLS), bundle size, frame rate, network waterfall
  5. Test responsiveness: mobile (320px), tablet, desktop, different inputs (touch, mouse, keyboard), orientations

Text Overflow & i18n

Overflow handling:

  • text-overflow: ellipsis for single-line truncation
  • -webkit-line-clamp for multi-line
  • min-width: 0 on flex/grid items to allow shrinking
  • clamp() for fluid typography

i18n:

  • 30-40% space budget for translations. Use flexible containers, not fixed widths.
  • Logical properties (margin-inline-start, padding-inline) for RTL support
  • Intl.DateTimeFormat and Intl.NumberFormat for locale-aware formatting
  • UTF-8 everywhere, test with CJK and emoji

Error Handling

  • Network errors: clear message + retry button + offline mode if applicable
  • Form validation: inline errors near fields, specific messages, preserve user input
  • API errors: handle each status (400=validation, 401=login redirect, 403=permission, 404=not found, 429=rate limit, 500=generic+support)
  • Graceful degradation: core functionality works without JS, progressive enhancement

Edge Cases

  • Empty states with clear next action
  • Loading states with context ("Loading your projects...")
  • Large datasets: pagination or virtual scrolling
  • Concurrent ops: prevent double-submit, handle race conditions
  • Permission states: explain why, show path to access

Read the full file on GitHub · 93 lines

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. 6d ago First seen · 93 lines · 30 tokens per session scan A 6c5ad42cde06

Subscribe to this mod's changes

harden is a command published in the GitHub repository koolamusic/claudefiles (132 stars, last pushed 7d ago), licensed MIT. It adds 30 tokens to every session and 1,006 once invoked, about $0.0002 per session on Opus 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.