.claude/skills/review-ahk2/SKILL.md
Scan for AHK v1 patterns that slipped into the v2 codebase
npx skillsauth add cwilliams5/Alt-Tabby review-ahk2Install 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. Deep-scan all source files for AHK v1 patterns that don't belong in a v2 codebase. Use maximum parallelism — spawn explore agents for independent areas.
LLMs are trained on far more AHK v1 code than v2. This means v1 patterns can slip in during AI-assisted development — they often compile and even run, but with subtly wrong behavior. This review catches those.
Before scanning, gather the full v1→v2 migration surface:
.claude/rules/ahk-patterns.md for known project-specific v2 rules and past mistakesThese are the most frequent offenders (not exhaustive — the web search in Step 1 may surface more):
Func("Name") instead of direct function reference FuncName (v1 pattern for callbacks/timers)%variable% dereferencing instead of just variable (v1 legacy syntax):= vs = confusion — v2 uses := for all assignments; = is comparison onlyIf var = instead of If (var =) or If var == — v1's loose comparison syntax. instead of space or explicit . (context-dependent)Return value instead of return value (cosmetic but signals v1 habits)MsgBox, text (v1 command) instead of MsgBox(text) (v2 function)SetTimer, Label (v1 label) instead of SetTimer(FuncRef) (v2 function ref)Gui, Add (v1 command) instead of myGui.Add() (v2 object)IfWinExist (v1 command) instead of WinExist() (v2 function)StringReplace / StringSplit (v1) instead of StrReplace() / StrSplit() (v2)SubStr(str, 1, 1) is fine in both, but StringLeft / StringMid are v1-onlylocal keyword used unnecessarily — v2 functions default to localglobal declaration#Warn differences between v1 and v2Object.Insert() (v1) instead of Object.Push() / Map.Set() (v2)Object.Remove() (v1) instead of Array.RemoveAt() / Map.Delete() (v2)Array[0] — v2 arrays are 1-based by defaultnew ClassName() (v1) instead of ClassName() (v2 — new was removed)__New / __Delete patterns that don't match v2 class syntax< / > for string comparison — v2 should use StrCompare() (project rule)== is case-sensitive in v2 (was case-insensitive in v1)!= vs !== awarenessSplit the codebase for parallel scanning:
src/gui/ — GUI rendering, state machine, overlay, inputsrc/core/ — Producers (WinEventHook, Komorebi, pumps)src/shared/ — Window list, config, IPC, blacklist, theme, statssrc/editors/ — Config/blacklist editorssrc/pump/ — EnrichmentPump subprocesssrc/ files — Entry points, launcher, installation, updateExclude src/lib/ (third-party code).
Each explore agent should scan for ALL checklist patterns within its zone, not just one pattern at a time.
Use query_function_visibility.ps1 <funcName> to validate whether flagged function call patterns are v1 or v2 — it shows all callers and the definition site, confirming whether indirect references (timers, callbacks) use v1 string syntax or v2 direct refs.
Many v1-looking patterns may actually be correct v2 code. AHK v2 kept some syntax from v1. Validate every finding yourself before including it in the plan.
For each candidate:
file.ahk lines X–Y" with the actual code quoted.return without parens is fine in v2).Group by impact (wrong behavior > silent difference > purely stylistic):
| File | Lines | v1 Pattern | Correct v2 | Impact | Evidence |
|------|-------|-----------|------------|--------|---------|
| file.ahk | 42 | Func("MyHandler") | MyHandler (direct ref) | Wrong — creates string, not func ref | Verified lines 40–45 |
Note which findings are also candidates for a new static analysis check (if a v1 pattern can be caught by regex, it could become a check_batch_*.ps1 sub-check to prevent recurrence).
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