apply-stack-conventions

apply-stack-conventions is a skill for Claude Code, Codex from igmarin/rails-agent-skills. It costs 49 tokens per session (1,547 once invoked), scanned A, original, MIT.

A set of coding rules for Rails applications that use PostgreSQL, Hotwire, and Tailwind CSS. It also requires TDD, or test-driven development: write a test, see it fail, implement the code, and see it pass.

In plain words
What is it for?
Use it when writing new Rails code, especially service objects, database queries, Turbo or Stimulus interactions, Tailwind views, and access-controlled actions.
Why use it?
It gives developers a shared way to structure controllers, database access, browser interactions, styling, authentication, and authorization. The required test cycle helps catch incorrect behavior while new code is being written.

Skill for Claude CodeCodex

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

Good fit Use it when writing new Rails code, especially service objects, database queries, Turbo or Stimulus interactions, Tailwind views, and access-controlled actions.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/igmarin/rails-agent-skills/apply-stack-conventions
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 apply-stack-conventions
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 apply-stack-conventions

README.md
[![agentmods](https://agentmods.dev/badge/skills/igmarin/rails-agent-skills/apply-stack-conventions/github.svg)](https://agentmods.dev/skills/igmarin/rails-agent-skills/apply-stack-conventions)
Your own site
<a href="https://agentmods.dev/skills/igmarin/rails-agent-skills/apply-stack-conventions"><img src="https://agentmods.dev/badge/skills/igmarin/rails-agent-skills/apply-stack-conventions/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 apply-stack-conventions

Your own site · 80×15
<a href="https://agentmods.dev/skills/igmarin/rails-agent-skills/apply-stack-conventions"><img src="https://agentmods.dev/badge/skills/igmarin/rails-agent-skills/apply-stack-conventions.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 49 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,547 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 pass 7 Sept 2026
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.00049 $0.01547
Opus 5 $0.00024 $0.00773
Sonnet 5 $0.00010 $0.00309
Haiku 4.5 $0.00005 $0.00155

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

Security

Grade A, and why

apply-stack-conventions 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 8d ago.

The scan reads SKILL.md. This mod also ships 4 executable files (assets/snippets/eager_loading.rb, assets/snippets/n_plus_one_fix_example.rb, assets/snippets/service_object.rb, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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/apply-stack-conventions/SKILL.md · 147 lines

How it starts

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

Apply Stack Conventions

Quick Reference

Stack area Default convention
Rails MVC Thin controllers; move non-trivial business logic into service objects
PostgreSQL Avoid N+1s with includes; use database constraints for integrity
Hotwire Prefer Turbo Frames/Streams before Stimulus; only reach for Stimulus when Turbo cannot handle the interactivity
Tailwind Use utilities in views; extract repeated UI into partials/components
Auth Apply Devise authentication and Pundit authorization to every action that touches access-controlled resources

HARD-GATE: TDD Cycle

All new code must have its test written and validated before implementation. Follow this exact cycle for every layer:

  1. Write the spec file — show the full file content, not only the path
  2. Run: bundle exec rspec spec/[path]_spec.rb — verify it FAILS (Observed RED output)
  3. Write the implementation code
  4. Re-run the same command — verify it PASSES (Observed GREEN output)
  5. Refactor if needed, keeping tests green

CRITICAL: Execute all test commands using your shell/terminal tools. Do not fabricate, mock, or simulate terminal output. Copy-paste the actual observed output. If the environment does not support running tests, stop and tell the user — do not proceed to implementation without verified RED output.

Red-Green Cycle Example

Spec file — spec/models/order_spec.rb

require 'rails_helper'

RSpec.describe Order, type: :model do
  describe 'validations' do
    it 'is invalid without a total' do
      order = build(:order, total: nil)
      expect(order).not_to be_valid
      expect(order.errors[:total]).to include("can't be blank")
    end
  end
end

Run command

bundle exec rspec spec/models/order_spec.rb

Observed RED output — paste actual terminal output here (expect failure)

Model implementation — app/models/order.rb

class Order < ApplicationRecord
  validates :total, presence: true
end

Read the full file on GitHub · 147 lines

Files

What ships with it

6 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. 8d ago First seen · 147 lines · 49 tokens per session scan A 99552a07cdca

Subscribe to this mod's changes

apply-stack-conventions is a skill published in the GitHub repository igmarin/rails-agent-skills (24 stars, last pushed 18d ago), licensed MIT. It adds 49 tokens to every session and 1,547 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

azure-postgres-ts

Connect to Azure Database for PostgreSQL Flexible Server from Node.js/TypeScript using the pg (node-postgres) package. Use for PostgreSQL queries, connection pooling, transactions, and Microsoft Entra ID (passwordless) authentication. Triggers: "PostgreSQL", "postgres", "pg client", "node-postgres", "Azure PostgreSQL…

microsoft/skills · 94 tokens

butterbase

AI-native, open-source backend-as-a-service with a built-in Model Context Protocol server. Postgres, auth, storage, functions, AI gateway.

butterbase-ai/butterbase · 34 tokens

supabase

Use when doing ANY task involving Supabase. Triggers: Supabase products (Database, Auth, Edge Functions, Realtime, Storage, Vectors, Cron, Queues); client libraries and SSR integrations (supabase-js, @supabase/ssr) in Next.js, React, SvelteKit, Astro, Remix; auth issues (login, logout, sessions, JWT, cookies…

supabase/agent-skills · 185 tokens

supabase-cli

This skill should be used when user asks to "use supabase CLI", "supabase init", "supabase start", "run migrations", "deploy edge functions", "manage Supabase project", or works with the supabase command-line tool for local development and project management.

fcakyon/claude-codex-settings · 60 tokens

supabase-js

This skill should be used when user asks to "use supabase-js", "query Supabase database", "supabase auth", "supabase storage", "supabase realtime", "supabase edge functions", or works with the @supabase/supabase-js JavaScript/TypeScript SDK.

fcakyon/claude-codex-settings · 64 tokens

firebase-data-connect

Builds and deploys Firebase SQL Connect (aka Firebase Data Connect) backends with PostgreSQL securely. Use when designing schemas with tables and relations, writing authorized queries and mutations, configuring real-time data updates, or generating type-safe SDKs. Use when you need a relational database with Firebase…

firebase/agent-skills · 74 tokens