跳到正文
Skillpedia
API 与服务器(后端)48k · #5293

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。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/new-rails-project/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 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 timestamptz for 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 mocha gem and VCR for external services (only in the providers layer)
  • Prefer OpenStruct for mock instances
  • Only mock what's necessary

Code maintenace

  • Run bundle exec rubocop -a after significant code changes
  • Use .rubocop.yml for 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),并会告诉你如何测试代码的特定部分。

详情

作者的原始描述

Create a new Rails project

repo: sickn33/agentic-awesome-skills

热度

GitHub 星标
48k
排名
#5293
许可证
MIT
更新时间
2026/10/15

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能