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 skill when defining routes in Hanami 2.x.
Core principle: Routes map URLs to Actions. They are explicit, readable, and RESTful.
Define routes in config/routes.rb:
# config/routes.rb
module MyApp
class Routes < Hanami::Routes
root to: "home.index"
get "/users", to: "users.index"
get "/users/:id", to: "users.show"
post "/users", to: "users.create"
patch "/users/:id", to: "users.update"
delete "/users/:id", to: "users.destroy"
end
endUse resources for RESTful routes:
resources :users do
resources :posts
endGenerates:
GET /users → users.indexGET /users/:id → users.showPOST /users → users.createPATCH /users/:id → users.updateDELETE /users/:id → users.destroyUse resource for singular resources (no index):
resource :profileName routes for URL generation:
get "/users", to: "users.index", as: :users
get "/users/:id", to: "users.show", as: :userAccess in Views or Actions:
routes.path(:user, id: 1) # => "/users/1"
routes.url(:users) # => "http://example.com/users"Scope routes for versioning or grouping:
scope "api" do
scope "v1" do
resources :users
end
endMount slices at paths:
slice :api, at: "/api" do
resources :users
endOrder matters: Hanami matches routes top-to-bottom. Put specific routes before general ones (wildcards):
# CORRECT: specific first
get "/users/new", to: "users.new"
get "/users/:id", to: "users.show"After defining routes, inspect all registered routes with the Hanami CLI:
bundle exec hanami routesThis lists every route with its HTTP method, path, and action target. Use it to confirm routes are correctly registered before running tests or the server.
Common pitfalls:
to: identifier.get "/users/:id") appears before a specific one (e.g. get "/users/new"), the specific route will never be reached — always check ordering with hanami routes.config/routes.rb can cause stale routing behaviour.| Related Skill | When to chain |
|---|---|
| create-action | Routes point to Actions. Define routes after Actions exist. |
| create-slice | Slices can define their own routes. Understand slices before nesting routes. |
| write-request-spec (testing) | Test routes by making requests to them. |
.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