[!IMPORTANT]
This is only for AHK v2. No v1 support.
ClautoHotkey is an AI-native AutoHotkey v2 development system. Its centerpiece is
a Claude Code harness that validates every .ahk edit, auto-loads the right rules,
and routes work to AHK-specific skills and agents — backed by a console-enabled engine,
structured knowledge modules, and an MCP docs server.
Install
Three routes. The Claude Code plugin is the one you want; OpenCode users clone.
As a Claude Code plugin (recommended)
/plugin marketplace add TrueCrimeDev/ClautoHotkey
/plugin install clautohotkey@clautohotkey
That's it. The skills, agents, rules and validation hooks now apply to your AutoHotkey
scripts wherever they live — you don't clone anything into your project, and there's
nothing to configure. On first use the harness probes the standard AutoHotkey install
locations and uses what it finds.
Point it at a specific interpreter, or opt into the +Console fork's richer diagnostics, by
dropping a harness.env in your own project root:
AHK_BIN_WIN="${WIN_HOME}\Documents\AutoHotkey\bin\AutoHotkey64.exe" # empty = auto-detect
AHK_DIAG_JSON=0 # 1 only on the +Console fork
${WIN_HOME} is your Windows profile folder, so one file works on every machine;
anything that still differs goes in harness.local.env, read after it. Every key is
optional — see harness.env.example for the full set.
As a cloned repo
If you'd rather have the files in your tree — to edit the knowledge modules, work offline,
or vendor a pinned copy:
git clone https://github.com/TrueCrimeDev/ClautoHotkey.git
cd ClautoHotkey && ./setup.sh
setup.sh writes a harness.env from the example, makes the hooks executable, and tells
you what to fill in.
Requires Git Bash or WSL, AutoHotkey v2, and jq or Python 3.8+ (without jq the
hooks fall back to the bundled hooks/_jqlite.py). Python 3 also runs the module lint
and the harness checker. ./Tools/verify.sh confirms the hooks really block a broken edit.
In OpenCode
One line in opencode.json installs it from npm:
{ "plugin": ["opencode-clautohotkey"] }
then npx opencode-clautohotkey skills copies the skills where OpenCode's skill tool
looks. Or clone and point OpenCode at the clone, which makes git pull the upgrade:
git clone https://github.com/TrueCrimeDev/ClautoHotkey.git
cd ClautoHotkey && ./opencode/install.sh # every project
./opencode/install.sh --project ~/path/to/MyScripts # or just one project
The installer adds one plugin entry to opencode.json that loads
opencode/clautohotkey.ts straight from the clone, and copies
the skills where OpenCode's skill tool finds them. The plugin registers the agents, turns
every skill into a /<name> command (/ahk-gui, /ahk-fix, /ahk-oop, …), and runs the
same hook scripts Claude Code runs: each .ahk edit is validated and a failure lands in
the tool result for the model to fix, path-scoped rules load on the first matching edit,
the interpreter guard blocks stray AutoHotkey*.exe runs, and v1 syntax in a prompt is
flagged. --project also renders an AGENTS.md and a harness.env into that project.
git pull is the upgrade; re-run the installer to refresh the skill copies.
Targets the OpenCode 1.x API (tested on 1.1.25). node opencode/selftest.mjs drives