add-api

Add Cloudflare Workers API endpoints and frontend service wrappers.

Updated Jan 8, 2026
One-click install
npx skills add https://github.com/zxj719/ai_wolf_game --skill add-api-zxj719
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-api
Source: https://github.com/zxj719/ai_wolf_game/tree/main/.agents/skills/add-api
Command: npx skills add https://github.com/zxj719/ai_wolf_game --skill add-api-zxj719

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill streamlines the process of adding new API endpoints to a Cloudflare Workers backend and ensuring consistent integration with the frontend.

Core Features & Use Cases

  • Backend API Extension: Add new handlers and routes to workers/auth/*.
  • Frontend Integration: Encapsulate new API calls within src/services/authService.js.
  • Consistent Error Handling & Auth: Reuses existing middleware and response formatting for seamless integration.
  • Use Case: When developing a new feature that requires a new backend API, this Skill guides you through the necessary steps on both the backend (Cloudflare Workers) and frontend (service layer) to implement it efficiently and maintainably.

Quick Start

Use the add-api skill to add a new API endpoint for user profile updates.

Frequently Asked Questions about add-api

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

FAQPage Schema
How do I add new API endpoints to Cloudflare Workers and connect them to my frontend?

To add new API endpoints to Cloudflare Workers and connect them to your frontend, you create backend routes and handlers in `workers/auth/` and wrap the frontend service calls in `src/services/authService.js`. This ensures full-stack integration for new features.

What is the best way to maintain consistent error handling when extending a Cloudflare Workers API?

The best way to maintain consistent error handling when extending a Cloudflare Workers API is to reuse the existing authentication middleware and standardized response formatting across all newly added handlers and routes.

Do I need to manually update the frontend service layer when creating a new backend API route?

Yes, you need to update the frontend service layer when creating a new backend API route by adding corresponding API call wrappers inside `src/services/authService.js` to ensure the frontend can communicate with the new endpoint.

How does authentication middleware application work for new API integrations in this setup?

Authentication middleware applies to new API integrations by enforcing existing authentication checks and response standards across the newly added backend route handlers in the `workers/auth/` directory.

Can I use this approach to add a user profile update API for a Cloudflare Workers backend?

Yes, you can use this approach to add a user profile update API by implementing the new backend handler in `workers/auth/` and exposing it through the frontend via `src/services/authService.js`.

What are the limitations of using a service layer wrapper for frontend backend integration?

A limitation of using a service layer wrapper for frontend backend integration is that all new API calls must conform to the existing `src/services/authService.js` structure and the established Cloudflare Workers middleware patterns, restricting unconventional endpoint designs.