services

Official

Turn backend logic into reusable services.

Authorperimetre
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Decouple business logic from HTTP routes by organizing it into reusable, testable service modules that sit between routes/controllers and data sources.

Core Features & Use Cases

  • Define services with defineService to encapsulate domain logic and orchestration.
  • Support dependency injection via deps to compose services from data sources, APIs, and other services.
  • Return results as discriminated unions using an ok discriminator, allowing explicit success and error handling without throwing.
  • Keep routes thin by delegating business logic to services, enabling easy testing, reusability, and end-to-end workflows.

Quick Start

Define a new service using defineService, implement a getById method, and invoke it from a route to perform a business operation.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: services
Download link: https://github.com/perimetre/ai-toolkit/archive/main.zip#services

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.