Use when configuring Ameba rules and settings for Crystal projects including .ameba.yml setup, rule management, severity levels, and code quality enforcement.
View on GitHubTheBushidoCollective/han
jutsu-ameba
January 24, 2026
Select agents to install to:
npx add-skill https://github.com/TheBushidoCollective/han/blob/main/jutsu/jutsu-ameba/skills/ameba-configuration/SKILL.md -a claude-code --skill ameba-configurationInstallation paths:
.claude/skills/ameba-configuration/# Ameba Configuration Configure Ameba, the static code analysis tool for Crystal, to enforce consistent code style and catch code smells in your Crystal projects. ## Understanding Ameba Ameba is a static code analysis tool for the Crystal programming language that: - Enforces consistent Crystal code style - Catches code smells and wrong code constructions - Provides configurable rules organized into categories - Supports inline disabling of rules - Offers auto-correction for many issues - Integrates seamlessly with Crystal development workflows ## Core Configuration File: .ameba.yml ### Generating Default Configuration ```bash # Generate a new configuration file with all defaults ameba --gen-config # This creates .ameba.yml with all available rules and their default settings ``` ### Basic Configuration Structure ```yaml # .ameba.yml - Complete example configuration # Global source configuration Globs: - "**/*.cr" # Include all Crystal files - "**/*.ecr" # Include Embedded Crystal files - "!lib" # Exclude dependencies Excluded: - src/legacy/** # Exclude legacy code - spec/fixtures/** # Exclude test fixtures # Rule categories and individual rules Lint/UnusedArgument: Enabled: true Severity: Warning Style/RedundantReturn: Enabled: true Severity: Convention Performance/AnyInsteadOfEmpty: Enabled: true Severity: Warning ``` ## Source File Configuration ### Globs: Defining What to Analyze ```yaml # Include specific patterns Globs: - "**/*.cr" # All Crystal source files - "**/*.ecr" # All Embedded Crystal templates - "!lib/**" # Exclude lib directory - "!vendor/**" # Exclude vendor directory # Common patterns # - "src/**/*.cr" # Only src directory # - "spec/**/*.cr" # Only spec directory # - "!**/*_test.cr" # Exclude test files ``` ### Excluded: Fine-Grained Exclusions ```yaml # Global exclusions (applied to all rules) Excluded: - src/compiler/** # Exclude specific dir