kieranklaassen

Blazer AI — Data skill for Claude Code

Data community

AI-powered natural language to SQL generation for Blazer using RubyLLM.

How to install Blazer AI

This entry records only its repository, not the path inside it, so there is no exact command to give. Open kieranklaassen/blazer-ai and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Blazer AI does

AI-powered natural language to SQL generation for Blazer using RubyLLM.

Alternatives in Data

  • SQL Queries — Generate SQL queries from natural language across major dialects 7.8k ★
  • MCP Server Chart — 🤖 A visualization mcp & skills contains 25+ visual charts using @antvis 4k ★
  • AgriQuant AI — AI-powered weather intelligence for agricultural commodity futures 707 ★

README

Blazer AI

AI-powered SQL generation for [Blazer](https://github.com/ankane/blazer)

[![Gem Version](https://badge.fury.io/rb/blazer-ai.svg)](https://badge.fury.io/rb/blazer-ai) [![CI](https://github.com/kieranklaassen/blazer-ai/actions/workflows/ci.yml/badge.svg)](https://github.com/kieranklaassen/blazer-ai/actions/workflows/ci.yml)

Installation

Add this line to your application's Gemfile:

gem "blazer-ai"

Run:

bundle install
rails generate blazer_ai:install

And set your API key:

export OPENAI_API_KEY=your_key_here

Usage

Visit `/blazer/queries/new` and click **Generate SQL (AI)**.

Keyboard shortcut: `Cmd+Shift+G` (Mac) or `Ctrl+Shift+G`

Configuration

Blazer::Ai.configure do |config|
  config.default_model = "gpt-5.1-codex"
  config.temperature = 0.2
  config.rate_limit_per_minute = 20
end

For other providers, update the initializer:

# Anthropic
RubyLLM.configure do |config|
  config.anthropic_api_key = ENV["ANTHROPIC_API_KEY"]
end

Blazer::Ai.configure do |config|
  config.default_model = "claude-sonnet-4-20250514"
end
# Google
RubyLLM.configure do |config|
  config.gemini_api_key = ENV["GEMINI_API_KEY"]
end

Blazer::Ai.configure do |config|
  config.default_model = "gemini-2.0-flash"
end

API

Invalidate schema cache:

Blazer::Ai::SchemaCache.invalidate(data_source_id: "main")

Validate SQL:

Blazer::Ai::SqlValidator.new.safe?("SELECT * FROM users")

Security

Only `SELECT` and `WITH` statements are allowed. Use a read-only database user.

Development

bundle install
bundle exec rake test

License

MIT