rule-frontend-services

Enforce standardized fetch patterns and error handling for frontend API integration.

1|1|Updated Mar 31, 2026
One-click install
npx skills add https://github.com/btabaska/simpler-grants-documentation-automation --skill rule-frontend-services
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rule-frontend-services
Source: https://github.com/btabaska/simpler-grants-documentation-automation/tree/main/.claude/skills/rule-frontend-services
Command: npx skills add https://github.com/btabaska/simpler-grants-documentation-automation --skill rule-frontend-services

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Frontend developers often diverge in API integration approaches; this skill defines and enforces a standardized set of patterns for building, securing, and validating frontend fetch logic.

Core Features & Use Cases

  • Centralized Fetch Patterns: Always use standardized endpoint configs and requester wrappers to ensure consistency across API calls.
  • Server-only directives and client fetchers: Enforce correct separation between server-side and client-side code with explicit guards and hooks.
  • Type-safe envelopes and validation: Use a consistent { data: T } response pattern, TypeScript types, and Zod schemas for server actions.
  • Security and auth guardrails: Use getSession, X-SGG-Token headers, and AuthenticationGate/AuthorizationGate to protect resources.
  • Quick-start real-world scenario: When adding a new frontend API integration, follow these conventions to minimize rework.

Quick Start

Implement new frontend API integrations following the centralized fetch patterns and guardrails described in this guide.

Frequently Asked Questions about rule-frontend-services

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

FAQPage Schema
How do I standardize frontend API fetch patterns and error handling?

Standardize frontend API fetch patterns by enforcing centralized endpoint configs, requester wrappers, and structured error handling to ensure consistency across all frontend service integrations. This approach minimizes divergent fetch logic across developers.

What is the best way to validate server actions with Zod in a frontend service?

Validate server actions with Zod by applying consistent typed envelopes using a { data: T } response pattern alongside TypeScript types. This ensures type-safe schemas for frontend API integration and structured data validation.

How do I enforce server-only directives and client fetch hooks for API calls?

Enforce server-only directives and client fetch hooks by applying explicit guards to separate server-side code from client-side fetch logic. This ensures correct execution boundaries for frontend API integration.

How do I implement auth guardrails and session management for frontend API calls?

Implement auth guardrails for frontend API calls by using getSession, X-SGG-Token headers, and AuthenticationGate or AuthorizationGate components. This protects resources and manages session security across feature-gated pages.

Why do frontend developers diverge in API integration approaches?

Frontend developers diverge in API integration approaches due to a lack of standardized fetch patterns, typed envelopes, and security guardrails. Applying consistent conventions for building and validating fetch logic minimizes this rework.