ovh/shai/refactoring

Claude Code and agent skill by ovh/shai

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Restructure existing code to improve readability, maintainability, and performance without changing behavior

Install

npx vskill@latest install ovh/shai/refactoring

SKILL.md

Refactoring

Purpose

Improve code quality without changing external behavior. Ensure refactoring is safe and verifiable.

Before You Start

  1. Ensure tests pass: Run cargo test to establish a baseline.
  2. Understand the code: Read the code thoroughly before making changes.
  3. Plan the refactoring: Identify what needs to change and why.

Refactoring Techniques

Extract Function
  • Move inline logic into a named function when it has a clear single responsibility.
  • Name the function after what it does, not how it does it.
Simplify Conditionals
  • Replace nested if/else chains with early returns or pattern matching.
  • Use match instead of long if/else if chains when comparing against constants.
  • Extract complex boolean expressions into named variables or helper functions.
Reduce Duplication
  • Identify repeated patterns and extract them into shared functions or macros.
  • Be careful not to over-abstract — sometimes duplication is clearer than wrong abstraction.
Improve Types
  • Replace String with &str where ownership isn't needed.
  • Use enum instead of string constants for known variants.
  • Use Option<T> instead of sentinel values like empty strings.
Module Restructuring
  • Group related functionality into modules.
  • Keep module boundaries clean — avoid circular dependencies.
  • Use pub(crate) instead of pub when possible to limit API surface.

Verification Checklist

After refactoring:

  • [ ] cargo test passes
  • [ ] cargo clippy has no new warnings
  • [ ] cargo fmt --check passes
  • [ ] No dead code introduced
  • [ ] Public API is unchanged (or document breaking changes)

Guidelines

  • Make small, incremental commits — one logical change per commit.
  • Prefer readability over cleverness.
  • Don't mix refactoring with feature changes in the same commit.
  • If unsure whether a change is safe, ask the user.
  • Document any non-obvious design decisions in comments.

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/ovh/shai/refactoring/badge)](https://verified-skill.com/skills/ovh/shai/refactoring)

Something wrong with this skill or its page? Tell us.