Create Slice

Use when creating Hanami Slices — generate a slice with `hanami generate slice [name]`, register it in `config/app.rb` via `slice :name, at: "/path"`, define slice routes in `slices/[name]/config/routes.rb`, configure inter-slice dependencies with `import`/`export` (avoid circular deps: if A imports from B, B must not import from A), and keep slices self-contained for distinct bounded contexts like API, admin, or billing, the main web application. Covers slice directory generation, route configuration, cross-slice dependency management, and slice-level container access.

igmarin 97b23ca 4.3 KB Updated

File contents

igmarin/hanakai-yaku/tree/main/skills/slices/create-slice commit 97b23caac8

Frequently asked questions

npx skillmds@latest add igmarin/create-slice