Skip to main content
rule

dragonruby-best-practices-cursorrules-prompt-file — Cursor rule

A Cursor rule that sets Ruby coding style for DragonRuby Game Toolkit: naming, file structure, error handling.

Install into Cursor · Manually: put the files in place All methods and platforms ↓
.cursor/rules/dragonruby-best-practices-cursorrules-prompt-file.mdc
Open on GitHub

What dragonruby-best-practices-cursorrules-prompt-file does

Drop .cursor/rules/dragonruby-best-practices-cursorrules-prompt-file.mdc into your project and Cursor reads it as instructions when it writes or edits Ruby code. The file targets DragonRuby Game Toolkit specifically.

Inside are concrete requirements. Concise idiomatic Ruby, Ruby and DragonRuby conventions, object-oriented and functional patterns where they fit. Files, methods and variables use snake_case; classes and modules use CamelCase. Single quotes unless interpolation is needed, and the expressive bits of the language — unless, ||=, &. — are called out by name. Exceptions belong to exceptional cases rather than control flow, with error logging and readable messages alongside.

The rule ships with alwaysApply: false, so it does not ride along on every request. Worth checking how your Cursor build picks the file up: if the rule never fires, generated code comes back without any of these constraints. File layout is described through DragonRuby conventions rather than a fixed directory list.

What it helps with

  • keep Ruby code in one style without repeating instructions to the agent
  • agree on file, method and class naming across a DragonRuby project
  • keep exceptions out of ordinary branching logic
  • get readable error messages instead of bare raises
  • lay out files the way DragonRuby expects

Example prompts for the agent

  • add a new enemy class and follow the DragonRuby rules in .cursor/rules
  • refactor this method to snake_case and single quotes
  • check error handling in this file against the DragonRuby rule

How to install dragonruby-best-practices-cursorrules-prompt-file

Manually: put the files in place

.cursor/rules/dragonruby-best-practices-cursorrules-prompt-file.mdc

Frontmatter: description, globs, alwaysApply

Step by step, with commands for each platform: Cursor rules: .mdc files, four modes and what replaced .cursorrules

Questions about dragonruby-best-practices-cursorrules-prompt-file

How do I install dragonruby-best-practices-cursorrules-prompt-file in Cursor?

Create .cursor/rules/dragonruby-best-practices-cursorrules-prompt-file.mdc in your project root and paste the rule contents into it.

What does this rule do?

It tells Cursor how to write Ruby for DragonRuby Game Toolkit: snake_case names, CamelCase classes, single quotes, exceptions reserved for exceptional cases.

Does it apply to every file in the project?

It sets globs: **/* with alwaysApply: false, so it covers any file but is not attached automatically to every request.

Source text

dragonruby-best-practices-cursorrules-prompt-file.mdc · CC0-1.0
---
description: "Cursor rules for DragonRuby development with best practices integration."
globs: **/*
alwaysApply: false
---
You are an expert game developer in Ruby using the DragonRuby Game Toolkit.

Code Style and Structure

- Write concise, idiomatic Ruby code with accurate examples.
- Follow Ruby and DragonRuby conventions and best practices.
- Use object-oriented and functional programming patterns as appropriate.
- Prefer iteration and modularization over code duplication.
- Use descriptive variable and method names (e.g., user_signed_in?, calculate_total).
- Structure files according to DragonRuby conventions.

Naming Conventions

- Use snake_case for file names, method names, and variables.
- Use CamelCase for class and module names.
- Follow DragonRuby naming conventions.

Syntax and Formatting

- Follow the Ruby Style Guide (https://rubystyle.guide/)
- Use Ruby's expressive syntax (e.g., unless, ||=, &.)
- Prefer single quotes for strings unless interpolation is needed.

Error Handling and Validation

- Use exceptions for exceptional cases, not for control flow.
- Implement proper error logging and user-friendly messages.

Follow the official DragonRuby Game Toolkit guides for best practices in routing, controllers, models, views, and other Rails components.

© PatrickJS · CC0-1.0 · PatrickJS/awesome-cursorrules

Similar IDE rules

Everything for Game dev and 3D: Unity, Unreal, Godot, Blender →

From the same set68

how-to-documentation-cursorrules-prompt-file A Cursor rule that turns technical steps, test scripts and screenshots into step-by-step guides for non-technical users. Useful when you write How To docs for a feature. ★ 41,011repo stars graphical-apps-development-cursorrules-prompt-file A Cursor rule that feeds the agent the Pyllments context: graph-based LLM apps in Python built on Panel and Langchain. ★ 41,011repo stars flutter-development-guidelines-cursorrules-prompt-file Locks down folder layout, naming and Dart style for Flutter apps built on MVVM with Riverpod. Useful when the agent scatters files across the project. ★ 41,011repo stars embedded-stm32-hal A Cursor rule that keeps the agent inside embedded C/C++ conventions: STM32 HAL, interrupts, DMA and tight memory budgets. ★ 41,011repo stars database A Cursor rule with database practices for Prisma and Supabase: schemas, migrations, queries, RLS policies. Scoped to database files by glob. ★ 41,011repo stars cypress-defect-tracking-cursorrules-prompt-file A Cursor rule that turns the agent into a QA engineer: writes Cypress tests tagged by team, category and case ID, and builds reports through qa-shadow-report. ★ 41,011repo stars cursorrules-cursor-ai-wordpress-draft-macos-prompt A Cursor rule that describes the PressThat project: a system tray app that connects to WordPress and creates draft posts. Useful if you work on that app in Cursor. ★ 41,011repo stars cursor-ai-react-typescript-shadcn-ui-cursorrules-p A Cursor rule that pushes the agent toward React and TypeScript code written the way shadcn/ui and Tailwind CSS projects expect. ★ 41,011repo stars

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor