frontend-feature

Build pages, API clients, hooks, and permission-aware UI in a Next.js frontend.

49|11|Updated Jul 31, 2026
One-click install
npx skills add https://github.com/vstorm-co/agenticos --skill frontend-feature-vstorm-co
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: frontend-feature
Source: https://github.com/vstorm-co/agenticos/tree/main/.claude/skills/frontend-feature
Command: npx skills add https://github.com/vstorm-co/agenticos --skill frontend-feature-vstorm-co

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Frontend work in a large Next.js codebase fails in predictable ways: scattered fetch calls, inconsistent query invalidation, controls visible to users who lack permission, and empty states that silently mask backend errors. This Skill encodes the project's layout, conventions, and traps so changes land correctly the first time. ## Core Features & Use Cases - Feature scaffolding workflow: Guides the full path from a route under src/app/[locale]/(dashboard)/ through a typed API client, query keys, a hook, a Zustand store, and domain components. - Permission-aware UI: Ensures controls are hidden rather than rendered-and-then-403, with integration tests asserting the behavior. - Empty-state diagnosis: Explains why a page rendering an empty state may actually be a failed query, and how to test against real data. - Use Case: Add a new dashboard page wired to a backend endpoint, register its query keys, wrap the client in a hook, localize all copy with next-intl, and verify with type-check, lint, and vitest. ## Quick Start Use the frontend-feature skill to add a new dashboard page that lists records from a backend endpoint, hides the create button from Viewers, and passes type-check, lint, and tests.

Frequently Asked Questions about frontend-feature

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

FAQPage Schema
How do I add a new page to a Next.js dashboard with locale-prefixed routes?▼

Create the page at src/app/[locale]/(dashboard)/<feature>/page.tsx as a Server Component by default, adding "use client" only when you need state, effects, or handlers. Then wire a typed API client, query keys, and a hook before building components.

How to wire React components to a backend API without scattering fetch calls?▼

Build a typed module in src/lib/<feature>-api.ts on top of api-client.ts, register query keys in query-keys.ts, and wrap the client in a hook under src/hooks/. Components consume hooks, never clients or raw fetch.

How do I hide UI controls based on user permissions in React?▼

Read the effective permission set from use-permissions.ts for the active organization and do not render controls the caller may not use. Write an integration test with Testing Library against a mocked API to assert the button is actually hidden.

Why does my Next.js page show an empty state when the backend is down?▼

Dashboard pages fan out to several queries and render their empty state when a query fails, so "no data" and "502 error" look identical. Check the network tab before the component, and write tests that assert on data rather than headings.

When should I use Zustand versus the query layer for state management?▼

Use Zustand stores only for UI and ephemeral state, one per concern and re-exported from index.ts. Server data belongs in the query layer with registered query keys so invalidation stays consistent.

When should I use Playwright instead of integration tests for frontend testing?▼

Reserve Playwright for journeys crossing the whole stack via the e2e-tests skill. For asserting permission-hidden buttons or form submissions, *.integration.test.tsx with Testing Library against a mocked API is cheaper and more precise.