harden

A set of practices for making user interfaces handle unusual inputs, failures, translations, and other real-world conditions. It covers cases such as long text, empty data, network errors, permission problems, right-to-left languages, and different date or number formats.

In plain words
What is it for?
Use it to review and improve text overflow, empty and error states, API failures, validation, permissions, rate limits, internationalization, and large data sets.
Why use it?
It reduces breakage when data is messy, requests fail, translations are longer, or users have different language and accessibility needs. This helps interfaces remain usable beyond ideal test cases.

Skill for Claude CodeCodex

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 skills/childrentime/reactuse/harden
Any agent
npx skills add childrentime/reactuse --skill harden
Clone the repo
git clone --depth 1 https://github.com/childrentime/reactuse

Made for: Claude Code, Codex.

Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,178 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 100% copy Near-identical to another mod 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 $0.00032 $0.02178
Opus 5 $0.00016 $0.01089
Sonnet 5 $0.00006 $0.00436
Haiku 4.5 $0.00003 $0.00218

Measured yesterday against content hash 6114cdc92bd9, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 yesterday.

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.

Origin

This is a copy

100% identical to harden — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

packages/website-astro/.agents/skills/harden/SKILL.md · 357 lines

How it starts

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

Strengthen interfaces against edge cases, errors, internationalization issues, and real-world usage scenarios that break idealized designs.

Assess Hardening Needs

Identify weaknesses and edge cases:

  1. Test with extreme inputs:

    • Very long text (names, descriptions, titles)
    • Very short text (empty, single character)
    • Special characters (emoji, RTL text, accents)
    • Large numbers (millions, billions)
    • Many items (1000+ list items, 50+ options)
    • No data (empty states)
  2. Test error scenarios:

    • Network failures (offline, slow, timeout)
    • API errors (400, 401, 403, 404, 500)
    • Validation errors
    • Permission errors
    • Rate limiting
    • Concurrent operations
  3. Test internationalization:

    • Long translations (German is often 30% longer than English)
    • RTL languages (Arabic, Hebrew)
    • Character sets (Chinese, Japanese, Korean, emoji)
    • Date/time formats
    • Number formats (1,000 vs 1.000)
    • Currency symbols

CRITICAL: Designs that only work with perfect data aren't production-ready. Harden against reality.

Hardening Dimensions

Systematically improve resilience:

Text Overflow & Wrapping

Long text handling:

/* Single line with ellipsis */
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Multi-line with clamp */
.line-clamp {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Allow wrapping */
.wrap {
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

Flex/Grid overflow:

/* Prevent flex items from overflowing */
.flex-item {
  min-width: 0; /* Allow shrinking below content size */
  overflow: hidden;
}

/* Prevent grid items from overflowing */
.grid-item {
  min-width: 0;
  min-height: 0;
}

Responsive text sizing:

  • Use clamp() for fluid typography
  • Set minimum readable sizes (14px on mobile)
  • Test text scaling (zoom to 200%)
  • Ensure containers expand with text

Read the full file on GitHub · 357 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. yesterday First seen · 357 lines · 32 tokens per session scan A 6114cdc92bd9

Subscribe to this mod's changes

harden is a skill published in the GitHub repository childrentime/reactuse (1,047 stars, last pushed 11d ago), licensed Unlicense. It adds 32 tokens to every session and 2,178 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to harden, differing in 0 lines, and is treated as a copy.

Related

Other skills, from other repositories

generate-translations

Use when new translation keys are added to packages to generate new translations strings.

payloadcms/payload · 18 tokens

taro-ui-guide

Guides installation, Taro config, styling, and usage of taro-ui (At components) for WeChat/Alipay/H5/RN. Use when building Taro apps with taro-ui, picking components, theming, i18n, or modifying packages/taro-ui source.

jd-opensource/taro-ui · 66 tokens

ss-motion

Apply a named StyleSeed motion to a component — either one of the 5 personality seeds (Spring/Silk/Snap/Float/Pulse × entrance/exit/hover/press/layout) or a distinctive keyword move from the motion library (toggle-flip, toggle-curtain, reveal-blur, pop-in, shimmer, …). Translates vibe words into framer-motion code…

bitjaru/styleseed · 85 tokens

init-project

初始化整个项目,清除模板自带的示例内容(src/pages/demo、src/pages/content、src/components/Github、src/servers/content、menus/demo 及相关 i18n),并连带删除代码中的 import 与引用。执行时会先以 dry-run 预览将要删除的文件和将要修改的引用,经用户确认后再真正执行。.

southliu/south-admin-react · 83 tokens

system-design-integration-patterns

Choose distributed integration and evolution patterns by the constraint each removes: outbox, CQRS, event sourcing, saga orchestration or choreography, leader election, sidecar, anti-corruption layer, and strangler-fig migration. Use when services must stay consistent across a boundary.

HoangNguyen0403/agent-skills-standard · 62 tokens

lingui-best-practices

Implement internationalization with Lingui in React and JavaScript applications. Use when adding i18n, translating UI, working with Trans/useLingui/Plural, extracting messages, compiling catalogs, or when the user mentions Lingui, internationalization, i18n, translations, locales, message extraction, ICU…

platformplatform/PlatformPlatform · 78 tokens