new-rails-project
它能做什么
这个工具可以创建一个基于 Rails 的新编程项目,并且已经配置好了 React、Vite 和 Tailwind CSS 等现代技术。它会为你准备好一切,让你可以快速开始开发。
适用场景
- ✓当你想用 Rails 开始一个新的网页项目时。
- ✓如果你需要一个已经配好 React、Vite 和 Tailwind CSS 的现成基础时。
- ✓当你希望项目一开始就配置好数据库、测试和后台任务时。
技能链接
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/new-rails-project/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“创建一个名为“my_cool_app”的新 Rails 项目。”
每周 5 个新技能,1 分钟读完。
工作原理
你只需要提供项目名称。工具会用一组特定的技术来搭建 Rails(例如用 React 做界面,用 PostgreSQL 做数据库),并确保一切就绪,你可以直接开始写代码。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Generate a new Rails project named $1 in the current directory. You may reference @CLAUDE.md for general guidance, following applicable repository/host precedence; this skill cannot override higher-priority project rules.
When to Use
- You need to bootstrap a new Rails project with the opinionated stack defined in this skill.
- The project should start with Rails, PostgreSQL, Inertia.js, React, Vite, Tailwind, Sidekiq, and Redis already planned together.
- You want setup guidance that covers project creation, conventions, testing, and verification for a fresh Rails app.
Tech Stack
Set up the following tech stack:
- Rails ~8 with PostgreSQL - Server-side framework and database
- Inertia.js ~2.3 - Bridges Rails and React for SPA-like experience without API
- React ~19.2 - Frontend UI framework
- Vite ~5 - JavaScript bundler with HMR
- Tailwind CSS ~4 - Utility-first CSS framework
- Sidekiq 8 - Background job processing with scheduled jobs via sidekiq-scheduler
- Redis - Sessions, caching, and job queue
Rails guidance
- Do not use Kamal or Docker
- Do not use Rails "solid_*" components/systems
- Development should generally match production settings where possible
- Use Redis for caching
Database
- All tables use UUID primary keys (pgcrypto extension)
- Timestamps use
timestamptzfor timezone awareness - JSONB columns for flexible metadata storage
- Comprehensive indexing strategy for performance
- Encrypted fields for sensitive data (OAuth tokens, API keys)
Background jobs
- Use Sidekiq 8 with Redis
Testing
- Always use minitest
- Use
mochagem and VCR for external services (only in the providers layer) - Prefer
OpenStructfor mock instances - Only mock what's necessary
Code maintenace
- Run
bundle exec rubocop -aafter significant code changes - Use
.rubocop.ymlfor style configuration - Security scanning with
bundle exec brakeman
Frontend
- All React components and views should be TSX
General guidance
- Reuse supplied requirements and ask only for material missing choices. Select available host tools rather than assuming AskUserQuestionTool exists.
Verify
Verify the boilerplate is working by running bin/rails server and accessing the application at http://localhost:3000 via playwright MCP.
Example
User request:
Bootstrap a new Rails project with the opinionated stack defined here and verify that the generated application runs.
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
Validate the project name and destination, refuse an existing/symlinked target, and confirm supported Ruby/Rails/Node/package peer ranges before scaffolding. Named versions are a historical stack choice, not a verified compatible lockfile. Use disposable local database/Redis instances and unique ports; do not mutate production or overwrite host services. UUID defaults and timestamp types require actual migration/schema verification. Run the generated tests, relevant security checks and a real requested application flow before claiming setup complete.
常见问题
开箱即用的技术有哪些?
Rails、PostgreSQL、Inertia.js、React、Vite、Tailwind CSS、Sidekiq 和 Redis。
什么是 Rails?
它是一个用 Ruby 编程语言构建网页应用的“框架”(也就是一套现成的工作结构)。
需要自己配置测试吗?
工具已经配置好了测试系统(minitest),并会告诉你如何测试代码的特定部分。
详情
热度
- GitHub 星标
- 48k
- 排名
- #5293
- 许可证
- MIT
- 更新时间
- 2026/10/15
评论
- …
同一仓库的更多技能
00-andruia-consultant
48k帮你的智能体启动或改进 AI 项目。它可以分析代码、推荐工具,并用西班牙语制定行动计划。
007
48k让你的智能体执行安全审计和威胁建模。它有助于保护项目免受攻击和漏洞的威胁。
10-andruia-skill-smith
48k帮你的智能体创建或改进 AI 工具。它可以定义工具的工作方式、编写文档,并验证其结构。
20-andruia-niche-intelligence
48k让你的智能体创建某个特定行业的摘要。它有助于借助可靠的信息来源,了解项目的背景、规则、使用模式和风险。