hanami

Provide Hanami 2+ Ruby framework development guardrails and patterns.

7|1|Updated Nov 3, 2025
One-click install
npx skills add https://github.com/ar4mirez/samuel --skill hanami
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hanami
Source: https://github.com/ar4mirez/samuel/tree/main/template/.claude/skills/hanami
Command: npx skills add https://github.com/ar4mirez/samuel --skill hanami

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides comprehensive guardrails, architectural patterns, and best practices for developing applications using the Hanami 2+ Ruby web framework, ensuring clean architecture and efficient development.

Core Features & Use Cases

  • Architectural Guidance: Enforces clean architecture principles, slice-based bounded contexts, and dependency injection.
  • Best Practices: Offers detailed guidance on actions, views, persistence (ROM), security, and testing.
  • Use Case: When starting a new Hanami project or refactoring an existing one, consult this Skill for a robust, maintainable, and scalable application structure.

Quick Start

Use the hanami skill to generate a new Hanami application named 'my_app'.

Frequently Asked Questions about hanami

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure a Hanami 2 application using clean architecture?

Hanami clean architecture uses slice-based bounded contexts and dependency injection to separate domain logic. This structure ensures scalable, maintainable web applications by isolating business rules from delivery mechanisms.

What is the best way to configure ROM persistence in a Ruby web framework?

The best way to configure ROM persistence is by following Hanami guardrails for database mapping and relations. This integrates persistence cleanly within your application slices without coupling directly to domain models.

How does dependency injection work with dry-rb in Hanami?

Dependency injection in Hanami leverages dry-rb integration to manage object resolution and lifecycle. This mechanism automatically injects dependencies into actions and views, promoting loose coupling and testability across slices.

Can I use Hanami for domain-driven design and API development?

Yes, you can use Hanami for domain-driven design and API development. The framework provides architectural patterns for bounded contexts and actions specifically suited for building scalable web APIs and complex domain logic.

What testing strategies should I use for Hanami actions and views?

Test Hanami actions and views by isolating dependencies through dependency injection. The framework guardrails recommend testing slices in isolation to ensure clean architecture boundaries remain enforced across your domain logic.