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 a new Slice in Hanami 2.x.
1. Generate Slice — Load skill: create-slice
Run the generator and register the slice:
bundle exec hanami generate slice blog# config/app.rb
slice :blog, at: "/blog"Verify the slice boots: bundle exec hanami console — confirm Hanami.app[:slices] includes the new slice.
2. Configure Routes — Load skill: define-routes
Define RESTful routes in the slice:
# slices/blog/config/routes.rb
routes.namespace "/blog" do
resources :posts
endVerify routes are registered: bundle exec hanami routes — confirm expected paths appear under the slice namespace.
3. Configure Slice — Load skill: configure-slice
Define slice-specific settings, providers, and auto-registration:
# slices/blog/config/slice.rb
module Blog
class Slice < Hanami::Slice
# Slice-specific settings
setting :posts_per_page, default: 10
# Slice-specific provider
register_provider :cache do
start { register(:cache, MyCache.new) }
end
end
endVerify providers load without errors: bundle exec hanami console — call Blog::Slice[:cache] (or relevant key) to confirm resolution.
4. Setup DI — Load skill: inject-dependencies
Import required components from other slices and export what this slice provides:
# slices/blog/config/slice.rb
module Blog
class Slice < Hanami::Slice
# Import a component from the main app
import keys: ["persistence.db"], from: :app
# Export components for other slices
export keys: ["repositories.posts"]
end
endVerify cross-slice dependencies resolve:
# In hanami console
Blog::Slice["persistence.db"] # => must not raise
Hanami.app["blog.repositories.posts"] # => must not raise5. Write Tests — Load skill: write-request-spec
Write smoke tests confirming the slice mounts and routes respond:
# spec/requests/blog/posts_spec.rb
RSpec.describe "Blog::Posts", type: :request do
it "lists posts" do
get "/blog/posts"
expect(last_response.status).to eq(200)
end
endRun the smoke tests: bundle exec rspec spec/requests/blog/ — all examples must pass before considering the slice complete.
| Mistake | Correct Approach |
|---|---|
| Slice without clear bounded context | Slices represent bounded contexts — do not create slices for arbitrary grouping. |
| Circular dependencies between slices | Slices should be acyclic: Slice A imports from Slice B, not vice versa. |
Forgetting to register the slice in config/app.rb | The slice must be registered in the app to be mounted. |
| Duplicating main app configuration | Slices inherit app configuration — only override when necessary. |
| Defining routes in the main app | Slice routes belong in slices/<name>/config/routes.rb. |
| Missing smoke tests for slice routes | Always verify the slice mounts and responds at its path. |
.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