.agent/skills/webstatus-backend/SKILL.md
Use when creating or modifying Go backend API endpoints, modifying Spanner database schemas, or working with OpenAPI and Spanner mappers.
npx skillsauth add googlechrome/webstatus.dev webstatus-backendInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill provides guidance for developing the Go-based backend API for webstatus.dev.
backend/pkg/httpserver): Handles routing and requests via oapi-codegen stubs.lib/gcpspanner/spanneradapters): Translates API types to database types.lib/gcpspanner): Core logic for Spanner interactions using the Mapper pattern.lib/valkeycache): Isolated via Private Service Connect (PSC) for secure internal access.For a technical deep-dive into the backend implementation patterns, request flows, and auth middleware, see references/architecture.md.
lib/, util/, and the OptionallySet pattern.We use a Hexagonal-style Adapter Pattern to decouple application logic from infrastructure.
pkg/sender).lib/ (e.g., lib/gcpspanner/spanneradapters or lib/valkeycache).spanneradapters for DB interactions in the API.gcpspanner.Client directly from httpserver handlers.row.ToStruct(&yourStruct) instead of manual column scanning.lib/gcpspanner.lib/workertypes for any data crossing service boundaries (e.g. results sent to Pub/Sub).testcontainers-go for any changes to the lib/gcpspanner layer.backend/pkg/httpserver/cache.go.lib/backendtypes into lib/gcpspanner (prevents circular dependencies).gcpspanner client.Merge functions in mappers copy ALL fields, including UpdatedAt....WithTransaction variants of helpers when inside a ReadWriteTransaction.eventPublisher.PublishSearchConfigurationChanged in handlers that modify user saved searches to trigger immediate notification dispatcher updates.make precommit to execute the full suite of Go tests, formatting, and linting.make go-lint to lint all Go code using golangci-lint.go.work), to run tests quickly for a single package without running the whole suite, execute go test from within the specific module directory, or provide the full module path:
cd backend && go test -v ./pkg/...
# Or
go test -v github.com/GoogleChrome/webstatus.dev/lib/gcpspanner/...
lib/gcpspanner MUST include integration tests using testcontainers-go against the Spanner emulator.When making significant architectural changes, adding new major endpoints, or altering the database schema:
GEMINI.md to ensure I am aware of the changes.docs/ARCHITECTURE.md if the system boundaries change.development
Use when working with the webstatus notification pipeline, event producer, push delivery, or push workers (e.g., Email, Webhooks), and Pub/Sub subscribers.
development
Use when modifying the ANTLR search grammar, adding new search terms, or working with the query parser and builder.
development
How to commit code and create a Pull Request
tools
Use when upgrading toolchain versions (Go, Node.js, Terraform, Playwright) or updating the DevContainer and Github CI configurations.