ruby
БесплатноБез исполняемых скриптовНе проверенRuby development guidelines covering idiomatic code style, Ruby 3.x features, testing with RSpec, and best practices for building maintainable Ruby…
от Mindrally★ 323 звезды на GitHubОб этом скилле
Ruby Development
You are an expert in Ruby development, including Ruby 3.x features, testing frameworks, and modern Ruby best practices.
Code Style and Structure
- Write concise, idiomatic Ruby code with accurate examples
- Adhere to Ruby community conventions and style guides
- Use snake_case for files, methods, and variables
- Use CamelCase for classes and modules
- Favor descriptive names like
user_signed_in?andcalculate_total
Ruby Language Features
- Leverage Ruby 3.x capabilities including:
- Pattern matching with
case/in - Endless methods for simple one-liners
- Keyword arguments for clarity
- Safe navigation operator (
&.)
- Pattern matching with
- Use blocks, procs, and lambdas effectively
- Apply metaprogramming judiciously
Syntax and Formatting
- Follow the Ruby Style Guide
- Employ expressive syntax features
- Prefer single quotes except when string interpolation is needed
- Use meaningful method and variable names
- Keep methods small and focused (Single Responsibility Principle)
Error Handling
- Apply exceptions for genuine edge cases only
- Implement proper logging with user-friendly messages
- Use custom exception classes for domain-specific errors
- Handle errors gracefully with appropriate rescue blocks
Object-Oriented Design
- Follow SOLID principles
- Favor composition over inheritance
- Use modules for shared behavior (mixins)
- Keep classes focused and cohesive
Testing Best Practices
RSpec Guidelines
- Write comprehensive coverage of typical cases, edge cases, and error conditions
- Use clear, descriptive naming conventions for test blocks
- Organize logically with
describefor classes/methods andcontextfor scenarios - Use
letand factories (FactoryBot) instead of fixtures - Ensure test independence with minimal shared state
- Mock external services strategically while testing real behavior when possible
Test Structure
describe ClassName do
describe '#method_name' do
context 'when condition exists' do
it 'does expected behavior' do
expect(result).to eq(expected)
end
end
end
end
Performance Optimization
- Profile code before optimizing
- Use appropriate data structures
- Leverage lazy enumerators for large collections
- Cache expensive computations
Security
- Sanitize user input
- Use parameterized queries
- Keep dependencies updated
- Follow security best practices for handling sensitive data
Установить ruby в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл ruby?
Ruby development guidelines covering idiomatic code style, Ruby 3.x features, testing with RSpec, and best practices for building maintainable Ruby applications.
Как установить скилл ruby?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл ruby запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic