editor
Ensures generated Ruby and Slim code follows the established codebase style and 80-character line limit.
Install
mkdir -p .claude/skills/editor-betagouv && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/10199" && unzip -o skill.zip -d .claude/skills/editor-betagouv && rm skill.zipInstalls to .claude/skills/editor-betagouv
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
when generating content for ruby or slim files, follow the style and conventions of the existing codebase. Use the existing code as a guide for formatting, naming, and structure. When asked to write new code, prefer to reuse patterns and styles already present in the codebase.Key capabilities
- →Format Ruby and Slim code to 80 characters per line
- →Apply guard clauses for early edge case handling
- →Maintain existing codebase naming and structural conventions
- →Implement column-style code layout for readability
How it works
The skill inspects existing code to identify style conventions and applies them to new content. It enforces specific line length rules and guard clause structures.
Inputs & outputs
When to use editor
- →Add new Ruby functionality
- →Implement a fix in a Slim file
- →Maintain code consistency
- →Refactor existing methods
About this skill
Editor Style Guide
- 80 characters per line length is preferred for new code.
- When generating content for ruby or slim files, follow the style and conventions of the existing code
Guard clause
Use guard clauses to handle edge cases and errors early in the method, improving readability and reducing nesting.
def example_method(param)
return unless param.valid?
# main logic here
end
Take note of the empty line after the guard clause, which helps visually separate the edge case handling from the main logic.
Goal
Produce code that can be read in a column to avoid sight hidden characters and improve readability.
When To Use
Use this skill when suggested to add code or implement functionality or feature or fix a bug:
Do not use this skill for:
- writing release notes
- generating pull request titles unless explicitly requested
- summarizing unstaged or unrelated working tree changes unless explicitly requested
Procedure
- Inspect existing code
- Identify the style and conventions used in the codebase
- Follow the identified style and conventions when generating new code
- Ensure that the generated code is formatted correctly and adheres to the identified style and conventions
Rules
- 80 character line length is preferred for new code.
Decision Rules
- If a line of code was to reach 80 characteurs, then edit a carriage return.
- If a line of code was to was to reach 150 characters, then extend the 80 characters per line rule to 120 characters perline.
Completion Checklist
- The generated code follows the style and conventions of the existing codebase.
- The generated code is formatted correctly and adheres to the identified style and conventions.
- The generated code is readable and can be read in a column without hidden characters.
When not to use it
- →Writing release notes
- →Generating pull request titles
- →Summarizing unrelated working tree changes
Limitations
- →Line length extends to 120 characters only if code reaches 150 characters
- →Requires existing code to identify style and conventions
How it compares
This skill programmatically enforces codebase-specific style and structural patterns instead of relying on generic formatting defaults.
Compared to similar skills
editor side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| editor (this skill) | 0 | 3mo | No flags | Intermediate |
| ruby-coder | 5 | 5mo | No flags | Intermediate |
| ruby-pro | 1 | 3mo | No flags | Advanced |
| skill-rails-upgrade | 1 | 3mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
ruby-coder
majesticlabs-dev
This skill guides writing of new Ruby code following modern Ruby 3.x syntax, Sandi Metz's 4 Rules for Developers, and idiomatic Ruby best practices. Use when creating new Ruby files, writing Ruby methods, or refactoring Ruby code to ensure adherence to clarity, simplicity, and maintainability standards.
ruby-pro
sickn33
Write idiomatic Ruby code with metaprogramming, Rails patterns, and performance optimization. Specializes in Ruby on Rails, gem development, and testing frameworks. Use PROACTIVELY for Ruby refactoring, optimization, or complex Ruby features.
skill-rails-upgrade
sickn33
Analyze Rails apps and provide upgrade assessments
lint
i3ringit
Use this agent when you need to run linting and code quality checks on Ruby and ERB files. Run before pushing to origin.
rspec-unit-testing-standards
ruby-git
Defines RSpec unit testing rules for this project covering structure, naming, setup patterns, stubbing, doubles, coverage, and test reliability. Use when writing, reviewing, or auditing RSpec specs under spec/unit/.
upgrade-dependencies
codenamev
Upgrade all Ruby gem dependencies to their latest versions with release note review and codebase alignment checks. Use this skill whenever the user asks to update, upgrade, or bump dependencies, gems, or packages — even casually like 'update my gems' or 'are my deps up to date?'