debug-api

Diagnose Laravel API errors using authenticated curl calls, logs, tinker, and queue inspection.

Updated May 5, 2025
One-click install
npx skills add https://github.com/sebauvray/toollab-api --skill debug-api-sebauvray
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: debug-api
Source: https://github.com/sebauvray/toollab-api/tree/main/.claude/skills/debug-api
Command: npx skills add https://github.com/sebauvray/toollab-api --skill debug-api-sebauvray

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When an endpoint of the Toollab Laravel API returns an unexpected 400, 403, 404, 409, or 500, this Skill provides a systematic diagnostic method instead of guesswork: authenticated curl calls with the required context headers, log inspection, tinker workarounds for global scopes, and a symptom-to-cause lookup table. ## Core Features & Use Cases - Authenticated request templates: Ready-to-use curl commands with Bearer token login and the mandatory X-School-Id / X-School-Year-Id context headers, plus POST and file-download variants. - Log and silent-failure analysis: Commands for Laravel, nginx, and Nuxt logs, with a map of which controllers log errors and which 31 catch blocks swallow exceptions silently. - Tinker global scope trap: Explains why queries return zero rows outside HTTP (fail-closed BelongsToSchoolScope) and how to set the school context manually. - Symptom-to-cause table: Maps each HTTP error response to its most probable cause, from missing headers to cross-tenant resources and closed school years. - Use Case: An endpoint returns 404 Ressource introuvable even though the record exists — the table points to route model binding with global scopes, meaning the resource belongs to another school or school year. ## Quick Start Ask the assistant to debug why a specific Toollab API endpoint returns an unexpected error, providing the endpoint and the response received.

Frequently Asked Questions about debug-api

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

FAQPage Schema
What does a 404 mean on a Laravel route with route model binding?▼

With global scopes active, route model binding cannot resolve a resource belonging to another school or school year, producing a 404 rather than a 403. Verify the X-School-Id and X-School-Year-Id headers match the resource's ownership.