.claude/skills/review-constants-to-configs/SKILL.md
Find hardcoded constants that should be user-configurable via config registry
npx skillsauth add cwilliams5/Alt-Tabby review-constants-to-configsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Enter planning mode. Inventory all hardcoded constants and evaluate which should be promoted to the config registry. Use parallelism where possible.
| Command | Purpose |
|---------|---------|
| query_config.ps1 | Browse config registry — sections, groups, existing entries |
| query_config.ps1 -Usage <key> | Which files consume a config value |
Scan all src/ files (excluding src/lib/) for hardcoded constants:
TIMEOUT_MS := 5000)SetTimerCross-reference each against query_config.ps1 to confirm it's not already in the registry.
Exclude from inventory:
true/false)src/lib/ (third-party)cfg.*Not every constant belongs in config. The bar is: would an end user reasonably want to change this?
Promote to config when:
Keep as hardcoded constant when:
Keep as hardcoded but name it when:
For any constant promoted to config, specify:
query_config.ps1 for patterns)int, float, bool, string, colorUse query_config.ps1 to understand the existing section/group structure before proposing new entries. New entries should fit naturally into existing sections where possible.
Section 1 — Full inventory (all constants found, categorized):
| File | Lines | Constant | Current Value | Category |
|------|-------|----------|--------------|----------|
| gui_paint.ahk | 42 | BORDER_WIDTH | 2 | Appearance |
| gui_state.ahk | 15 | GRACE_PERIOD_MS | 150 | Timing |
Section 2 — Recommended promotions (constants → config entries):
| Constant | File | Value | Config Key | Section | Type | Min/Max | Why Configurable |
|----------|------|-------|-----------|---------|------|---------|-----------------|
| GRACE_PERIOD_MS | gui_state.ahk:15 | 150 | GracePeriodMs | [Behavior] | int | 50/500 | Users report quick Alt-Tab too sensitive |
Section 3 — Recommended naming only (magic number → named constant, not config):
| File | Lines | Current | Proposed Name | Why Not Config |
|------|-------|---------|--------------|---------------|
| foo.ahk | 88 | Sleep(50) | POLL_INTERVAL_MS := 50 | Internal polling detail |
Order promotions by user impact: settings users are likely to want first.
Ignore any existing plans — create a fresh one.
tools
Create a new git worktree and switch the session into it
tools
Spawn agent to trace code flow via query tools — answer only, no context cost
tools
Commit, push, and create a PR for the current branch
tools
Retire a shader by moving its files to legacy/shaders_retired