- Home
- Skills
- Frontend & Web Apps
- Pragmatic React & TypeScript Conventions
Works with the AI Agents you already use
Pragmatic React & TypeScript Conventions
Enforce one obvious owner, typed data contracts, and clean Suspense boundaries so your React codebase survives a year of product edits.
Free
Pragmatic React & TypeScript Conventions
Example session with this skill installed
We're migrating our internal billing dashboard to React 19 with TypeScript strict mode, using TanStack Query, TanStack Router, and MUI v7. The invoices feature in src/features/invoices has grown organically: components fetch their own data, loading spinners are nested three levels deep, and someone cast the API response to any to silence a build error. Please review the feature against our frontend conventions, restructure data access around suspense queries at the right boundaries, fix the MUI Grid usages, and give me a merge-readiness report with before/after notes.
- Read your context and instructions
- Compiled the pragmatic react
- Generated the UI component
Summary
Reviewed the invoices feature (7 components, 2 routes) against the React/TS conventions. Three ownership violations and one missing suspense boundary were fixed; the module is now merge-ready.
| Area | Before | After |
|---|---|---|
| Data fetching | Inline fetch in InvoiceTable.tsx, manual isLoading flags in 3 children | useSuspenseQuery at route boundary via invoiceApi.getSummary |
| Types | any-cast on API response, shared AppState blob | Typed InvoiceSummary DTO in features/invoices/types |
| Layout | Cross-feature imports from src/utils/invoices.ts | Public features/invoices/index.ts exports only |
| Styling | Legacy <Grid xs={12}> v5 syntax (11 sites) | <Grid size={{ xs: 12, md: 6 }} /> |
| Performance | Search hit the API on every keystroke | useDebouncedValue(query, 300) |
| Bundle | Reports editor eager-loaded in main chunk | lazy() + WorkspaceSkeleton fallback |
Next steps
- Run tsc --noEmit and route smoke tests before merging
- Adopt the same pattern for features/projects next sprint
- Add the 10-point merge checklist to your PR template
InvoiceTable.tsx
TSX · React component
Example file from a real run - the skill writes it into your workspace.
Connects securely to your tools. The creator never sees your data.
About this skill
The problem
React codebases often degrade into a mess of prop drilling, inconsistent loading states, and untyped data fetching. Maintenance becomes impossible when business logic is scattered across generic UI components without clear ownership.
What it does
- Enforces a feature-based folder structure to isolate domain logic from shared UI.
- Standardizes Suspense-based data fetching to eliminate repetitive loading booleans.
- Provides strict TypeScript patterns for DTOs and API contracts.
- Updates component implementations to use MUI v7 syntax and TanStack Router conventions.
- Integrates performance defaults like debouncing, memoization, and lazy loading.
Frameworks & tools
React, TypeScript, Material UI (MUI) v7, TanStack Query (React Query), and TanStack Router.
Why this beats prompting it yourself
General-purpose LLMs often suggest outdated React patterns or mix competing state management styles. This skill provides a cohesive architectural blueprint, ensuring every component follows a predictable structure that scales without architectural drift.
Use cases
- Refactoring legacy class or hook-based components to modern Suspense patterns.
- Scaffolding new feature modules with colocated types and API hooks.
- Conducting PR reviews to ensure MUI v7 and TypeScript best practices are met.
Known limitations
Requires a project setup using TanStack Query and Router. Not intended for small, single-file prototypes where architectural overhead is unnecessary.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Frontend & Web Apps.
Tailored to the TanStack Query/Router + MUI v7 stack; guidance degrades on Redux, older MUI, or class-component codebases. It encodes standards, so it cannot measure actual render or bundle cost without your profiler or CI metrics.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
9 uses
Times used to date
Free to use
No account required to browse
Trust & safety
Security scan
Security scan passed 2 months ago
- Free with an Agensi account
Permissions
File Scopes
Read access audits components and edit access applies the fixes directly in your src/ tree; nothing leaves the machine.