harden

Harden interfaces against edge cases, errors, i18n issues, and text overflow.

Updated Mar 28, 2026
One-click install
npx skills add https://github.com/po4yka/blog --skill harden-po4yka
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: harden
Source: https://github.com/po4yka/blog/tree/main/.agents/skills/harden
Command: npx skills add https://github.com/po4yka/blog --skill harden-po4yka

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Interfaces built for ideal demo data break in production when users enter long names, lose connectivity, switch to RTL languages, or trigger API errors. This Skill systematically identifies and fixes those weaknesses so UI components survive real-world usage. ## Core Features & Use Cases - Text Overflow & i18n Resilience: Applies truncation, line-clamping, logical CSS properties, and Intl API formatting so layouts survive long translations, RTL scripts, and CJK characters. - Error & Edge Case Handling: Implements network failure recovery, per-status-code API error states, empty/loading states, and concurrent-operation guards like double-submit prevention. - Accessibility & Performance Resilience: Covers keyboard navigation, reduced-motion support, debouncing, memory-leak cleanup, and slow-connection strategies. - Use Case: Before shipping a React dashboard, run this Skill to add retry buttons on failed fetches, clamp overflowing card titles, support German text expansion, and verify behavior with 1000+ list items. ## Quick Start Harden the user profile page by fixing text overflow, adding error states for failed API calls, and verifying RTL and long-translation layouts.

Frequently Asked Questions about harden

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I handle text overflow in CSS layouts?

Use text-overflow: ellipsis with overflow: hidden for single-line truncation, or -webkit-line-clamp for multi-line clamping. Set min-width: 0 on flex and grid items so they can shrink below content size, and use overflow-wrap: break-word for long unbroken strings.

How to make a web UI support RTL languages like Arabic?

Use CSS logical properties such as margin-inline-start and padding-inline instead of physical left/right properties. Mirror directional icons with transform: scaleX(-1) under [dir="rtl"], and test layouts with Arabic or Hebrew content.

How should I handle API error status codes in a frontend app?

Map each status code to a specific UI response: 400 shows validation errors, 401 redirects to login, 403 shows a permission message, 404 shows a not-found state, 429 shows a rate-limit notice, and 500 shows a generic error with a retry option.

Why does my layout break with German translations?

German text is often 30% longer than English, so fixed-width containers overflow. Use flexible flexbox or grid layouts with padding-based sizing instead of fixed widths, and budget 30-40% extra space for translated strings.

How do I prevent double form submission in React?

Disable the submit button while the request is in flight and guard the handler with a pending state flag. For optimistic updates, keep a rollback path so failed mutations restore the previous state.