Curated library of atomic AI agent skills for Hanami, dry-rb, and ROM Ruby development. Covers actions, slices, repositories, relations, changesets, providers, DI, operations, TDD, CLI, views, routing, and validation. Shared Ruby process skills have moved to ruby-core-skills. Uses Markdown + Front-matter architecture.
92
94%
Does it follow best practices?
Impact
92%
1.33xAverage score across 35 eval scenarios
Passed
No known issues
Test a slice in isolation — verify its behavior without loading the full app.
Write test → Run test → Verify it FAILS → Implement → Verify it PASSES
DO NOT test private methods or internal slice structure.
DO NOT load another slice in a slice's isolated test. Mock cross-slice calls.Pattern reference: See SLICE_TEST_PATTERNS.md for slice-isolated test helpers, database strategies, action/operation/integration spec patterns, and cross-slice mocking.
# spec/slices/api/slice_helper.rb
require "hanami/rspec"
RSpec.configure do |config|
config.before(:suite) do
Hanami.app.prepare(:api) # load only the :api slice
end
endbundle exec rspec spec/slices/api/ --dry-run
# Expect: 0 errors, all examples collected. Fix any boot errors before proceeding.RSpec.describe Api::Actions::Users::Create, :slice do
let(:create_user) { instance_double(Users::CreateUser) }
let(:action) { described_class.new(create_user:) }
endRSpec.describe Api::Operations::Users::Create, :slice do
let(:repo) { instance_double(Api::Repositories::UserRepo) }
subject(:operation) { described_class.new(user_repo: repo) }
it "creates a user and returns a success result" do
allow(repo).to receive(:create).and_return(double(id: 42, email: "a@example.com"))
result = operation.call(email: "a@example.com", name: "Alice")
expect(result).to be_success
end
endDatabaseCleaner (or equivalent) configured in spec/support/database.rb:
RSpec.describe Api::Repositories::UserRepo, :slice, :db do
subject(:repo) { described_class.new }
it "finds a user by email" do
repo.create(email: "b@example.com", name: "Bob")
user = repo.find_by_email("b@example.com")
expect(user.email).to eq("b@example.com")
end
endRSpec.describe "Api users flow", :slice, :db do
it "creates and retrieves a user" do
result = Api::Actions::Users::Create.new.call(params: { email: "c@example.com", name: "Carol" })
expect(result[:status]).to eq(201)
end
end# Never: Api::Repositories::UserRepo.new.find(id) from another slice
# Prefer: stub the public action
let(:users_api) { instance_double(Api::Actions::Users::Show) }
before { allow(users_api).to receive(:call).and_return({ status: 200, user: { id: 1 } }) }
# Or: extract shared test helpers to spec/support/slices/api_helpers.rb
# and include them in both slices' specs.| Skill | When to chain |
|---|---|
| create-slice | Test immediately after creating a new slice |
| plan-tests | Plan the test strategy before writing slice specs |
| slice-lifecycle | Part of the slice development lifecycle agent |
docs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10
scenario-11
scenario-12
scenario-13
scenario-14
scenario-15
scenario-16
scenario-17
scenario-18
scenario-19
scenario-20
scenario-21
scenario-22
scenario-23
scenario-24
scenario-25
scenario-26
scenario-27
scenario-28
scenario-29
scenario-30
scenario-31
scenario-32
scenario-33
scenario-34
scenario-35
skills
actions
build-json-api
create-action
handle-errors
validate-params
context
load-context
db
create-changeset
create-repository
define-relation
write-migration
dry-monads
handle-result-pattern
dry-rb
create-operation
create-validation-contract
providers
configure-providers
implement-di
review-security
routing
define-routes
slices
configure-slice
create-slice
extract-slice
review-slice-boundaries
test-slice