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.zip

Installs 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.
277 chars✓ has a “when” triggerlonger than Claude Code's old 250-char listing cap (fine on current versions)
Intermediate

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

You give it
A request to add code, implement a feature, or fix a bug in Ruby or Slim files
You get back
Code formatted according to existing style conventions and guard clause patterns

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

  1. Inspect existing code
  2. Identify the style and conventions used in the codebase
  3. Follow the identified style and conventions when generating new code
  4. 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.

SkillInstallsUpdatedSafetyDifficulty
editor (this skill)04moNo flagsIntermediate
ruby-coder55moNo flagsIntermediate
ruby-pro14moNo flagsAdvanced
skill-rails-upgrade13moReviewIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

Search skills

Search the agent skills registry