discourse-service-authoring

Define, edit, and validate Discourse service objects with Service::Base.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/casperamy/dev-flow-demo --skill discourse-service-authoring-casperamy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: discourse-service-authoring
Source: https://github.com/casperamy/dev-flow-demo/tree/main/documents/github_repos/public_snapshots/discourse__discourse__main/.skills/discourse-service-authoring
Command: npx skills add https://github.com/casperamy/dev-flow-demo --skill discourse-service-authoring-casperamy

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps teams create, edit, and review Discourse service objects that include Service::Base, covering contracts, models, policies, steps, transactions, controller integration, and service specs to ensure maintainable, scalable code.

Core Features & Use Cases

  • Create, edit, and review Discourse service objects that include Service::Base
  • Covers contracts, models, policies, steps, transactions, controller integration, and service specs
  • Emphasizes SOLID principles, idiomatic Ruby, and reference guidance from service object documentation

Quick Start

Define a new Discourse service object following the Service::Base guidelines

Frequently Asked Questions about discourse-service-authoring

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

FAQPage Schema
How do I build Discourse service objects with Service::Base?

Discourse service objects using Service::Base are built by defining contracts, models, policies, steps, and transactions. This approach ensures code maintainability and scalability by adhering to SOLID principles and idiomatic Ruby.

What are contracts and policies in Discourse service objects?

Contracts and policies in Discourse service objects validate inputs and enforce business rules before executing steps. They encapsulate validation logic within Service::Base, ensuring robust controller integration and clean, testable service specs.

How do I write service specs for Discourse Service::Base classes?

Service specs for Discourse Service::Base classes validate contracts, policies, and transaction steps. Writing these specs involves testing the service object's integration points and ensuring the execution flow aligns with idiomatic Ruby practices.

When should I use service objects in Rails applications like Discourse?

Service objects in Rails applications like Discourse should be used when complex business logic needs isolation from controllers. Using Service::Base with contracts, policies, and transactions ensures the logic remains maintainable, testable, and aligned with SOLID principles.

Can I integrate Discourse service objects directly with controllers?

Discourse service objects using Service::Base integrate directly with controllers. This integration moves complex business logic out of the controller layer, relying on defined steps and transactions to process requests while maintaining clean architecture.

What is the best way to audit existing Discourse service objects for SOLID compliance?

Auditing Discourse service objects for SOLID compliance involves reviewing contracts, models, policies, and steps within Service::Base implementations. This validation process checks alignment with idiomatic Ruby and ensures the service object remains maintainable.