views-bootstrap

Rules for building Ruby ERB web pages with Bootstrap 5.3, a library of ready-made layout and interface styles.

In plain words
What is it for?
Use them when creating views, forms, modals, tabs, tooltips, pagination, icons, responsive layouts, or dynamic updates with Turbo.
Why use it?
They keep pages visually consistent and reduce unnecessary custom code for layouts, forms, messages, navigation, and interactive elements.

Cursor rule for Cursor

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.

agentmods
npx agentmods add rules/romkey/i2c-directory/views-bootstrap
Clone the repo
git clone --depth 1 https://github.com/romkey/I2C-Directory

Made for: Cursor.

Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 278 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00000 $0.00278
Opus 5 $0.00000 $0.00139
Sonnet 5 $0.00000 $0.00056
Haiku 4.5 $0.00000 $0.00028

Measured 2d ago against content hash 41c7b409e367, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

views-bootstrap 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 2d 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.

.cursor/rules/views-bootstrap.mdc · 28 lines

What it actually says

Views and Bootstrap

  • Bootstrap 5.3 — use Bootstrap utility classes and components; avoid custom CSS when a utility class exists
  • Icons: Use bootstrap-icons font classes (e.g., <i class="bi bi-pencil"></i>)
  • Layout: Application layout uses a Bootstrap navbar; views use the grid system (container, row, col-*)
  • Flash messages: Styled with bootstrap_class_for helper from ApplicationHelper
  • Pagination: Use pagy_bootstrap_nav helper

Component Patterns

  • Modals: Use bootstrap.Modal JS API with Stimulus controllers
  • Tabs: Use bootstrap.Tab JS API
  • Tooltips: Initialize via bootstrap.Tooltip
  • Forms: Use Bootstrap form classes (form-control, form-label, form-select, form-check)

ERB Conventions

  • Use partials for repeated UI elements; prefix with underscore
  • Prefer link_to and button_to helpers over raw <a> and <form> tags
  • Use Turbo Frames and Turbo Streams for dynamic updates instead of custom JS
  • Keep view logic in helpers or presenters, not in templates
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. 2d ago First seen · 28 lines · 0 tokens per session scan A 41c7b409e367

Subscribe to this mod's changes

views-bootstrap is a cursor rule published in the GitHub repository romkey/I2C-Directory (11 stars, last pushed 21d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 278 tokens. 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.