RuleStack

Configs

Stacks

Compare

Diff

RuleStack

Configs

Stacks

Compare

Diff

Read API

RuleStack

Configs

Stacks

Compare

Diff

Read API

Configs/Cursor rules/nduartex/cursor-rules-ruby-api

Cursor rule

.cursor/rules/clean_code.mdc

[object Object]

Cursor rules

Quality

38/100

Scores the file, not the repository.

Length

118 words

3 headings · 1 code blocks

Repository

0

— · pushed 480 days ago

Last changed

3 days ago

First indexed 3 days ago.
nduartex/cursor-rules-ruby-api/.cursor/rules/clean_code.mdcRawGitHub
1---
2description:
3globs: [*]
4alwaysApply: true
5---
6always print # Clean Code in the Project
7 
8## General Principles
9- Code should be **readable, maintainable, and purposeful**.
10- Avoid unnecessary comments. The code should explain itself.
11- Names of variables, methods, and classes should be **clear and semantic**.
12- Methods should be short and perform only **one specific task**.
13 
14## Key Rules
15- **No more than 20 lines per method**.
16- **No more than 2-3 parameters per method**.
17- Use `guard clauses` instead of nested `if-else`.
18- Use value objects instead of multiple parameters.
19 
20## Clean Code Example
21**❌ Bad Code**
22```ruby
23def process_order(order, user, discount, tax)
24 if order && user
25 total = order.total_price - discount + tax
26 user.update_balance(total)
27 else
28 raise 'Error'
29 end
30end
31```
32```
33 
34```

Sections

  • General Principles
  • Key Rules
  • Clean Code Example

What it covers

do-not

Glob targeting

  • *

Format

Cursor rules

The most expressive format here. Many small .mdc files, each with frontmatter declaring when it should load, so a rule about migrations only enters context when a migration is open. Costs the most to maintain and only one editor reads it.

What the corpus says about it

Repository

Owner
nduartex
Language
—
License
—
Archived
no

All configs in this repo

Also in nduartex/cursor-rules-ruby-api

Diff this repo’s formats

One repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?

The other instruction files in this repository
RepositoryFormatStackCoversScoreChanged
nduartex/cursor-rules-ruby-api.cursor/rules/api.mdc · 0Cursor rulesunclassifiedapi19/1003 days ago
nduartex/cursor-rules-ruby-api.cursor/rules/database.mdc · 0Cursor rulesunclassifiedno sections4/1003 days ago
nduartex/cursor-rules-ruby-api.cursor/rules/design_patterns.mdc · 0Cursor rulesunclassifiedstyle49/1003 days ago
nduartex/cursor-rules-ruby-api.cursor/rules/general.mdc · 0Cursor rulesunclassifieddo-not11/1003 days ago
nduartex/cursor-rules-ruby-api.cursor/rules/git.mdc · 0Cursor rulesunclassifiedstylearchtypesgit+265/1003 days ago
nduartex/cursor-rules-ruby-api.cursor/rules/ruby.mdc · 0Cursor rulesunclassifiedstyledo-not15/1003 days ago
nduartex/cursor-rules-ruby-api.cursor/rules/security.mdc · 0Cursor rulesunclassifiedsecurityapido-not32/1003 days ago
nduartex/cursor-rules-ruby-api.cursor/rules/serializers.mdc · 0Cursor rulesunclassifieddo-not52/1003 days ago
nduartex/cursor-rules-ruby-api.cursor/rules/swagger.mdc · 0Cursor rulesunclassifiedstyledocs49/1003 days ago
nduartex/cursor-rules-ruby-api.cursor/rules/testing.mdc · 0Cursor rulesunclassifiedtestdo-not15/1003 days ago
Diff against .cursor/rules/api.mdc Diff against .cursor/rules/database.mdc Diff against .cursor/rules/design_patterns.mdc Diff against .cursor/rules/general.mdc Diff against .cursor/rules/git.mdc Diff against .cursor/rules/ruby.mdc Diff against .cursor/rules/security.mdc Diff against .cursor/rules/serializers.mdc Diff against .cursor/rules/swagger.mdc Diff against .cursor/rules/testing.mdc
RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack