service-guide

Implement Backend.AI service layers with CRUD actions and persistent repositories.

662|179|Updated Oct 6, 2016
One-click install
npx skills add https://github.com/lablup/backend.ai --skill service-guide
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: service-guide
Source: https://github.com/lablup/backend.ai/tree/main/.claude/skills/service-guide
Command: npx skills add https://github.com/lablup/backend.ai --skill service-guide

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a blueprint for building a consistent, testable Backend.AI service layer, standardizing CRUD-like operations, Actions, Processors, and repository interactions to reduce boilerplate and improve maintainability.

Core Features & Use Cases

  • Standard Operations: create, get, search, update, delete, purge, plus batch variants.
  • Action-Result and Processor Integration: define immutable actions, action results, and orchestrating processors for reliable workflows.
  • API Alignment: clear patterns for service methods, repository calls, and testability to simplify REST/GraphQL integration.

Quick Start

To begin, review existing domain services under services/ to align with the patterns, scaffold a new domain following the directory layout (types, actions, service, processors), implement repository-backed methods, write unit tests that mock repositories, and wire the service into the API layer.

Frequently Asked Questions about service-guide

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

FAQPage Schema
How do I implement a Backend.AI service layer with standard CRUD operations?

To implement a Backend.AI service layer, you scaffold a new domain following the directory layout for types, actions, service, and processors, then implement repository-backed methods for standard operations like create, get, search, update, delete, and purge.

What is the single-repository-call pattern in Backend.AI service layers?

The single-repository-call pattern enforces that each service method makes exactly one repository call, ensuring immutable action objects and testable service implementations that integrate reliably with REST and GraphQL APIs.

How do Actions, ActionResults, and Processors orchestrate workflows in Backend.AI?

Actions are immutable objects that define operations, ActionResults capture their outcomes, and Processors orchestrate these workflows by coordinating repository interactions to execute reliable domain service logic.

How do I write unit tests for Backend.AI service layers?

Write unit tests that mock repositories to verify service layer implementations in isolation, ensuring the standard CRUD-like actions and processor workflows function correctly without direct database dependencies.

Can I integrate Backend.AI service layers with both REST and GraphQL APIs?

Yes, Backend.AI service layers use clear patterns for service methods and repository calls designed specifically to simplify and align with REST and GraphQL API integration.

What is the best way to structure a new Backend.AI domain service?

Structure a new Backend.AI domain service by reviewing existing services under the services/ directory, then scaffold the directory layout to include types, actions, service, and processors before wiring it into the API layer.