Web React Dev
ASecurityUse when designing, implementing, reviewing, debugging, testing, or shipping React web client features, including component structure, routing, state ownership, API/data fetching, forms, browser behavior, accessibility, performance, build/deploy, and rendered browser verification. Product-agnostic; use miniapp-product-dev for WeChat/Alipay/Douyin/Baidu mini-programs, app-cross-platform-dev for Flutter/React Native/Android/iOS apps, product-ui-ux-design for UI/UX rules, backend skills for serv...
- 6 stars
- 0 votes
- 0 copies
- 6 views
- Added September 2, 2026
Works with
Security analysis
100/100Pro scans all 8 files and shows the line behind each finding
npx -y skills add ccoalm/ccl-skills --skill web-react-dev --agent claude-codeAre you the author of Web React Dev?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/ccoalm-web-react-dev)---
name: web-react-dev
description: Use when designing, implementing, reviewing, debugging, testing, or shipping React web client features, including component structure, routing, state ownership, API/data fetching, forms, browser behavior, accessibility, performance, build/deploy, and rendered browser verification. Product-agnostic; use miniapp-product-dev for WeChat/Alipay/Douyin/Baidu mini-programs, app-cross-platform-dev for Flutter/React Native/Android/iOS apps, product-ui-ux-design for UI/UX rules, backend skills for services, and testing-strategy for test-layer planning. Triggers also include "用 React 实现这个前端", "React 组件怎么写", "React 写一个", "Tailwind 怎么写", "Next.js / Vite 项目配置", "重构这个 React 组件/页面(局部)", "refactor a React component/file".
---
# Web React Dev
Use this skill for React web client engineering. It covers browser-rendered React applications, React components, routing, data fetching, forms, frontend API integration, accessibility, performance, build, and deploy checks. It does not own mini-program host behavior, Flutter, native mobile, backend service design, or visual design system rules. After code/test edits, self-check and invoke `code-review` automatically before completion.
## Routing
- Use `product-rd-workflow` first when the work spans product, design, architecture, implementation, testing, review, and release.
- Use `product-ui-ux-design` before or alongside coding for interaction model, layout, visual hierarchy, density, states, and UI acceptance.
- Use `miniapp-product-dev` for WeChat/Alipay/Douyin/Baidu mini-program pages, host-platform APIs, developer tools, review submission, and release. For React/H5 embedded inside a mini-program webview, this skill owns the React page while `miniapp-product-dev` owns the mini-program shell, bridge, host capabilities, and review/release evidence.
- For Taro projects (React syntax compiled to mini-program runtime): this skill owns the React layer (component decomposition, hooks, state ownership, effect discipline, accessibility primitives) and the **pure** shared layer in the repo's established shared module: DTOs, types, validators, pure mapping functions.
- Follow the Taro miniapp boundary, co-owned runtime adapter gate (`miniapp-product-dev` `## Sibling Boundary With web-react-dev`), and shared-layer browser-global ban in `references/react-architecture.md`.
- Use `app-cross-platform-dev` for Flutter, React Native, native Android, native iOS, app store release, and device-native capability work.
- Use Go or Python backend skills for API/service ownership, persistence, auth services, queues, and server contracts.
- For backend HTTP integrations, preserve current client wire behavior unless an explicit consumer-migration decision exists. Classify JSON vs protobuf-backed HTTP using `../platform-service-connectivity/references/protobuf-http-contract-signals.md`.
- Follow the HTTP wire-format classification, recorded response-envelope consumption, and `pending-contract-owner` stop rules in `references/web-quality-release.md`.
- Do not fork IDL or hand-maintain duplicated DTOs in the web repo.
- Use `typescript-dev` alongside this skill for the TypeScript layer: `tsconfig` and strictness, module resolution, type design, typing untrusted API data, declaration output for shared packages, and the type-check gate. React-specific typing (props, events, component state unions) stays here.
- For checking a React project against team standards (deterministic vs agent review split), read `references/web-quality-release.md`.
- Use `testing-strategy` to choose unit/component/API/E2E layers; return here for React-specific implementation.
- Use `test-artifact-management` when the ask is about generating structured test cases from a Feishu requirements doc or codebase and tracking them in Feishu Bitable before implementation begins.
- Use `defect-diagnosis` first for failed tests, browser bugs, hydration/rendering issues, flaky UI, API integration symptoms, or production regressions.
- For money, quota, permission, tenant/user data, high-impact AI, repeated submit, async finality, or support-traceable incidents, apply `product-rd-workflow` high-risk resilience gates before treating the UI as complete.
## Core Workflow
Before editing components, routes, state, API clients, styles, configs, or tests, complete enough analysis and planning for the change to be reviewable. Scale the plan to risk: a simple low-risk single-component change can use a short inline plan; multi-file, API-visible, accessibility-sensitive, release, bug-fix, branch/MR, unclear-risk, or high-risk work needs explicit task split, acceptance checks, verification commands, rollback or stop conditions, and named handoffs to testing, miniapp/app, backend, or diagnosis skills before edits. Runtime-visible work additionally consumes the canonical UI/UX delivery contract's Design brief and Test selection Phase 0 before the first implementation edit.
Repo-local agent contracts (`AGENTS.md` at the repo root and in source directories) are part of the delivery contract: when a change moves a stable boundary, generated surface, workflow, or directory-local rule, update the nearest contract in the same MR and keep coverage in sync per `product-rd-workflow`'s spec / repo-contract sync gate.
1. Define the web surface.
- Route/page, component boundary, URL params/query state, auth/permission state, responsive breakpoints, and browser support. Apply centralized finite-value mapping in `references/react-architecture.md` for enum, URL/query, filter, storage, and analytics boundaries.
- User-visible states: loading, skeleton, empty, partial, success, error, retry, disabled, permission denied, stale/offline, and optimistic update.
- Data boundary: API client, request cancellation, cache/revalidation, mutation invalidation, pagination, streaming/websocket if used, and typed error mapping. Apply central-client API observability and envelope-coverage rules in `references/web-quality-release.md`.
2. Analyze the existing web surface.
- Locate the owning route/page, component tree, state owner, API client, data-fetching layer, styling system, tests, and build scripts before editing. Load test-authoring, TC coverage lookup (`createTcSuite` / sidecar) before adding/changing tests, and `madge` import-graph deprecation liveness rules in `references/web-quality-release.md` before deleting deprecated coverage or web code.
- Identify whether state belongs in URL/query params, cache/server state, form state, local component state, browser storage, or global app state.
- Read repo wrappers first: package manager, dev/build scripts, lint/typecheck/test runners, browser/E2E tools, environment variables, and generated clients.
- Resolve installed component-library versions from the workspace lockfile and run library lints/codemods per `references/react-architecture.md`.
- If a design exists, map visible states and interactions to component ownership before implementing.
- For every visible UI change, load `../product-ui-ux-design/references/delivery-contract.md` and consume either its full Design brief + Phase 0 or its valid low-risk copy-only record + lightweight Phase 0 before coding. The lightweight path checks semantics, accessible name, localization, rendered extent, and target render without inventing unrelated matrices; risk-bearing copy uses the full path. For full slices, map structure, state/adaptation matrices, behavior and criteria to React ownership; record route/server, component/state owners, viewports/themes/input modes, and preserved behavior. When React is embedded in a native WebView, mini-program `web-view`, or Electron shell, this skill owns the content-layer member; the native/mini/desktop host owner must add its separate entry, binding and runtime record, even when host code is unchanged.
- Before the first implementation edit, add the canonical `client_entry` defined there: local rule identifier or short quote and implementation decision, target surface/runtime, planned run/capture command, and behavior that must remain unchanged.
3. Structure React code by ownership.
- Decompose UI by responsibility, not by arbitrary visual fragments. Put state at the lowest owner that needs to read/write it; lift only when siblings need shared state.
- Keep derived data during render, avoid Effects for derived state or event handling, isolate external side effects, and align loaders/caches with the repo pattern per `references/react-architecture.md`.
4. Implement browser behavior deliberately.
- Apply form/navigation/table/long-task surface contracts in `references/react-architecture.md`, token provenance, shortcut/command-palette registry and IME/modal isolation, and chart/canvas/image/PDF/annotation, dense table/card/menu, browser-storage, and cross-tab lifecycle cleanup in `references/web-ui-quality.md`, and embedded/hosted web-shell ownership in `references/embedded-h5-in-host.md`.
- Complex workbench and workspace patterns live in `references/complex-workspace-patterns.md`. Load it for every workbench or complex workspace (including standalone batch-operations workbenches and dense review, report, assignment, resource, assistant, media/capture, or app-hosted workspaces): apply the common workbench shell, permission-gated action, and restored-selection rules first, then select any relevant pattern family.
5. Debug systematically when behavior is wrong.
- Reproduce with the smallest page, route, component test, browser trace, or network fixture that shows the failure. Classify layer, payload, and ownership causes per `references/web-quality-release.md`.
- Add regression evidence at the lowest sufficient layer, then run browser smoke for visible flows.
6. Verify in a real browser.
- Run the repo's formatter, typecheck, lint, unit/component tests, and build or affected checks.
- Apply conformance checks, API observability, performance/Core Web Vitals checks, test-code authoring and smell lints, **TC traceability** (`createTcSuite` / local TC sidecar), and **`madge` import-graph deprecation checks** in `references/web-quality-release.md`, and UI/UX redesign stress-viewport and `N/A` rules in `references/web-ui-quality.md`.
- For API-backed UI, test component states, API client parsing/error translation, and at least one browser/E2E smoke path when feasible.
- Inspect the rendered page in a browser for any visible UI change, responsive behavior, empty/error states, and console/network errors.
- Return the complete canonical client-record member defined in `../product-ui-ux-design/references/delivery-contract.md` for testing Phase 1 and the design verdict. The member includes its applied rule/decision, affected files/components, preserved behavior, exact command, immutable candidate binding, producer member/version actually exercised, artifacts, tested route/server, viewport/container sizes, themes/input modes/states, criterion-mapped observations, console/network checks, coverage boundary, and gaps. The browser render proves only the captured content layer; it cannot close an embedded host or unbound producer member. `testing-strategy` records aggregate sufficiency before the design owner records the candidate-bound verdict.
- For browser-runtime changes, browser smoke is a completion gate when lower layers cannot prove the behavior. This includes changes to routing, browser storage/session restore, streaming/fetch finality, visibility or foreground/background behavior, permission/capability prompts, WebView bridge callbacks, upload/media flows, and rendered loading/error/final states. If the browser or app server is missing, first attempt normal setup; if still unavailable, stop at `pre-runtime-test-ready` or `blocked` and name the owner, attempted commands, residual risk, and next unblock action. `pre-runtime-test-ready` is handoff-only, not merge-ready, release-ready, or complete.
- Check accessibility names, labels, focus order, keyboard navigation, aria only when semantic HTML is insufficient, contrast, and text wrapping.
## Non-Negotiable Rules
- Do not use mocked happy-path component tests as proof that API integration works.
- Do not add Effects for state that can be derived from props/state during render.
- Do not ship user-visible UI without inspecting the rendered browser surface when layout or interaction changed.
- Do not add hidden keyboard traps, icon-only controls without accessible names, or mouse-only critical actions.
- Centralize configurable shortcut registries, reserved-key enforcement, override/unbind, and input/modal isolation per `references/web-ui-quality.md`.
- Do not let server transport errors leak directly into user copy; map them to useful UI states.
- Centralize finite-value parsing, display labels, defaults, unknown-value handling, and non-boundary test literal migration, and surface explicit pending/final/retry/support states for high-risk actions per `references/react-architecture.md`.
- Do not debug React/browser failures from code inspection alone when a browser reproduction, console output, network trace, screenshot, or focused test can be collected.
- Do not claim a web client fix is complete without naming the browser/rendered verification that was run. If required browser/runtime verification is unavailable after remediation, the status is `pre-runtime-test-ready` or `blocked`, not complete.
## Reference Loading
- For source provenance, current extraction boundary, and keep/merge/discard decisions, read `references/source-evidence-map.md` when auditing or re-extracting this skill.
- For embedded H5 inside a host (mini-program `web-view` / native WebView / payment / vendor app WebView), read `references/embedded-h5-in-host.md` (host-side contracts stay in `miniapp-product-dev` and `app-cross-platform-dev`).
- For joint extraction from Figma design source AND a React/web monorepo (with package class mapping, design-token cross-validation, deprecation-marker detection), read `../skill-extraction-workflow/references/two-source-extraction-pattern.md`. Use when both sources are available; produces aligned design + implementation rules with cross-source token validation.
- For component decomposition, state ownership, effects, routing, forms, and data fetching, read `references/react-architecture.md`.
- For workbench shells (including standalone batch-operations workbenches) and dense review, report, assignment, resource, assistant, media/capture, or app-hosted workspace state-machine patterns, read `references/complex-workspace-patterns.md`.
- For browser accessibility, keyboard/focus, responsive behavior, and visual verification, read `references/web-ui-quality.md`.
- For API integration, caching, error handling, testing, performance, build, and deployment readiness, read `references/web-quality-release.md`.
Files in this skill
- SKILL.md
- agents/openai.yaml
- references/complex-workspace-patterns.md
- references/embedded-h5-in-host.md
- references/react-architecture.md
- references/source-evidence-map.md
- references/web-quality-release.md
- references/web-ui-quality.md
Attribution
Related skills
View all in development →Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.