feature

Scaffolds React frontend feature modules with standardized folder structure, naming conventions, and code patterns.

1|Updated Apr 27, 2026
One-click install
npx skills add https://github.com/GSU26SE55/backend --skill feature-gsu26se55
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: feature
Source: https://github.com/GSU26SE55/backend/tree/main/.codex/skills/fe/feature
Command: npx skills add https://github.com/GSU26SE55/backend --skill feature-gsu26se55

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When adding a new page or domain area to a React web frontend, developers often produce inconsistent folder layouts, call APIs directly inside components, or invent ad-hoc naming. This Skill enforces a single, strict feature-module pattern so every new feature under src/features/ follows the same structure, naming, and data-flow rules. ## Core Features & Use Cases - Standardized feature scaffolding: Defines the exact folder layout (pages, components, hooks, services, schemas, types) for any new domain such as auth, admin, manager, or staff. - Enforced data-flow rules: API calls must go through a service layer and TanStack Query hooks, never directly in components; Zustand is reserved for auth session state only. - Form validation pattern: Provides Zod schemas wired to react-hook-form via zodResolver for type-safe form handling. - Use Case: When asked to add a battery management page, the Skill generates BatteryListPage.tsx, a battery.service.ts using the shared axios instance, a useBatteries hook, and a battery.schema.ts — all in the correct locations with correct naming. ## Quick Start Ask the AI to create a new frontend feature module for a specific domain, for example: create a new feature for managing battery maintenance tickets under the staff domain.

Frequently Asked Questions about feature

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

FAQPage Schema
How do I structure a new feature folder in a React TypeScript project?▼

Create a folder under src/features/{domain}/ containing pages/, components/, hooks/, services/, schemas/, and types/ subfolders. Each file follows a strict naming pattern such as {Name}Page.tsx, use{Name}.ts, and {name}.service.ts.

How to call APIs in React components with TanStack Query?▼

Never call APIs directly in components. Define functions in a service file using a shared axios instance, then wrap them in a TanStack Query hook like useBatteries, and consume that hook inside the page component.

How do I validate React forms with Zod and react-hook-form?▼

Define a Zod schema in a {name}.schema.ts file, infer the form values type with z.infer, and pass the schema to useForm via zodResolver. This gives type-safe validation with per-field error messages.

Can one React feature import code from another feature?▼

No. Features must not import from other features; they may only import from the shared/ directory. This keeps domain modules decoupled and prevents circular dependencies across feature boundaries.

When should I use Zustand versus TanStack Query for state?▼

Use TanStack Query for all server state fetched from APIs. Reserve Zustand only for the auth session, and use local useState purely for UI state like modals, tabs, and toggles.