service-builder

Build interface-agnostic services with injected dependencies for applications.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/darraghh1/my-claude-setup --skill service-builder
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: service-builder
Source: https://github.com/darraghh1/my-claude-setup/tree/main/.claude/skills/service-builder
Command: npx skills add https://github.com/darraghh1/my-claude-setup --skill service-builder

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you build pure, interface-agnostic services with injected dependencies, making your business logic reusable and easy to test across different parts of your application.

Core Features & Use Cases

  • Dependency Injection: Services receive all their dependencies through the constructor, promoting testability.
  • Interface Decoupling: Services are unaware of their callers (e.g., server actions, MCP tools), allowing them to be used anywhere.
  • Use Case: Create a ProjectService that handles all project-related database operations. This service can then be called from a Next.js server action, an API route, or an MCP tool without modification.

Quick Start

Use the service-builder skill to create a new service for managing user profiles.

Frequently Asked Questions about service-builder

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

FAQPage Schema
How do I decouple business logic from Next.js server actions?

To decouple business logic from Next.js server actions, build pure services with injected dependencies. This approach separates logic from callers, allowing the same service to be used across server actions, API routes, or tools without modification.

What is dependency injection in TypeScript services?

Dependency injection in TypeScript services means receiving all required dependencies through the constructor. This pattern promotes testability by ensuring business logic and data access layers remain pure and decoupled from their callers.

How do I create a testable CRUD service in TypeScript?

Create a testable CRUD service in TypeScript by building a pure service with injected dependencies. This decouples database operations from the caller, making the service reusable and easy to test across different application parts.

Can I use the same service for API routes and MCP tools?

Yes, you can use the same service for API routes and MCP tools. By building interface-agnostic services with injected dependencies, the service remains unaware of its callers, allowing it to be used anywhere without modification.

What is the best way to structure a data access layer in TypeScript?

The best way to structure a data access layer in TypeScript is to build pure, interface-agnostic services with injected dependencies. This decouples the data access layer from callers, facilitating reusable and testable business logic.