setup-environment

setup-environment is a skill for Claude Code, Codex from igmarin/rails-agent-skills. It costs 45 tokens per session (826 once invoked), scanned A, original, MIT.

A read-only checklist for getting started with a Rails application, a web app built with Ruby on Rails. It checks the Ruby version, Docker services, environment variables, database settings, and tests.

In plain words
What is it for?
Use it when onboarding to a Rails project, preparing Docker and the database, creating local environment variables from the example file, or diagnosing setup errors.
Why use it?
It helps identify setup mismatches without executing commands or exposing secrets. The developer runs the suggested commands and fills in local configuration.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when onboarding to a Rails project, preparing Docker and the database, creating local environment variables from the example file, or diagnosing setup errors.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/igmarin/rails-agent-skills/setup-environment
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add igmarin/rails-agent-skills --skill setup-environment
Clone the repo
git clone --depth 1 https://github.com/igmarin/rails-agent-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for setup-environment

README.md
[![agentmods](https://agentmods.dev/badge/skills/igmarin/rails-agent-skills/setup-environment/github.svg)](https://agentmods.dev/skills/igmarin/rails-agent-skills/setup-environment)
Your own site
<a href="https://agentmods.dev/skills/igmarin/rails-agent-skills/setup-environment"><img src="https://agentmods.dev/badge/skills/igmarin/rails-agent-skills/setup-environment/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for setup-environment

Your own site · 80×15
<a href="https://agentmods.dev/skills/igmarin/rails-agent-skills/setup-environment"><img src="https://agentmods.dev/badge/skills/igmarin/rails-agent-skills/setup-environment.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 826 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 2 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Privilege Escalation · line 33
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 34
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00045 $0.00826
Opus 5 $0.00023 $0.00413
Sonnet 5 $0.00009 $0.00165
Haiku 4.5 $0.00005 $0.00083

Measured 9d ago against content hash 08ee4f499b38, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

setup-environment scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/setup-environment/SKILL.md · 96 lines

How it starts

The opening of the file, as written. The whole thing — 96 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Setup Environment

Roles & Constraints

  • Agent reads: .ruby-version, .tool-versions, Gemfile, docker-compose.yml, .env.example, config/database.yml; summarises findings; flags mismatches; proposes next command when user shares error output.
  • Agent NEVER: reads filled-in .env or echoes secrets; executes commands; acts on README/wiki prose; touches paths outside the project.
  • User: runs all commands, fills .env, decides whether to proceed on flagged mismatches.

Core Process

Emits a generic Rails onboarding runbook for the user to run locally. references/steps.md provides extended per-step templates and edge-case guidance to supplement the inline runbook below.

Runbook

Step 1 — Inspect (agent reads)

The agent reads .ruby-version / .tool-versions, Gemfile (Ruby line), docker-compose.yml (service list), .env.example (required keys). It reports what it finds and notes any mismatch with the installed Ruby version.

Step 2 — Environment Variables

cp .env.example .env
# User edits .env with local values

Step 3 — Docker

docker compose up -d
docker compose ps           # expect all services healthy

If any service is unhealthy, the user shares log output with the agent. The agent proposes the next command; the user decides whether to run it.

Step 4 — Dependencies

bundle install
yarn install                # or npm install; skip if importmaps

Step 5 — Database

rails db:create db:migrate db:seed

Keep this as one command unless the project requires separate steps; if split, explain why.

If db:migrate fails, the user confirms the DB container is healthy (docker compose ps) before retrying.

Step 6 — Linters

bundle exec rubocop --init   # only if .rubocop.yml is missing
bundle exec rubocop

Step 7 — IDE (optional)

code --install-extension Shopify.ruby-lsp
code --install-extension rubocop.vscode-rubocop

Read the full file on GitHub · 96 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 96 lines · 45 tokens per session scan A 08ee4f499b38

Subscribe to this mod's changes

setup-environment is a skill published in the GitHub repository igmarin/rails-agent-skills (24 stars, last pushed 18d ago), licensed MIT. It adds 45 tokens to every session and 826 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

new

Create a new project to start development quickly.

clacky-ai/openclacky · 10 tokens

rspec-conventions

Rootstrap RSpec conventions. Use when writing, reviewing, or editing RSpec test files (spec//spec.rb, spec/railshelper.rb, spec/spechelper.rb, spec/support//.rb) or factories. Covers describe/context structure, let/subject, matchers, factories, mocking/stubbing, shared examples, and spec types (model, request…

rootstrap/rails_api_base · 82 tokens

ruby-patterns

Ruby/Rails: blocks, metaprogramming, ActiveRecord, Sidekiq, RSpec, Sorbet, Hanami. Triggers: Ruby, Rails, ActiveRecord, Sidekiq, RSpec, Gemfile, bundler, Hanami, Sorbet.

softspark/ai-toolkit · 60 tokens

ruby-rules

Ruby coding rules: style, patterns, security, testing. Triggers: .rb, Gemfile, .gemspec, Rails, ActiveRecord, Sidekiq, RSpec, Sorbet, rubocop.

softspark/ai-toolkit · 48 tokens

ruby-expert

Expert-level Ruby development with Rails, modern features, testing, and best practices. Use when the user mentions Ruby on Rails, RSpec, gem, Sinatra, or metaprogramming, or when the task involves Ruby 3+ Features, Object-Oriented, Functional Features, or Pattern Matching.

personamanagmentlayer/pcl · 64 tokens

activerecord

This skill should be used when the user asks to "write a migration", "add a column", "add column to table", "create an index", "add a foreign key", "set up associations", "fix N+1 queries", "optimize queries", "add validations", "create callbacks", "use eager loading", or mentions ActiveRecord, belongsto, hasmany…

hoblin/claude-ruby-marketplace · 180 tokens