Find scattered config values and propose one source of truth

Category: Refactor · Updated 2026-09-22 · Tools: Claude Code

Use this when the same setting (a timeout, a feature flag, an API base URL, a limit) seems to be hardcoded or redefined in several different files, and changing it means hunting down every copy by hand. Best as a planning pass, since consolidating config can change runtime behavior if any of the copies had quietly drifted from each other. Small to medium usage.

Full prompt

Search this codebase for configuration values, magic numbers, and constants that appear to be hardcoded or redefined in more than one place — timeouts, URLs, feature flags, limits, retry counts, and similar. For each one, list every location it appears, its value at each location, and flag whether the values actually match everywhere or have drifted. Propose a single consolidated source of truth for each one (a config file, a constants module, environment variables — whichever fits this project's existing patterns) with a suggested name. Do not make any changes yet — hand back the plan, and specifically call out any case where the values have already drifted, since consolidating those changes actual behavior and needs a decision from me first.

Tips

Still waiting on a reset? See what to do when you hit the limit, or check Codex / Claude time since last reset.

Back to the prompt library · Subscribe: all-products feed