discourse-service-authoring

Guide multi-phase creation and refinement of Discourse service objects with RSpec testing.

Updated Mar 10, 2026
One-click install
npx skills add https://github.com/DFarynski99/discourse --skill discourse-service-authoring
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: discourse-service-authoring
Source: https://github.com/DFarynski99/discourse/tree/main/.skills/discourse-service-authoring
Command: npx skills add https://github.com/DFarynski99/discourse --skill discourse-service-authoring

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides a rigorous, phased approach to developing and refining Discourse service objects, ensuring adherence to best practices in Ruby, SOLID principles, and Discourse's specific architectural patterns.

Core Features & Use Cases

  • Structured Development: Guides users through distinct phases: Understanding, Assessment, Implementation, Quality Check, Business Logic Review, Security Review, and Specs.
  • Quality Assurance: Enforces strict checklists and audit loops for service quality, business logic correctness, and security.
  • Best Practices: Promotes idiomatic Ruby, SOLID principles, and Discourse-specific conventions for service object design.
  • Use Case: A senior engineer needs to refactor a complex controller action into a robust service object. This Skill ensures the new service is well-tested, secure, maintainable, and follows all Discourse development standards.

Quick Start

Use the discourse-service-authoring skill to refactor the update_post controller logic into a new service object, following all development phases and quality checks.

Frequently Asked Questions about discourse-service-authoring

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

FAQPage Schema
How do I write a Discourse service object that follows SOLID principles?

To write a Discourse service object following SOLID principles, use a structured, multi-phase development process covering assessment, implementation, quality checks, business logic review, security audits, and RSpec testing. This enforces idiomatic Ruby and Discourse-specific architectural patterns.

What is the best way to refactor a Discourse controller action into a service object?

Refactoring a Discourse controller action into a service object requires a phased approach: understanding the logic, assessing the scope, implementing the service, and running quality, business logic, and security reviews. This ensures the new service is maintainable, secure, and well-tested.

How do I add RSpec tests and security checks to a Ruby service object?

Adding RSpec tests and security checks to a Ruby service object involves dedicated testing and security audit phases. These phases enforce strict checklists to verify business logic correctness and security vulnerabilities, ensuring the service meets Discourse development standards.

Can I use this structured development process for any Ruby service object, or is it Discourse-specific?

This structured development process is Discourse-specific, tailored to Discourse service objects and architectural patterns. While it promotes SOLID principles and idiomatic Ruby generally, the checklists, audits, and conventions are designed for the Discourse platform.

Why does my Discourse service object fail code quality checks during refactoring?

Discourse service objects fail code quality checks during refactoring when they do not adhere to strict quality assurance checklists or SOLID principles. A multi-phase review process covering business logic, security, and idiomatic Ruby ensures the service passes these standards.