game-backend-api-design

Define server-authoritative REST and real-time API contracts for a multiplayer hacking game.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/caicedov/netwatch --skill game-backend-api-design
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: game-backend-api-design
Source: https://github.com/caicedov/netwatch/tree/main/.github/skills/game-backend-api-design
Command: npx skills add https://github.com/caicedov/netwatch --skill game-backend-api-design

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes assets (resource) and references (resource) components.

What problem does it solve?

This skill provides a principled framework for designing server-authoritative REST and real-time API contracts for a multiplayer hacking game, preventing client-side state manipulation and ensuring deterministic outcomes.

Core Features & Use Cases

  • Defines command and event schemas for client-to-server and server-to-client communications.
  • Establishes REST for bootstrap and non-real-time operations, and a primary real-time channel for gameplay commands and events.
  • Use cases include designing START_HACK commands, HACK_PROGRESS events, and validation/error handling rules across backend and frontend.

Quick Start

To start applying this skill, draft your initial API-contract documents and a first pass of WebSocket command/events in your project docs.

Frequently Asked Questions about game-backend-api-design

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

FAQPage Schema
How do I design server-authoritative APIs for a multiplayer game?

Server-authoritative APIs prevent client-side state manipulation by defining REST and real-time WebSocket contracts for deterministic gameplay commands, events, and state flows. This ensures the server validates all client actions and controls game outcomes.

When should I use REST versus WebSocket for real-time game backend design?

Use REST for bootstrap and non-real-time operations, and WebSockets for primary real-time gameplay commands and events. This separation ensures reliable initial state loading while maintaining low-latency, server-authoritative communication during active hacking sequences.

How do I structure command and event schemas for server-authoritative game APIs?

Structure command and event schemas by defining client-to-server and server-to-client communication contracts. Codify validation rules, error handling, and deterministic state flows for commands like START_HACK and events like HACK_PROGRESS to guide backend and frontend implementation.

What is the best way to prevent client-side state manipulation in multiplayer hacking games?

The best way to prevent client-side state manipulation is enforcing server-authoritative API contracts. By establishing deterministic state flows and strict validation rules, the server validates all gameplay commands before applying state changes, preventing unauthorized modifications.

Does server-authoritative API design work with both REST and real-time WebSocket channels?

Yes, server-authoritative design works by combining REST for bootstrap operations and WebSocket for real-time gameplay. This dual-channel approach covers both non-real-time setup and deterministic, real-time command and event processing for multiplayer interactions.

How do I handle validation and error handling in real-time game API contracts?

Handle validation and error handling by codifying strict contract schemas and security rules within your API documentation. Define deterministic error responses for invalid WebSocket commands and REST requests to ensure consistent behavior across backend and frontend systems.