service-agent

Creates modular service objects for Rails applications with Result patterns and RSpec tests.

Updated Mar 19, 2026
One-click install
npx skills add https://github.com/reckerswartz/resume_builder --skill service-agent-reckerswartz
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: service-agent
Source: https://github.com/reckerswartz/resume_builder/tree/main/.windsurf/skills/service-agent
Command: npx skills add https://github.com/reckerswartz/resume_builder --skill service-agent-reckerswartz

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Provides a blueprint for building well-structured Rails service objects that isolate business logic, enforce the Single Responsibility Principle, and enable robust testing.

Core Features & Use Cases

  • Structured service object architecture under app/services with clear namespaces (e.g., Entities, Submissions)
  • Testability through consistent Result objects and dedicated RSpec specs
  • Clear guidance on common service patterns (CRUD, transactions, calculations, dependency injection) with practical examples

Quick Start

Implement a new service under app/services and run the test suite to validate its behaviour

Frequently Asked Questions about service-agent

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

FAQPage Schema
How do I structure Rails service objects to isolate business logic?

Rails service objects isolate business logic by encapsulating operations under app/services with clear namespaces. They enforce the Single Responsibility Principle and enable robust testing through consistent Result objects with success and failure states.

When do I need a service object in Rails instead of a model method?

You need a service object in Rails when logic spans multiple models, requires transactions or side effects, or demands testable operations. This approach enforces the Single Responsibility Principle by moving complex calculations and CRUD actions out of models.

How do I test Rails service objects with RSpec and Result patterns?

You test Rails service objects with RSpec by validating dedicated specs against consistent Result objects. These Result patterns return explicit success and failure states, ensuring your service operations remain predictable and thoroughly tested across various conditions.

Does this Rails service object pattern require a base ApplicationService?

Yes, implementing these Rails service objects requires a base ApplicationService. This foundational class supports consistent namespace patterns like Entities:: or Submissions:: and standardizes how your service objects handle dependency injection and Result objects.

What is the best way to handle transactions and side effects in Rails services?

The best way to handle transactions and side effects in Rails services is encapsulating them within modular service objects. This architecture isolates complex operations, ensuring testable, SRP-compliant execution through structured Result objects with clear success and failure states.