rails-clean-test-outputlisted
Install: claude install-skill mickzijdel/rails-toolkit
# Clean Up Unexpected Rails Test Output
This skill wraps thoughtbot's [`clean-rspec-output`](https://github.com/thoughtbot/clean-rspec-output),
vendored in this plugin at `../../vendor/clean-rspec-output/`. That skill is the authoritative,
detailed per-issue workflow (capture → scan → isolate → fix → verify → simplify → commit). This
wrapper adds two things on top:
1. **It is framework-agnostic.** The vendored workflow is written for RSpec, but the same approach
works for Minitest. Detect which the project uses and translate the commands.
2. **Logging `p`/`puts` calls become logger calls, not deletions.** See Override B below.
## Step 0 — Detect the test framework
Before anything else, determine which framework the repo uses, and say which you detected:
- **RSpec** if the `Gemfile`/`Gemfile.lock` includes `rspec-rails` and there is a `spec/` directory.
- **Minitest** otherwise (a `test/` directory with `minitest`, the Rails default).
If both are present, ask the user which suite they want cleaned.
## The workflow
Read and follow `../../vendor/clean-rspec-output/SKILL.md` end to end — its fix-scope rules
(change *how* a test runs, never *what* it covers), its hard gate on reproducing each issue in
isolation before fixing, its one-fix-per-commit discipline, and its commit-message format all
apply unchanged. The two overrides below take precedence wherever they conflict with it.
## Override A — Minitest command map
The vendored workflow hardcodes `bundle exec rspec`