oma-backend

Implement secure REST/GraphQL backend APIs with repository-service-router architecture.

46|2|Updated Mar 23, 2025
One-click install
npx skills add https://github.com/gracefullight/krds --skill oma-backend-gracefullight
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: oma-backend
Source: https://github.com/gracefullight/krds/tree/main/.agents/skills/oma-backend
Command: npx skills add https://github.com/gracefullight/krds --skill oma-backend-gracefullight

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The oma-backend skill helps you implement backend endpoints and server-side logic without mixing responsibilities, while keeping database changes, authentication, and verification aligned with clean-architecture boundaries.

Core Features & Use Cases

  • Clean architecture backend changes: routes stay thin, business logic lives in services, and data access is isolated in repositories.
  • API + authentication + persistence workflow: implement or review REST/GraphQL endpoints, auth flows, validation, and database integration including migrations.
  • Safety and correctness guardrails: explicit validation, parameterized queries, explicit transaction boundaries, and ORM lifecycle/performance rules to prevent N+1 and concurrency hazards.
  • Verification-first delivery: run the project’s lint/typecheck/tests and migration checks (prefer stack/stack.yaml verify commands when available).

Quick Start

Use oma-backend to “Add JWT-protected CRUD endpoints for a new resource, including request/response validation, database tables with migrations, and service/repository implementations, then verify with the project’s checklist and test suite.”

Frequently Asked Questions about oma-backend

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

FAQPage Schema
How do I structure backend API code to separate business logic from data access?

Structure backend API code using the repository-service-router pattern to isolate data access in repositories, keep routes thin, and place business logic in services. This enforces clean architecture boundaries and prevents mixed responsibilities.

How do I implement JWT-protected CRUD endpoints with database migrations?

Implement JWT-protected CRUD endpoints by adding request and response validation, creating database tables with migrations, and building service and repository layers. Verify the complete workflow using the project's lint, typecheck, and test checklist.

What is the best way to prevent ORM N+1 query issues during backend development?

Prevent ORM N+1 query issues by enforcing correct relation loading and lifecycle handling. Explicit transaction boundaries and ORM performance rules isolate data access safely to avoid concurrency hazards and inefficient queries.

How do I ensure database persistence is safe when building REST or GraphQL endpoints?

Ensure safe database persistence by requiring explicit input validation and using safe parameterized queries. Explicit transaction boundaries must be defined to maintain data integrity during endpoint operations.

Does this backend approach support both REST and GraphQL API development?

Yes, this backend approach supports both REST and GraphQL endpoints. It applies clean architecture boundaries to API development, authentication flows, and database integration uniformly across different endpoint protocols.

Why do I need explicit transaction boundaries for server-side business logic?

Explicit transaction boundaries are needed to prevent concurrency hazards and maintain data integrity during server-side business logic execution. They ensure database operations complete safely as atomic units within repository layers.