skills-impeccable/i-harden/SKILL.md
Use when the user says: "production hardening", "handle edge cases in UI", "make it resilient", "improve onboarding", "empty states", "first-run experience". Improve interface resilience, error states, onboarding flows, and edge cases.
npx skillsauth add NodeJSmith/Claudefiles i-hardenInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Strengthen interfaces against edge cases, errors, internationalization issues, and real-world usage scenarios that break idealized designs.
Read ${CLAUDE_CONFIG_DIR:-~/.claude}/skills/i-frontend-design/SKILL.md for design principles, anti-patterns, and the Context Gathering Protocol. Follow the protocol before proceeding — if no design context exists yet, you MUST run /i-teach-impeccable first.
Identify weaknesses and edge cases:
Test with extreme inputs:
Test error scenarios:
Test internationalization:
CRITICAL: Designs that only work with perfect data aren't production-ready. Harden against reality.
After analyzing the current state, present your proposed changes to the user:
Then STOP and confirm before implementing:
AskUserQuestion:
question: "Here's what I propose. How would you like to proceed?"
header: "Confirm"
options:
- label: "Implement"
description: "Looks good — go ahead and make these changes."
- label: "Refine scope"
description: "I want to adjust what's included before you start."
- label: "Challenge this first"
description: "I'll run /mine-challenge against your proposal before we proceed."
- label: "Stop here"
description: "Don't implement anything. The proposal is in this conversation only."
If "Implement" → proceed to implementation below. If "Refine scope" → ask what to change, update proposal, re-confirm.
<!-- CHALLENGE-CALLER -->If "Challenge this first" → invoke /mine-challenge inline against the proposal, read findings, revise proposal, re-present this gate.
If "Stop here" → end the skill.
You already know the standard recipes — ellipsis/line-clamp truncation, Intl.DateTimeFormat/Intl.NumberFormat for locale formatting, debounce/throttle, proper-plural i18n libraries, status-code handling (400 validate, 401 login, 403 permission, 404 not-found, 429 rate-limit, 500 generic+support), retry buttons, skeleton screens, listener/timer cleanup on unmount. Apply them. The non-obvious ones worth spelling out:
Flex/grid overflow: a flex or grid child overflowing its container is almost always a missing min-width: 0 — the default min-width: auto refuses to shrink below content size.
.flex-item { min-width: 0; overflow: hidden; }
.grid-item { min-width: 0; min-height: 0; }
RTL: use logical properties so layout flips automatically, instead of physical left/right.
margin-inline-start: 1rem; /* not margin-left */
padding-inline: 1rem; /* not padding-left/right */
border-inline-end: 1px solid;/* not border-right */
[dir="rtl"] .arrow { transform: scaleX(-1); }
Text expansion: translations run longer than English (German ~30%) — see ux-writing.md for the per-language budget. Never use fixed widths on text containers; let flex/grid adapt to content.
Concurrent operations: disable submit while in-flight to prevent double-submission; optimistic updates need a rollback path. Abort pending requests on unmount.
Production-ready features work for first-time users, not just power users. Design the paths that get new users to value:
Empty states: Every zero-data screen needs:
Empty state types to handle:
First-run experience: Get users to their "aha moment" as quickly as possible.
Feature discovery: Teach features when users need them, not upfront.
Standard practice applies — client-side validation with clear maxlength/pattern constraints (backend validates independently), keyboard-accessible everything with logical tab order and modal focus management, ARIA live regions for dynamic changes, never color alone, skeleton screens on slow connections. One concrete snippet worth keeping is the reduced-motion reset:
@media (prefers-reduced-motion: reduce) {
* {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
}
}
Test with extreme data (very long, very short, empty), different languages, offline, throttled-to-3G connections, screen readers, keyboard-only, and old browsers. Automated coverage is out of scope — use your project's testing conventions.
IMPORTANT: Hardening is about expecting the unexpected. Real users will do things you never imagined.
NEVER:
Test thoroughly with edge cases:
Remember: You're hardening for production reality, not demo perfection. Expect users to input weird data, lose connection mid-flow, and use your product in unexpected ways. Build resilience into every component.
After implementation, summarize in conversation:
development
Use when the user says: "document how X works", "write up how this works", "durable explanation", "explain this for the docs", "document this subsystem". Writes a durable, architectural-altitude explanation that survives code churn.
development
Use when picking up a fresh session after /clear, a stop, or an unanswered AskUserQuestion. Reconstructs the prior session's intent from its transcript tail and surfaces any unresolved decision; user-invoked only — for a hand-written end-of-day handoff use /mine-good-morning instead.
development
Use when the user says: "what did we discuss", "continue where we left off", "remember when", "as I mentioned", "you suggested", "we decided", "search my conversations", "find the conversation where", "what did we work on", or uses implicit signals like past-tense references, possessives without context, or assumptive questions. Direct search over past Claude Code sessions via cass.
tools
Use when the user says: "what context do I have", "relevant history for this task", "what have we done related to this". Also usable proactively when starting work that likely has prior history. Assembles a structured context brief from past session history via cass, scoped to the current task and workspace.