Token导航 LogoToken导航TokenDH.com
前端设计需要联网github未标认证来源可访问许可证需确认审计通过

jr-rails-newJR Rails NEW 命令行

Agent Skill

jr-rails-new 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

353

周安装

15

GitHub Stars

25

下载量

124
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:jr-rails-new(JR Rails NEW 命令行)
来源仓库:https://github.com/julianrubisch/skills
仓库路径:skills/jr-rails-new
安装命令:
npx skills add https://github.com/julianrubisch/skills --skill jr-rails-new
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/julianrubisch/skills --skill jr-rails-new

简介

面向新版 Rails 项目的开发辅助技能。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

  • 涉及 Hotwire、Turbo Streams 等新特性支持。
  • 输出代码需适配 Rails 7+ 的路由与资产编译方式。
  • 部署前应运行完整测试套件确保无破坏性变更。
  • jr-rails-new 属于前端设计类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Rails App Scaffolder

Interactive skill that interviews you for preferences, runs rails new with the right flags, and performs post-scaffold configuration.

Workflow

Step 1: Interview

Ask the user each question. Show the default in brackets. Accept the default if the user presses enter or says "default" / "yes" / "y".

#QuestionOptionsDefault
1App namefree text(required)
2Databasepostgresql / mysql2 / sqlite3postgresql
3Frontend bundlingimportmap / esbuild / vite_railsimportmap
4CSStailwind / sass / nonetailwind
5View layererb / phlexerb
6Dev containeryes / noyes
7Authenticationrails (built-in, 8+) / devise / nonerails
8Authorizationpundit / nonepundit
9Background jobssolid_queue / sidekiqsolid_queue
10Git worktree workflowyes / nono

Testing is always Minitest — non-negotiable for jr-rails skills.

Step 2: Generate

Build and run the rails new command:

rails new APP_NAME \
  --database=DATABASE \
  --css=CSS \
  --skip-test=false \
  --devcontainer  # if dev container = yes

Bundling flags:

  • importmap → no extra flag (default)
  • esbuild--javascript=esbuild
  • vite_rails → no flag; add vite_rails gem post-scaffold

CSS flags:

  • tailwind--css=tailwind
  • sass--css=sass
  • none--skip-css

Step 3: Post-scaffold Configuration

Run these in order, skipping any that don't apply:

3a. Vite (if selected)

cd APP_NAME
bundle add vite_rails
bundle exec vite install

Remove importmap-rails from Gemfile if present.

3b. Phlex (if selected)

bundle add phlex-rails

Then create the base classes from reference/coding-phlex.md:

  • app/components/base.rbComponents::Base < Phlex::HTML
  • app/views/base.rbViews::Base < Components::Base
  • app/components/layout.rbComponents::Layout with Phlex::Rails::Layout

Set the layout in ApplicationController:

layout -> { Components::Layout }

Remove the ERB layout file (app/views/layouts/application.html.erb).

Install the custom scaffold generator from reference/coding-phlex.md § Scaffolding so future rails g scaffold produces Phlex views.

3c. Authentication

Rails built-in (8+):

rails g authentication

Devise:

bundle add devise
rails g devise:install
rails g devise User

3d. Pundit (if selected)

bundle add pundit
rails g pundit:install

Add to ApplicationController:

class ApplicationController < ActionController::Base
  include Pundit::Authorization
  after_action :verify_authorized, except: :index
  after_action :verify_policy_scoped, only: :index
end

3e. Sidekiq (if selected instead of Solid Queue)

bundle add sidekiq

Configure in config/application.rb:

config.active_job.queue_adapter = :sidekiq

3f. CLAUDE.md

Create CLAUDE.md in the app root with project conventions:

# Project Conventions

## Stack
- Ruby on Rails [version]
- [Database]
- [CSS framework]
- [View layer]
- Minitest with fixtures

## Testing
- Run tests: `bin/rails test`
- Run system tests: `bin/rails test:system`

## Style
- Follow 37signals/classic Rails conventions
- Rich domain models, CRUD controllers, concerns
- No service objects — use domain models in app/models/
- Minitest with fixtures (no RSpec, no factory_bot)
- Database constraints over model validations for hard guarantees

## Skills
- `/jr-rails-classic` — coding style guide
[- `/jr-rails-phlex` — Phlex components (if Phlex selected)]
- `/jr-rails-review` — code review

3g. Worktree config (if selected)

Set up the agentic worktree workflow using worktrunk. The exact binstubs and database.yml depend on the database choice (Q#2) and whether dev containers are enabled (Q#6).

1. Create .config/wt.toml (same for all strategies):

[list]
url = "http://localhost:{{ branch | hash_port }}"

[post-create]
setup = "AGENT_WORKSPACE={{ branch | sanitize }} AGENT_ROOT_PATH={{ primary_worktree_path }} bin/agent-setup"

[pre-remove]
cleanup = "AGENT_WORKSPACE={{ branch | sanitize }} bin/agent-cleanup"

[post-remove]
kill-server = "lsof -ti :{{ branch | hash_port }} -sTCP:LISTEN | xargs kill 2>/dev/null || true"

[post-start]
server = "PORT={{ branch | hash_port }} VITE_RUBY_PORT={{ (branch ~ '-vite') | hash_port }} bin/agent-server"

2. Create the binstubs from reference/agentic-worktrees.md, choosing the variant that matches the stack:

DatabaseDev containerStrategyReference section
sqlite3anySQLite§ Binstubs — SQLite
postgresql / mysql2noPort-based§ Binstubs — PostgreSQL (port-based)
postgresql / mysql2yes (per-worktree)Per-worktree devcontainer§ Binstubs — PostgreSQL + Docker Compose (Per-Worktree Devcontainer)
postgresql / mysql2yes (shared PG)Shared PG§ Binstubs — PostgreSQL + Docker Compose (Shared PG)

The per-worktree devcontainer strategy uses devcontainer up / devcontainer exec (not raw docker compose) so that features, containerEnv, and postCreateCommand from devcontainer.json are applied. The postCreateCommand should be bin/setup --skip-server.

The shared PG strategy is simpler: one PostgreSQL container shared across all worktrees, Rails runs on the host. Prefer this when the host already has Ruby (via mise/rbenv/asdf) and you want worktrees to run tests independently.

3. Modify config/database.yml to use workspace-aware names:

  • SQLite: prefix each database path with AGENT_WORKSPACE (defaults to development). See reference § config/database.yml (SQLite).
  • PostgreSQL: suffix database name with AGENT_WORKSPACE. See reference § config/database.yml (PostgreSQL).

4. If dev container = yes, create .devcontainer/agent.json extending the main devcontainer with AGENT_* env vars forwarded into the container.

5. Update CLAUDE.md with worktree workflow docs (see reference § CLAUDE.md).

6. Update README.md with the workflow (see reference § Project README).

7. Create .claude/settings.json:

{
  "permissions": {
    "allow": [
      "Bash(git worktree *)",
      "Bash(git branch *)",
      "Bash(wt *)",
      "Bash(bin/agent-*)",
      "Bash(docker compose *)",
      "Bash(devcontainer *)"
    ]
  }
}

See reference/agentic-worktrees.md for full templates, port allocation scheme, and configuration details.

3h. Verify & Commit

bin/setup
bin/rails test  # should pass with zero tests

Create initial commit:

git add -A
git commit -m "Initial Rails app with [stack summary]"

Step 4: Summary

Print a summary of what was configured:

✅ Rails app created: APP_NAME
   Database:       postgresql
   CSS:            tailwind
   View layer:     erb
   Authentication: rails (built-in)
   Authorization:  pundit
   Background:     solid_queue
   Dev container:  yes
   Testing:        minitest (always)

Next steps:
  cd APP_NAME
  bin/dev

Reference

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36.85%
按下载量换算46

Claude

27.62%
按下载量换算34

Cursor

17.07%
按下载量换算21

Gemini CLI

9.51%
按下载量换算12

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills