Use when integrating Ameba into development workflows including CI/CD pipelines, pre-commit hooks, GitHub Actions, and automated code review processes.
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-integration/SKILL.md -a claude-code --skill ameba-integrationInstallation paths:
.claude/skills/ameba-integration/# Ameba Integration
Integrate Ameba into your development workflow for automated Crystal code quality checks in CI/CD pipelines, pre-commit hooks, and code review processes.
## Integration Overview
Ameba can be integrated at multiple points in your development workflow:
- **Pre-commit hooks** - Catch issues before they're committed
- **CI/CD pipelines** - Enforce quality gates in automated builds
- **GitHub Actions** - Automated PR reviews and status checks
- **Editor integration** - Real-time feedback while coding
- **Code review** - Automated comments on pull requests
- **Pre-push hooks** - Final check before pushing to remote
## Command-Line Usage
### Basic Commands
```bash
# Run Ameba on entire project
ameba
# Run on specific files
ameba src/models/user.cr
# Run on specific directories
ameba src/services/
# Run with specific configuration
ameba --config .ameba.custom.yml
# Generate default configuration
ameba --gen-config
# Auto-fix correctable issues
ameba --fix
# Only check specific rules
ameba --only Style/RedundantReturn
# Exclude specific rules
ameba --except Style/LargeNumbers
# Format output
ameba --format json
ameba --format junit
ameba --format flycheck
# Explain issues at specific location
ameba --explain src/models/user.cr:10:5
# Run with all output
ameba --all
# Fail silently on no issues
ameba --silent
```
### Output Formats
```bash
# Default: Human-readable
ameba
# Output:
# src/user.cr:10:5: Style/RedundantReturn: Redundant return detected
# JSON format (for parsing)
ameba --format json
# Output: {"sources": [...], "summary": {...}}
# JUnit XML (for CI integration)
ameba --format junit > ameba-results.xml
# Flycheck format (for Emacs)
ameba --format flycheck
```
### Advanced Usage
```bash
# Check only changed files (git)
git diff --name-only --diff-filter=ACM | grep '\.cr$' | xargs ameba
# Check only staged files
git diff --cached --name-only --diff-filter=ACM | grep '\.cr$' | xargs ameba
# Run with parallel processing (