/clautohotkey:ahk-convertfrom clautohotkey
Converts AutoHotkey v1 code to v2 syntax, handling commands-to-functions, GUI rewrites, object model updates, and loop changes. Triggered by migration requests.
Ships in clautohotkey. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Convert AutoHotkey v1 code to v2 syntax.
/ahk-convert <code_or_file> — converts v1 code to v2.
Apply these transformations in order:
- MsgBox, Hello World
+ MsgBox("Hello World")
- MsgBox, 4, Title, Text
+ result := MsgBox("Text", "Title", 4)
- InputBox, output, Title, Prompt
+ output := InputBox("Prompt", "Title")
- FileRead, content, file.txt
+ content := FileRead("file.txt")
- FileAppend, text, file.txt
+ FileAppend("text", "file.txt")
- Run, notepad.exe
+ Run("notepad.exe")
- Sleep, 1000
+ Sleep(1000)
- SetTimer, Label, 1000
+ SetTimer(Label, 1000)
- IfExist, file.txt
+ if FileExist("file.txt")
- StringReplace, output, input, old, new, All
+ output := StrReplace(input, "old", "new")
- StringLeft, output, input, 5
+ output := SubStr(input, 1, 5)
- StringMid, output, input, 3, 5
+ output := SubStr(input, 3, 5)
- StringLen, length, input
+ length := StrLen(input)
- x = literal string
+ x := "literal string"
- x := %varName%
+ x := %varName% ; (dynamic ref — use variable directly)
- if (x = "text") ; case-insensitive
+ if (x = "text") ; still case-insensitive in v2
- if x between 1 and 10
+ if (x >= 1 && x <= 10)
- Transform, output, HTML, %input%
+ ; No direct equivalent, use StrReplace chain
- Gui, Add, Text,, Hello
- Gui, Add, Edit, vMyEdit w200
- Gui, Add, Button, gBtnClick, OK
- Gui, Show, w300 h200, My Window
+ myGui := Gui(, "My Window")
+ myGui.AddText(, "Hello")
+ myGui.AddEdit("w200 vMyEdit")
+ myGui.AddButton(, "OK").OnEvent("Click", BtnClick)
+ myGui.Show("w300 h200")
- Gui, Submit
+ saved := myGui.Submit()
- GuiControl,, MyEdit, new text
+ myGui["MyEdit"].Value := "new text"
- obj := new MyClass()
+ obj := MyClass()
- obj := ComObjCreate("Excel.Application")
+ obj := ComObject("Excel.Application")
- obj := {key: "value"} ; as data store
+ obj := Map() ; use Map for data
+ obj["key"] := "value"
- for key, val in obj
+ for key, val in obj ; same syntax but Map uses different iteration
- Loop, Parse, text, `,
+ Loop Parse, text, ","
- Loop, Read, file.txt
+ Loop Read, "file.txt"
- Loop, Files, *.txt
+ Loop Files, "*.txt"
- Loop, 10
+ Loop 10
- #IfWinActive, ahk_exe notepad.exe
+ #HotIf WinActive("ahk_exe notepad.exe")
- #IfWinActive
+ #HotIf
- Hotkey, ^a, MyLabel
+ Hotkey("^a", MyFunc)
- try
- something()
- catch e
- MsgBox % e.Message
+ try
+ something()
+ catch as e
+ MsgBox(e.Message)
#Requires AutoHotkey v2.1-alpha.30 at top#SingleInstance Force if not presentcheck /Diag=json#Requires AutoHotkey v2.1-alpha.30 to converted outputcheck before returningWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub truecrimedev/clautohotkey --plugin clautohotkey19 skills in this plugin
/ahk-audit-errorsAudit AHK v2 code for silent failures and inadequate error handling. Hunts for empty catch blocks, swallowed errors, broad bare-catches that hide unrelated failures, and fallbacks that mask problems from the user. TRIGGER when: user says "audit errors", "check error handling", "find silent failures", "review error handling", "scan for swallowed errors", "empty catch blocks", "/ahk-audit-errors".
/ahk-comCOM automation and interop for AHK v2 — driving Excel / Word / WMI / Internet Explorer via IDispatch, COM events, ComValue / SafeArrays, and direct vtable ComCall. Use when automating another application, wiring COM events, or calling a COM interface. TRIGGER when: user says "automate Excel/Word", "COM object", "ComObject", "ComCall", "WMI query", "COM event", "IDispatch", "SafeArray", "ComValue", "VARIANT". Examples: "automate Excel from AHK", "query WMI for processes", "hook IE navigation events"
/ahk-debug-dashboardShow a compact debug state dashboard during an active debugging session. Queries MCP resources for connection status, breakpoints, variables, and call stack. TRIGGER when: user says "debug dashboard", "show debug state", "debug status", "what's the debugger showing", "debug overview".
/ahk-dllcallNative calls and raw memory for AHK v2 — DllCall to Windows/native APIs, Buffer + NumGet/NumPut for structs, StrPut/StrGet, CallbackCreate, and the alpha.30 typed Struct. Use when calling a DLL/WinAPI function, building or reading a struct, or passing a callback to native code. TRIGGER when: user says "DllCall", "call a Windows API", "Buffer", "NumPut/NumGet", "struct", "pointer", "CallbackCreate", "StrGet/StrPut", "marshal", "user32/kernel32". Examples: "call GetCursorPos", "build a RECT struct", "pass a callback to EnumWindows"
/ahk-docsSearch AHK v2 documentation for a function, method, directive, or concept. Returns relevant documentation excerpts with syntax and examples. TRIGGER when: user says "docs for", "how does X work in AHK", "AHK docs", "look up", "what is the syntax for", "documentation".
/ahk-evalLive AHK v2 REPL backed by the fork's native repl subcommand. Execute AHK expressions and get immediate results without writing a multi-line script. Use when testing snippets, checking syntax, or evaluating expressions without creating files. TRIGGER when: user says "eval", "try this expression", "what does X return", "test this snippet", "run this AHK code", "check if this works". Examples: "/ahk-eval StrSplit('a,b,c', ',').Length" returns "3"
Other plugins' skills for the same job