CtrlK
BlogDocsLog inGet started
Tessl Logo

igmarin/ruby-core-skills

Curated library of 16 public Ruby AI agent skills: 10 atomic skills (YARD docs, service objects, calculator pattern, API clients, DDD, bug triage, code review, skill routing), 5 process-discipline skills (TDD, refactoring, review, security, test planning), and 1 planning skill (TDD task generation). Zero agents — this is a foundational library consumed by framework-specific tiles like rails-agent-skills and hanakai-yaku.

95

1.05x
Quality

96%

Does it follow best practices?

Impact

95%

1.05x

Average score across 16 eval scenarios

SecuritybySnyk

Passed

No known issues

Overview
Quality
Evals
Security
Files

IMPLEMENTATION.mdskills/patterns/implement-calculator-pattern/

Implementation Reference

BaseService

# frozen_string_literal: true

module PricingCalculator
  class BaseService
    def initialize(order)
      @order = order
    end

    def calculate
      return nil unless should_calculate?
      compute_result(@order.base_price)
    end

    private

    def should_calculate? = @order.present? && @order.plan&.active?

    def compute_result(_price)
      raise NotImplementedError, "#{self.class}#compute_result must be implemented"
    end
  end
end

NullService

# frozen_string_literal: true

module PricingCalculator
  class NullService < BaseService
    private

    def should_calculate? = false
    def compute_result(_price) = nil
  end
end

Concrete Service Example

# frozen_string_literal: true

module PricingCalculator
  class StandardPricingService < BaseService
    DISCOUNT = 0.10

    private

    def should_calculate?
      super && @order.plan.name == 'standard'
    end

    def compute_result(base_price)
      base_price * (1 - DISCOUNT)
    end
  end
end

skills

README.md

tile.json