centralize-config

Centralize duplicated configuration values into a single canonical definition.

Updated Mar 8, 2026
One-click install
npx skills add https://github.com/luyzkk/Anti-Vibe-Coding --skill centralize-config
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: centralize-config
Source: https://github.com/luyzkk/Anti-Vibe-Coding/tree/main/skills/centralize-config
Command: npx skills add https://github.com/luyzkk/Anti-Vibe-Coding --skill centralize-config

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It removes configuration sprawl by finding duplicated or hardcoded values and migrating them into a single, canonical source of truth to prevent inconsistent behavior and missed updates.

Core Features & Use Cases

  • Detects scattered configuration: searches for a provided string or pattern across code to locate hardcoded occurrences.
  • Maps and validates before changing: inspects nearby context for each match and asks for confirmation so only truly equivalent configs are centralized.
  • Performs safe, targeted substitution: replaces occurrences with imports of a constant (typically TypeScript/JS) one by one to avoid broken syntax.
  • Verifies via grep and tests: checks that the original literals are gone and runs the test suite to ensure the refactor didn’t break behavior.

Quick Start

Ask it to centralize a value by running: /anti-vibe-coding:centralize-config claude-sonnet-4-5

Frequently Asked Questions about centralize-config

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I centralize hardcoded configuration values scattered across TypeScript files?

To centralize hardcoded configuration values across TypeScript files, you map each scattered occurrence, validate its context interactively, and replace it with a shared constant import. This refactoring process ends with a grep check and test execution to verify no syntax broke.

What is the safest way to refactor duplicated strings into a single config source?

The safest way to refactor duplicated strings into a single config source is a detect-to-map-to-centralize-to-replace flow. It requires interactive confirmation before substituting hardcoded values with constants, ensuring only truly equivalent configs are centralized without breaking syntax.

Can I use grep and test verification to check my config refactoring?

Yes, you can use grep and test verification to check config refactoring. After replacing hardcoded values with a centralized constant, grep confirms the original literals are completely gone, and running the test suite ensures the changes did not break existing behavior.

Does config centralization work without breaking syntax in JavaScript codebases?

Config centralization works without breaking syntax in JavaScript codebases by replacing occurrences one by one with imports of a constant. It maps and validates nearby context for each match before changing anything, preventing incorrect substitutions.

When do I need to centralize duplicated config into a single source?

You need to centralize duplicated config into a single source when hardcoded values or repeated constants cause configuration sprawl across your codebase. This prevents inconsistent behavior and missed updates by migrating values into a canonical source of truth.