Skip to main content
skill CX Codex

rails-application-ui-blocks — Claude Code skill: setup and usage

rails-application-ui-blocks is a Claude Code skill that assembles UI blocks in Ruby on Rails ERB views while preserving Turbo, Stimulus, and accessibility hooks.

MIT 257 installs ★ 227 updated 2026-08-15

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add pproenca/dot-skills --skill rails-application-ui-blocks -a claude-code
Open on GitHub

What rails-application-ui-blocks does

This skill guides the agent through selecting and assembling UI blocks from templates/application-ui into Rails views. It defines two separate paths: new-page for building screens from scratch and refactor-page for updating legacy views. New layouts start with page anchors and shells, moving sequentially down to headings, inputs, data displays, and overlays. Refactoring maps existing regions to specific catalog entries one slice at a time.

The skill strictly protects backend semantics. It explicitly forbids modifications to models, controllers, policies, or existing form inputs without direct instruction. Attributes like data-controller, data-action, data-turbo-*, and aria-* must remain intact. Template discovery relies on references/selection-playbook.md and references/template-catalog.json. Whenever underlying UI sources update, you need Python 3 to rebuild the index using scripts/build_template_catalog.py.

What it helps with

  • assemble Rails admin dashboards from structured template blocks
  • modernize legacy ERB views without breaking Stimulus controllers
  • preserve Turbo Frames and Turbo Streams during frontend refactoring
  • maintain consistent catalog tracking across Rails partials

Example prompts for the agent

  • Build a settings screen in new-page mode using the application-ui templates
  • Refactor app/views/accounts/_card.html.erb to match a catalog block without dropping aria tags
  • Run the catalog builder script after editing files in templates/application-ui

How to install rails-application-ui-blocks

1Skills CLI (Vercel)

npx skills add pproenca/dot-skills --skill rails-application-ui-blocks -a claude-code

2Manually: put the files in place

~/.claude/skills/rails-application-ui-blocks/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/rails-application-ui-blocks/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about rails-application-ui-blocks

How to install rails-application-ui-blocks in Claude Code?

Run npx skills add pproenca/dot-skills --skill rails-application-ui-blocks -a claude-code. The definition will be placed at ~/.claude/skills/rails-application-ui-blocks/SKILL.md.

What does rails-application-ui-blocks do?

It orchestrates the adoption of UI blocks into Rails applications, managing ERB assembly while enforcing guardrails around existing controllers, Turbo hooks, and accessibility metadata.

How do you refresh the template index?

Execute python3 .agents/skills/rails-application-ui-blocks/scripts/build_template_catalog.py --root . to regenerate references/template-catalog.json.

Source text

SKILL.md · MIT
---
name: rails-application-ui-blocks
description: Compose new Rails backend pages and refactor existing Rails UI to use premium blocks from templates/application-ui. Use when requests mention ERB views, Rails partials, admin/dashboard screens, Tailwind UI assembly, or replacing custom markup with existing premium blocks while preserving behavior, accessibility, and Turbo/Stimulus hooks.
---

# Rails Application UI Blocks

Use this skill to choose, adapt, and integrate premium UI blocks from `templates/application-ui` into Rails views.

## Workflow

1. Determine mode:
- new-page for brand new features/pages
- refactor-page for existing views/partials
2. Identify constraints first:
- Required interactions (Turbo Frames/Streams, Stimulus targets/actions, form semantics)
- Accessibility constraints (labels, keyboard flow, ARIA)
- Existing component boundaries (partials, helpers, shared layouts)
3. Pick candidate blocks from catalog:
- Read `references/selection-playbook.md`
- Query `references/template-catalog.json`
4. Integrate minimally:
- Keep existing routes/controllers/domain logic unchanged
- Replace markup in thin steps (shell first, then sections, then micro-components)
5. Verify:
- Ensure no loss of behavior, accessibility, or test coverage
- Keep existing design tokens and class conventions where required by project standards

## Selection Order

For `new-page`:
1. Start with `ui.page-examples.*` to anchor page structure.
2. Choose shell from `ui.application-shells.*`.
3. Add page/section headings from `ui.headings.*`.
4. Add core body blocks (`ui.forms.*`, `ui.lists.*`, `ui.data-display.*`, `ui.feedback.*`).
5. Finish with navigation and overlay details (`ui.navigation.*`, `ui.overlays.*`).

For `refactor-page`:
1. Preserve current information architecture and interaction contracts.
2. Map each existing UI region to one candidate catalog block.
3. Replace one region at a time and run relevant tests.
4. Extract repeated markup into partials only after reuse is proven.

## Guardrails

- Do not change controllers/models/policies unless explicitly requested.
- Do not remove `data-controller`, `data-action`, `data-turbo-*`, `aria-*`, or form field names without replacement.
- Prefer adapting blocks to project styles over introducing conflicting visual systems.
- Avoid block insertion that duplicates existing design-system components when native components already solve the same need.

## Output Expectations

When completing a task with this skill, include:
- Selected catalog IDs (for traceability)
- Source template paths used
- Any behavior/accessibility deltas introduced
- What was intentionally not replaced and why

## Resources

- `references/selection-playbook.md`
  - Decision rules for what template families to check first, and when not to use them.
- `references/template-catalog.json`
  - Canonical block IDs with aliases and source paths.
- `scripts/build_template_catalog.py`
  - Regenerates the catalog after template updates.

## Maintenance

Regenerate the catalog when files under `templates/application-ui` change:

```bash
python3 .agents/skills/rails-application-ui-blocks/scripts/build_template_catalog.py \
  --root .
```

© pproenca · MIT · pproenca/dot-skills

Similar skills

All skills for Frontend and UI →

From the same set139

The whole set →
bug-review bug-review is a Claude Code skill that runs five parallel passes over a PR diff, selects findings by majority vote, then checks them with a separate Opus validator. It finds bugs before the merge. CX Codex +1 264installs effect-ts A skill providing patterns and reference guides for Effect-TS: typed error channels, Effect.gen flows, Layers, and fiber concurrency. CX Codex +1 263installs nginx-c-module-debug The nginx-c-module-debug skill guides diagnosis of nginx C module crashes, memory faults, and request-flow problems. Use it for GDB, core dumps, and tracing. CX Codex +1 260installs rust-write-tests rust-write-tests guides coding agents in writing deep Rust tests that target invariants, isolate test files, and systematically eradicate flaky async test runs. CX Codex +1 257installs rust-implement rust-implement enforces a four-pass discipline for Rust development, moving from strict type design to implementation, simplification, and automated linting. CX Codex +1 254installs domain-architect domain-architect identifies business domains in a Swift codebase by tracing user capabilities, not folder names. Maps each domain's vertical slice from types to UI. CX Codex +1 249installs app-planner app-planner creates a structured Markdown design plan using Apple Design DNA patterns before coding starts. Organizes screens into buildable milestones for ios-taste. CX Codex +1 244installs threat-model threat-model maps attack surfaces and trust boundaries across a codebase by tracing untrusted inputs directly to execution sinks. CX Codex +1 243installs

Project sponsors

Companies that keep this analytics open