backend

Guides server-side development across Go, Django, FastAPI, and Laravel codebases with estate-specific conventions.

Updated Sep 1, 2026
One-click install
npx skills add https://github.com/Harbour-Emerge/skills --skill backend-harbour-emerge
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: backend
Source: https://github.com/Harbour-Emerge/skills/tree/main/backend
Command: npx skills add https://github.com/Harbour-Emerge/skills --skill backend-harbour-emerge

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Server-side work in this estate spans five very different stacks — a Go modular monolith, Django/DRF, two FastAPI services, a FastAPI+SQLite app, and Laravel — each with non-obvious conventions, known-unfixed bugs, and traps (silent test skips, spoofable client IPs, truthy string 'false' authorization flags) that cost real time to rediscover. ## Core Features & Use Cases - Per-stack conventions: Documents routing, migrations, session cookie rules, rate limiting, and testing practices for the Go Survey-Forms backend, Exam Studio services, CleverClass, and phd-monitoring. - Known-trap documentation: Records live issues like the retrieval engine's silent HashingEmbedder fallback, the lms-tutor X-Forwarded-For bug, and Laravel's broken can_* guards, so they are not reintroduced or misread. - Use Case: When adding an API endpoint to the Go backend, follow the documented stdlib ServeMux routing, goose migration workflow, and session cookie rules instead of introducing a router dependency or breaking the SameSite policy. ## Quick Start Ask the assistant to apply the backend skill conventions when writing or modifying an API handler, migration, or background job in any of these repositories.

Frequently Asked Questions about backend

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

FAQPage Schema
How do I add an API route to a Go service using stdlib net/http?

Use Go 1.22+ pattern routing with http.NewServeMux, as the Survey-Forms backend does with three separate muxes for server, public API, and admin. Do not introduce a router dependency like chi or gin; the public/admin mux split is the intended structure.

How should database migrations be run in a Go and goose setup?

Run goose migrations as a separate deploy step, never from a container entrypoint, using the migrate binary via docker compose run. Keep the zero-padded numbered SQL sequence in the migrations directory.

Why do Go database tests pass without a database connection?

Database-backed tests skip silently when TEST_DATABASE_URL is unset, producing a green run that proves nothing. The CI pipeline greps for the skip message and fails the build, so always set TEST_DATABASE_URL to actually run them.

How do I parse X-Forwarded-For client IPs correctly behind proxies?

Parse forwarding headers right-to-left, trusting a hop only if the direct peer is in TRUSTED_PROXIES, and stop at unparseable entries. Taking the first X-Forwarded-For value unconditionally is spoofable and is a known live bug in this estate.

Why does a FastAPI retrieval service return 200 while degraded?

A missing embedding model cache makes the service fall back to a HashingEmbedder and keep serving 200 OK. Use the /health/providers endpoint with strict=true, which returns 503 when degraded, as a deploy smoke-test gate.

Why do Laravel authorization checks with can_* columns never fire?

The can_* columns are enum('true','false') strings, and the string 'false' is truthy in PHP, so negating the flag never triggers. Real policy uses string comparisons on current_role; never convert these to truthiness checks.