.claude/skills/database/SKILL.md
Database management commands and the bin/run utility for executing Ruby scripts against specific event databases. Use when the user needs to query, manipulate, or run scripts against existing databases without starting a Rails server.
npx skillsauth add rubys/showcase databaseInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
# Prepare database (creates and runs migrations)
bin/rails db:prepare
# Run migrations
bin/rails db:migrate
# Load seed data
bin/rails db:seed
# Load fixtures (for test data)
bin/rails db:fixtures:load
The bin/run command allows you to execute Ruby scripts against any database in the project.
# Run a script file against a specific database
bin/run db/2025-boston.sqlite3 path/to/script.rb
# Evaluate Ruby code directly against a database
bin/run db/2025-boston.sqlite3 -e "puts Event.current.name"
# Run against test database (automatically loads fixtures)
bin/run test -e "puts Person.count"
# Count heats
bin/run db/2025-boston.sqlite3 -e "Heat.count"
# Get all student names
bin/run db/2025-boston.sqlite3 -e "Person.where(type: 'Student').pluck(:name)"
# List studios with person counts
bin/run db/2025-boston.sqlite3 -e "Studio.all.map { |s| [s.name, s.people.count] }"
The script automatically sets up:
RAILS_APP_DB environment variable from database filenameRAILS_STORAGE path for Active Storage filesdb:prepare and loads fixturesThis allows you to query and manipulate any event database without starting a full Rails server.
development
Information about running tests, test coverage, and known testing issues in the Rails application. Use when the user asks about testing procedures, encounters test failures, wants to know about coverage, or needs to troubleshoot intermittent system test issues.
development
Use this skill to inspect what a Rails page currently displays, extract HTML content, or verify rendering WITHOUT starting a dev server. Useful for understanding page output before making changes, debugging views, searching for content, or testing that pages work correctly. Provides .claude/skills/render-page/scripts/render.rb for quick page inspection and HTML extraction.
development
Working with the Navigator Go submodule for web server fixes and enhancements. Use when deployment plans require Navigator changes, config parsing issues arise, or new routing/proxy behavior is needed.
testing
Use when asked to run "fly ssh console", SSH into Fly.io machines, inspect files on production machines, check processes on Fly.io, or examine deployed machine state. Covers critical pitfalls like no shell support and Debian vs macOS command differences.