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
Use this skill when generating Hanami 2.x components via the CLI.
Core principle: Generators follow naming conventions. The command name determines the file path and class name.
| Command | Generates | Path |
|---|---|---|
hanami generate action <name> | Action class | app/actions/{path}.rb |
hanami generate view <name> | View class + template | app/views/{path}.rb + app/templates/{path}.html.erb |
hanami generate slice <name> | Slice directory structure | slices/{name}/ |
hanami generate migration <name> | Migration file | db/migrate/{timestamp}_{name}.rb |
hanami generate relation <name> | Relation class | app/relations/{name}.rb |
hanami generate repo <name> | Repository class | app/repos/{name}.rb |
hanami generate entity <name> | Entity class | app/entities/{name}.rb |
Generate an Action:
hanami generate action users.indexGenerates:
app/actions/users/index.rbMyApp::Actions::Users::IndexWith a Slice:
hanami generate action api.users.indexGenerates:
slices/api/actions/users/index.rbMyApp::Slices::Api::Actions::Users::IndexGenerate a View:
hanami generate view users.indexGenerates:
app/views/users/index.rbapp/templates/users/index.html.erbGenerate a Slice:
hanami generate slice apiGenerates:
slices/api/config/routes.rbslices/api/config/slice.rbslices/api/actions/slices/api/views/slices/api/templates/Generate a migration:
hanami generate migration create_usersGenerates:
db/migrate/{timestamp}_create_users.rbAlways verify generated files: Generators will fail if target files already exist. Always check:
users.index → MyApp::Actions::Users::Index).<slice>.<resource>.<action> (omitting this places components in the default app/ folder).| Problem / Mistake | Resolution |
|---|---|
| Using underscores instead of dots | CLI commands require dot notation: users.index, not users_index. |
| Omitting the slice prefix | Use api.users.index to generate in the api slice. |
| Singular names for Actions | Actions should use plural resource names: users.index, not user.index. |
| File conflicts / stale files | Generators never overwrite. Manually delete conflicting files before re-generating. |
| Related Skill | When to chain |
|---|---|
create-app (../create-app/SKILL.md) | Generators are used after creating the app. |
create-action (../create-action/SKILL.md) | Generated Actions need to be filled with logic. |
create-view (../create-view/SKILL.md) | Generated Views need exposures defined. |
create-slice (../create-slice/SKILL.md) | Generated Slices need routes and configuration. |
write-migration (../write-migration/SKILL.md) | Generated migrations need schema definitions. |
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