magic-value-elimination

Community

Eliminate magic values, name your literals.

Authoroborchers
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill eliminates "magic values" (unexplained numbers, strings, or booleans) in code, making it more readable, maintainable, and less prone to errors.

Core Features & Use Cases

  • Identify and Replace Magic Numbers: Replaces unexplained numeric literals with named constants.
  • Enforce Named Constants for Strings: Ensures string literals representing statuses, types, or categories are replaced with enums or named constants.
  • Use Case: Reviewing a codebase, you find if elapsed > 86400:. This Skill helps transform it into if elapsed > SECONDS_PER_DAY: for clarity.

Quick Start

Review the provided Python code snippet for any magic values and suggest replacements with named constants or enums.

Dependency Matrix

Required Modules

None required

Components

references

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: magic-value-elimination
Download link: https://github.com/oborchers/fractional-cto/archive/main.zip#magic-value-elimination

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.