openrisk-frontend-charter
OpenRisk frontend engineering charter — feature structure, Zustand patterns, the three UI states, modal layout, switch defaults, i18n, accessibility gates and…
от opendefender★ 34 звезды на GitHub
Установить openrisk-frontend-charter в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
OpenRisk Frontend Charter
Structure
/src/features/[module]/ pages, components, hooks, stores for that feature
/src/shared/ design system, global hooks, utils, primitives
/src/services/ typed API client generated from OpenAPI
/src/locales/ fr.json, en.json — both always
The crash patterns this codebase has already shipped — never repeat them
- Switch without
defaulton a union.RiskBadgeandStatusDotcrashed the app to a white page on an unexpected casing. Every switch on a string union has adefaultand normalizes its input first. - Store-wide dependency inside a loader. A loader depending on the whole store while calling a setter inside it = infinite render loop. Use stable selectors, always.
- Unstable callbacks in a connect effect. Inline callbacks in the deps of
an SSE/WebSocket
connectrecreate it every render. Put them in refs. - Modal centred without
max-h. The submit button falls below the fold. Every modal:max-h-[90vh], flex column, fixed header, scrollable body, pinned footer. Verify at 600px viewport height. - Toast storms on a missing endpoint. A failing stream logs in dev; it never raises a user-facing toast per retry.
Shared primitives — reuse, do not recreate
useSoftDelete<T> (hide locally, 5s undo toast, API call fires after the
window) · DangerConfirm (impact readout + safer alternative, for vital
irreversible actions) · InfoHint (progressive disclosure tooltip) ·
EmptyState (icon + title + sub + actionable CTA, never a dead end) ·
GlobalShortcuts · CommandPalette · the single <DataTable>.
Routine content deletion → soft delete + undo.
Vital irreversible action → DangerConfirm with an impact breakdown.
Never a bare window.confirm in new code.
Mandatory per view
Loading (skeleton, never a full-page spinner) · error (actionable copy) · empty (CTA). Optimistic updates on critical mutations. Zod on every form.
Accessibility gates — merge blockers
Keyboard-operable end to end · focus always visible · focus never trapped · Escape closes every overlay and returns focus to its trigger · severity never encoded by color alone · contrast 4.5:1 text and 3:1 UI · no keystroke hijacking when an input, textarea, select or contenteditable has focus.
Definition of Done — frontend
npx tsc -bcleannpx vite buildcleannpx eslint . --max-warnings=0- FR + EN keys present in
/src/locales - Three UI states implemented
- axe-core pass on the touched screens, zero serious/critical
- Verified at 414px and at 600px viewport height
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл openrisk-frontend-charter?
OpenRisk frontend engineering charter — feature structure, Zustand patterns, the three UI states, modal layout, switch defaults, i18n, accessibility gates and the frontend definition of done. Load before implementing or reviewing React/TypeScript code.
Как установить скилл openrisk-frontend-charter?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл openrisk-frontend-charter запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
AnthropicGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
claude-api
AnthropicReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
algorithmic-art
AnthropicCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
mcp-integration
AnthropicThis skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…