debugging-operations

Diagnose runtime and integration issues across Express API and Web services.

Updated Feb 25, 2026
One-click install
npx skills add https://github.com/werlang/event-hub --skill debugging-operations-werlang
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: debugging-operations
Source: https://github.com/werlang/event-hub/tree/main/.agents/skills/debugging-operations
Command: npx skills add https://github.com/werlang/event-hub --skill debugging-operations-werlang

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When the Academic Events platform misbehaves—services failing to boot, broken auth or event flows, unexpected API responses, or unstable Docker development behavior—this Skill provides a structured diagnostic playbook instead of ad-hoc guesswork. ## Core Features & Use Cases - Service Health Checks: Inspect Docker Compose containers, tail API and Web logs, and probe readiness and event endpoints with curl. - Auth and Event Flow Debugging: Step-by-step curl sequences for register, login, token validation, event creation, updates, moderation, and filtering. - Failure Point Reference: A catalog of common failures such as missing JWT_SECRET, missing Bearer prefix, invalid date payloads, and stale frontend assets, plus API envelope shape verification. - Use Case: The API returns 401 on every protected call. Follow the auth flow debugging steps to confirm token issuance, verify the Authorization header format, and check that JWT_SECRET is set in the environment. ## Quick Start Ask the agent to diagnose why the API login flow is failing in the local Docker development environment.

Frequently Asked Questions about debugging-operations

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

FAQPage Schema
How do I debug an Express API that fails to start in Docker Compose?▼

Check container status with docker compose -f compose.dev.yaml ps, then inspect logs with docker compose -f compose.dev.yaml logs --tail=100 api. A missing JWT_SECRET environment variable prevents the API from starting at import time.

How do I test JWT authentication endpoints with curl?▼

Register via POST /auth/register, log in via POST /auth/login to receive a token, then call GET /auth/me with the header Authorization: Bearer <token>. Omitting the Bearer prefix returns a 401 envelope error.

Why does the API return 401 on protected endpoints?▼

Protected endpoints return 401 when the Authorization header is missing or lacks the Bearer prefix. Verify the token was obtained from /auth/login and passed exactly as Authorization: Bearer <token>.

Why does creating an event return a 400 error?▼

POST /events returns 400 when the date payload is invalid. Send an ISO 8601 timestamp such as 2026-03-10T19:00:00.000Z along with title and description in the JSON body.

What does the Academic Events API response envelope look like?▼

Success responses use { error: false, status, data, message? } and errors use { error: true, status, type, message, data? }. If the shape diverges, inspect sendSuccess and sendCreated helper usage and next(error) forwarding in the routes.

Why does the frontend send PATCH requests that the API rejects?▼

The API intentionally supports only GET, POST, PUT, and DELETE. A PATCH request indicates stale client code or stale built assets, so rebuild the Web bundle and verify the frontend helper modules.