Agent skill

no-magic-numbers

Replace magic numbers with named constants that explain their purpose Use when enforcing code quality standards. Quality category skill.

Stars 163
Forks 31

Install this agent skill to your Project

npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/no-magic-numbers

Metadata

Additional technical details for this skill

category
Quality
priority
high
is built in
YES
session guardian id
builtin_no_magic_numbers

SKILL.md

No Magic Numbers

Replace magic numbers with named constants that explain their purpose. Instead of "if (status === 3)", use "if (status === OrderStatus.SHIPPED)". This applies to strings too—use constants for repeated string literals. The constant name serves as documentation and makes updates easier since the value is defined in one place.

Expand your agent's capabilities with these related and highly-rated skills.

Didn't find tool you were looking for?

Be as detailed as possible for better results