by crisnahine
Rails MCP server: stop AI coding agents from guessing your app. A Ruby gem with 35 read-only tools that give Claude Code, Cursor, GitHub Copilot, OpenCode and Codex CLI your real schema, models, routes, controllers and views. MCP or CLI, Gemfile or standalone, and it still answers when the app can't boot.
# Add to your Claude Code skills
git clone https://github.com/crisnahine/rails-ai-contextGuides for using ai agents skills like rails-ai-context.
Last scanned: 5/30/2026
{
"issues": [],
"status": "PASSED",
"scannedAt": "2026-05-30T16:12:02.117Z",
"npmAuditRan": true,
"pipAuditRan": true
}See how rails-ai-context compares with popular alternatives.
rails-ai-context is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by crisnahine. Rails MCP server: stop AI coding agents from guessing your app. A Ruby gem with 35 read-only tools that give Claude Code, Cursor, GitHub Copilot, OpenCode and Codex CLI your real schema, models, routes, controllers and views. MCP or CLI, Gemfile or standalone, and it still answers when the app can't boot. It has 189 GitHub stars.
Yes. rails-ai-context passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.
Clone the repository with "git clone https://github.com/crisnahine/rails-ai-context" and add it to your Claude Code skills directory (see the Installation section above).
rails-ai-context is primarily written in Ruby. It is open-source under crisnahine on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh rails-ai-context against similar tools.
No comments yet. Be the first to share your thoughts!
From $49 · 30 days · terms & refunds
⚠️ Third-Party Software Notice
This skill is third-party open-source software developed and hosted independently on GitHub. SkillsLLM lists this project for discovery and does not control or maintain the underlying repository.
Any security checks, ratings, or warnings displayed by SkillsLLM are automated and limited in scope. They do not constitute a security certification or guarantee that the software is safe, error-free, or free from malicious code, vulnerabilities, compromised dependencies, or prompt-injection risks.
Review the source code, permissions, dependencies, and configuration before installing or running any third-party skill. Use is at your own risk. To the maximum extent permitted by applicable law, SkillsLLM is not liable for losses arising from third-party software.
Automated security scan — not a certification.
An assistant writing Rails code knows what an average Rails app looks like. Yours has its own columns,
associations, filters and test setup, and the assistant starts every session with none of that. It
writes a migration for a column that exists, calls user.posts when the association is user.articles,
scaffolds FactoryBot into a fixture suite, and misses the before_action a parent controller adds. You
catch it, fix it, re-prompt, and something next to it breaks.
rails-ai-context gives the assistant 35 tools that read the app itself, over MCP from the AI tool or from the command line. Every answer is read from the app and says how sure it is, and most end with a hint for the next call.
| When | What the assistant gets | A real line from an answer |
|---|---|---|
| It asks about a table | Columns with types, nulls and defaults, the indexes, the model on the table | index_users_on_email on (email) (unique) |
| Before it calls an association | Associations with their options, validations including the implicit ones, enums, scopes, callbacks, concerns | has_many articles dependent: destroy (foreign_key: :author_id, inverse_of: :author) |
| Before it writes an action | The actions, every filter with where it was inherited from, strong parameters, the layout | before authenticate_user! (from ApplicationController) (skipped on: index, show) |
| Before it writes a test | The framework, where the factories or fixtures live, their traits, a template in the app's style | Factories: spec/factories (3 files) |
| It traces a method | The definition and source, what it calls, every caller grouped by file and kind, the tests | app/services/article_publisher.rb (Service) · 11: return false unless @article.publishable? |
| When the app cannot boot | The same tools, from config/routes.rb, the schema dump and the source, saying so |
[STATIC] Static mode (static mode requested with --no-boot). Serving static analysis; runtime-only data is marked [UNAVAILABLE]. |
Each line comes from the sample app in this repository, a blog with Devise, an admin namespace, a JSON API, a Sidekiq job and a FactoryBot suite. The website records the whole answers every time it is built, by running the gem at that commit: crisnahine.github.io/rails-ai-context.
The install writes the files each AI tool reads, so the assistant knows the tools exist and how to ask: the MCP config, one root context file with six anti-hallucination rules, and rules that load when a model, a controller or a migration is open. The tools are read-only, the SQL tool runs inside a read-only transaction, and files that hold secrets are never served.
Open your AI tool at the root of your Rails app and paste this. It installs the gem, sets up the AI tool you are in, checks the result and tells you the one step left.
Install the rails-ai-context gem in this Rails app so you can read its schema, models, routes and code through its tools instead of guessing.
1. Run `ruby -v` and `bundle exec rails -v`. rails-ai-context needs Ruby 3.1+ and Rails 7.0+. If either is older, stop and tell me.
2. Pick TOOL, the key for the AI tool you are: claude (Claude Code), cursor (Cursor), copilot (GitHub Copilot in VS Co