The nix skill relied on Claude following prose instructions to quote .# targets and add --no-link/--print-out-paths flags. The commit skill had a paragraph telling Claude to use jj instead of git in jj repos. Both are better enforced mechanically. Created pkgs/opencode-plugin/, a TypeScript package that implements three tool-use hooks as pure functions: nix (adds flags and quotes .# arguments), jj-redirect (blocks git commit in jj repos), and redundant-cwd (blocks redundant -C/-R flags). The package exports an OpenCode plugin via tool.execute.before and a Claude shim binary that adapts the same logic to Claude's stdin/stdout hook protocol. Tests (32 cases) run via node:test during the Nix build. Settings.json is generated declaratively via Home Manager pointing at the shim. OpenCode gets the plugin via opencode.json config. Test plan: - CI - Smoke-tested shim with sample Claude hook JSON input - Verified settings.json and opencode.json reference correct Nix store paths