Ruby Pro
Master Ruby Development with Expert Guidance
Ruby developers struggle with writing idiomatic code and following best practices. This skill provides expert guidance on metaprogramming, Rails patterns, and performance optimization.
تنزيل ZIP المهارة
رفع في Claude
اذهب إلى Settings → Capabilities → Skills → Upload skill
فعّل وابدأ الاستخدام
اختبرها
استخدام "Ruby Pro". Create a Ruby method to validate email format
النتيجة المتوقعة:
A reusable email validation method using regex with proper Unicode support, following Ruby naming conventions and returning boolean values.
استخدام "Ruby Pro". Optimize a slow ActiveRecord query
النتيجة المتوقعة:
Refactored query using eager loading with includes, select optimization, and database indexing recommendations to reduce N+1 queries.
استخدام "Ruby Pro". Write RSpec tests for a Rails controller
النتيجة المتوقعة:
Complete controller spec with request tests, response status assertions, JSON payload validation, and authentication edge cases.
التدقيق الأمني
آمنThis is a prompt-only skill containing instructional text for Ruby programming assistance. Static analysis scanned 0 files with 0 risk patterns detected. No executable code, network access, filesystem operations, or external command execution present. The skill provides guidance on Ruby idioms, Rails patterns, and testing practices without any security concerns.
درجة الجودة
ماذا يمكنك بناءه
Rails Application Development
Build robust Rails applications using MVC architecture, ActiveRecord patterns, and RESTful controllers.
Gem Library Creation
Develop and publish Ruby gems with proper specifications, versioning, and dependency management.
Code Quality Improvement
Refactor existing Ruby codebases to follow idioms, improve performance, and pass RuboCop analysis.
جرّب هذه الموجهات
Write a Ruby method that takes an array of integers and returns the sum of all even numbers. Follow Ruby conventions and include edge case handling.
Design an ActiveRecord model for a blog post with associations to user and comments. Include validations, scopes, and a custom instance method for generating a slug.
Create a Ruby DSL using metaprogramming that allows defining configuration options with type validation. Use class macros and method_missing appropriately.
Write a comprehensive RSpec test suite for a service class that processes payments. Include unit tests with mocks, integration tests, and edge cases for failure scenarios.
أفضل الممارسات
- Follow Ruby naming conventions: snake_case for methods, CamelCase for classes, and descriptive variable names
- Use blocks and enumerables instead of manual loops for cleaner, more expressive code
- Apply the principle of least surprise by following Ruby and Rails community conventions
تجنب
- Avoid excessive metaprogramming that makes code difficult to understand and debug
- Do not ignore return values or suppress exceptions without proper handling
- Never commit without running tests and RuboCop analysis on your changes