Curated library of atomic skills and personas for Hanami, dry-rb, and ROM Ruby development. Covers actions, slices, repositories, relations, changesets, providers, DI, operations, TDD, CLI, views, routing, validation, and 10 orchestration personas. Shared Ruby process skills have moved to ruby-core-skills. Uses Markdown + Front-matter architecture.
95
95%
Does it follow best practices?
Impact
96%
1.20xAverage score across 45 eval scenarios
Passed
No known issues
Use this workflow when creating an API-only Slice in Hanami 2.x.
Core principle: API slices are self-contained. They have their own routes, actions, and dependencies, but share the app's database and settings.
Note: Each step in this workflow delegates to a separate installed skill (
create-slice,create-action,define-routes,write-request-spec,review-code). These must be available in your skill set.
[Create Slice] — Load skill: create-slice
hanami generate slice apiconfig/app.rb: slice :api, at: "/api"slices/api/config/routes.rbbundle exec hanami routes — confirm /api prefix appears[Define Actions] — Load skill: create-action
slices/api/actions/build-json-api for serializationvalidate-params for input validationhandle-errors for error responsesbundle exec hanami routes lists expected action mappings[Configure Routes] — Load skill: define-routes
slices/api/config/routes.rbresources for standard CRUDbundle exec hanami routes shows full resource routes[Write Tests] — Load skill: write-request-spec
bundle exec rspec spec/requests/ — all tests green[Review] — Load skill: review-code
This is the canonical pattern for a JSON API action in a Hanami 2.x slice:
# slices/api/actions/users/index.rb
module Api
module Actions
module Users
class Index < Api::Action
include Deps[repo: "repositories.user_repo"]
def handle(request, response)
response.format = :json
users = repo.all
response.body = JSON.generate(users.map(&:to_h))
end
end
end
end
endKey points:
response.format = :jsonto_h — never ad-hoc hashesDeps[] rather than hard-codingdef handle(request, response)
halt 422, JSON.generate(errors: ["name is required"]) unless request.params[:name]
# proceed with validated params
enddef handle(request, response)
response.format = :json
user = repo.find(request.params[:id])
halt 404, JSON.generate(error: "not found") unless user
response.body = JSON.generate(user.to_h)
endUse consistent { error: "message" } or { errors: [...] } shapes across all endpoints.
.tessl-plugin
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
scenario-36
scenario-37
scenario-38
scenario-39
scenario-40
scenario-41
scenario-42
scenario-43
scenario-44
scenario-45
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
personas
providers
configure-providers
implement-di
review-security
routing
define-routes
slices
configure-slice
create-slice
extract-slice
review-slice-boundaries
test-slice