Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add rules/wintermeyer/cursor-rails-rules/testing-languagegit clone --depth 1 https://github.com/wintermeyer/cursor-rails-rulesWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00000 | $0.01537 |
| Opus 5 | $0.00000 | $0.00768 |
| Sonnet 5 | $0.00000 | $0.00307 |
| Haiku 4.5 | $0.00000 | $0.00154 |
Grade A, and why
testing-language scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 251 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Testing Language Standards
Standards for language handling in tests
Configuration
- Test Environment Setup
# test/test_helper.rb
module ActiveSupport
class TestCase
# Run tests in parallel
parallelize(workers: :number_of_processors)
# Include FactoryBot syntax methods
include FactoryBot::Syntax::Methods
# Force English locale for all tests
setup do
I18n.locale = :en
I18n.default_locale = :en
Rails.application.config.i18n.default_locale = :en
Rails.application.config.i18n.locale = :en
Rails.application.config.i18n.available_locales = [:en, :de]
end
teardown do
I18n.locale = :en
end
end
end
- Application Controller
# app/controllers/application_controller.rb
class ApplicationController < ActionController::Base
before_action :set_locale
private
def set_locale
return if Rails.env.test? # Skip locale detection in test environment
I18n.locale = extract_locale_from_accept_language_header || I18n.default_locale
end
end
Factory Setup
- User Factory
# test/factories/users.rb
FactoryBot.define do
factory :user do
first_name { Faker::Name.first_name }
last_name { Faker::Name.last_name }
email { Faker::Internet.email }
password { "password123" }
lang { "en" } # Default to English
trait :german do
lang { "de" }
after(:build) do |user|
# Use German Faker data for consistency
Faker::Config.locale = "de"
user.first_name = Faker::Name.first_name
user.last_name = Faker::Name.last_name
Faker::Config.locale = "en" # Reset to English
end
end
end
end
Testing Guidelines
- Translation Testing
# test/models/article_test.rb
class ArticleTest < ActiveSupport::TestCase
test "article title is translated" do
article = create(:article, title_en: "English Title", title_de: "Deutscher Titel")
# Always test English first
assert_equal "English Title", article.title
# Test other languages explicitly
I18n.with_locale(:de) do
assert_equal "Deutscher Titel", article.title
end
# Reset to English
assert_equal "English Title", article.title
end
end
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- yesterday First seen · 251 lines · 0 tokens per session scan A f7c921f54585
testing-language is a cursor rule published in the GitHub repository wintermeyer/cursor-rails-rules (37 stars, last pushed 1y ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,537 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other cursor rules, from other repositories
internationalization
Cursor rule "internationalization" from dtyq/magic, covering internationalization (i18n) rules, 国际化基本规范, 1. 文件结构, 2. 命名空间规范 and 3. 组件中使用国际化.
07-datagen
IF 生成物品/方块模型 JSON → 手动编写 JSON 在 src/main/resources/assets/{modid}/models/.
test-plan
Plan Katalon True Platform/TestOps testing for a release, sprint, or feature. Use when you need to translate quality goals into scope, prioritize testing by requirement coverage and risk, decide what to test first, or build the executable plan structure (folders, suites, and sprint/release association) that stands in…
wings
Authoring apps with the WINGS framework (Go compiled to WASM web components).
project-status
PriceGrab shipped state and product backlog (read first).
architecture
Architectural and cross-package changes — dependency direction, editor/runtime boundaries, scene schema, persistence, renderer packages. Use when changing package boundaries, serialized formats, or multiple layers. Do not apply to localized UI, styling, or test-only edits.