一键导入
rails-code-quality
RuboCop metrics, Brakeman security, code style conventions, and quality checks for this Rails codebase
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
RuboCop metrics, Brakeman security, code style conventions, and quality checks for this Rails codebase
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Create, execute, update, and complete implementation plans and trackers following Linkvan API conventions
Standardized Ruby gem update workflow with version checking, breaking change analysis, security advisory detection, and testing
Controller patterns, service delegation, strong parameters, and HTTP conventions for this Rails codebase
Database migration patterns, reversible migrations, indexes, and conventions for this Rails codebase
ActiveRecord model patterns, validations, scopes, and conventions for this Rails codebase
RSpec testing patterns, conventions, and test commands for this Rails codebase
| name | rails-code-quality |
| description | RuboCop metrics, Brakeman security, code style conventions, and quality checks for this Rails codebase |
bin/rubocop # Lint Ruby code
bin/rubocop -a # Auto-fix issues
bin/brakeman # Security scan
# frozen_string_literal: true{ a: 1 } not { :a => 1 }&&/|| instead of and/ordef my_method(arg) not def my_method argMAX_ATTEMPTS = 5.freeze
STATUS_CLASSES = {
active: "success",
pending: "warning"
}.freeze
These metrics are enforced by RuboCop in this codebase:
# Check all code
bin/rubocop
# Check specific file
bin/rubocop app/models/facility.rb
# Auto-fix issues
bin/rubocop -a
# Auto-fix with safety level
bin/rubocop -a --safe
# Security scan
bin/brakeman
# Check for warnings only
bin/brakeman --no-pager --no-highlight --skip-warning-list
bin/rubocop to see issuesbin/rubocop -a to auto-fixbin/rubocop again to verifybin/brakeman regularlyFacility)FacilitiesController)Facilities::CardComponent)FacilitySerializer)factory :name (e.g., factory :facility)facility_spec.rb)STATUS_CLASSES)raise for programmer errorsResult.new(errors: [...]) for service object validation failuresbegin/rescue blocks when necessaryAlways run before committing:
# Run tests
bin/rspec
# Run linter
bin/rubocop
# Run security scan
bin/brakeman
# Fix auto-fixable issues
bin/rubocop -a