pywayne-gui

pywayne-gui is a skill for Claude Code, Codex from wangyendt/wayne-skills. It costs 60 tokens per session (1,710 once invoked), scanned A, original, MIT.

A Python toolkit for controlling Windows desktop windows and keyboard input. It can register keyboard shortcuts, listen for them, find windows, and perform GUI actions.

In plain words
What is it for?
Use it to start actions with global keyboard shortcuts, listen for key combinations, control application windows, and automate keyboard and mouse tasks on Windows.
Why use it?
It avoids requiring someone to repeat desktop actions by hand. It provides one place to connect hotkeys and automation code to Windows applications.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/wangyendt/wayne-skills/gui
Any agent
npx skills add wangyendt/wayne-skills --skill gui
Clone the repo
git clone --depth 1 https://github.com/wangyendt/wayne-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for pywayne-gui

README.md
[![agentmods](https://agentmods.dev/badge/skills/wangyendt/wayne-skills/gui.svg)](https://agentmods.dev/skills/wangyendt/wayne-skills/gui)
Your own site
<a href="https://agentmods.dev/skills/wangyendt/wayne-skills/gui"><img src="https://agentmods.dev/badge/skills/wangyendt/wayne-skills/gui.svg" alt="Measured on agentmods" height="20"></a>
Per session 60 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,710 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00060 $0.01710
Opus 5 $0.00030 $0.00855
Sonnet 5 $0.00012 $0.00342
Haiku 4.5 $0.00006 $0.00171

Measured 5d ago against content hash 9e899738063d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

pywayne-gui scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

pywayne/gui/SKILL.md · 282 lines

How it starts

The opening of the file, as written. The whole thing — 282 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Pywayne Gui

Windows 图形用户界面自动化工具,提供全局热键监听和窗口操作功能。

Quick Start

from pywayne.gui import GlobalHotKeys, GuiOperation

# 全局热键
g = GlobalHotKeys()

@g.register(GlobalHotKeys.VK_F1, GlobalHotKeys.MOD_SHIFT)
def shift_f1():
    print('Shift+F1 被按下')

# 启动监听(按 Q 或 Ctrl+C 退出)
GlobalHotKeys.listen()

Dependencies

用途 安装命令
pywin32 Windows API 封装 pip install pywin32
pyuserinput 键盘鼠标输入 pip install pyuserinput
pyautogui GUI 自动化 pip install pyautogui

GlobalHotKeys - 全局热键

注册全局热键,在全局范围内监听键盘事件。

注册热键

from pywayne.gui import GlobalHotKeys

g = GlobalHotKeys()

# 装饰器方式注册
@g.register(GlobalHotKeys.VK_F1, GlobalHotKeys.MOD_SHIFT)
def shift_f1():
    print('Shift+F1')

# 组合键修饰符(支持组合使用)
g.register(GlobalHotKeys.VK_F1, GlobalHotKeys.MOD_CTRL | GlobalHotKeys.MOD_SHIFT)

# 直接调用 register 方法
def handler():
    print('Ctrl+A 被按下')
GlobalHotKeys.register(GlobalHotKeys.VK_A, GlobalHotKeys.MOD_CTRL, handler)

启动监听

# 启动消息循环,开始监听热键
GlobalHotKeys.listen()

停止条件

按以下任意组合键会停止监听循环:

  • Q
  • Ctrl + C

虚拟键码

常用虚拟键码VK_*):

按键 键码 组合键
A-Z VK_AVK_Z ord('A')ord('Z')
0-9 VK_0VK_9 ord('0')ord('9')
F1-F12 VK_F1VK_F12 -

修饰键MOD_*):

修饰键 常量
Alt MOD_ALT
Ctrl MOD_CTRL
Shift MOD_SHIFT
Win MOD_WIN

修饰键可使用 | 组合,如 MOD_CTRL | MOD_SHIFT

GuiOperation - 窗口操作

提供 Windows 窗口查找、控制和操作功能。

初始化

from pywayne.gui import GuiOperation

gui = GuiOperation()

find_window

查找包含指定关键字的窗口,返回窗口句柄列表。

# 查找包含"记事本"的窗口
notepad_handles = gui.find_window('记事本')

# 查找包含"微信"的窗口
wechat_handles = gui.find_window('微信')

# 多关键字匹配
handles = gui.find_window('Visual', 'Studio')

参数说明

  • *keys: 按关键字匹配窗口标题

返回值

  • 匹配的窗口句柄列表(hwnd
  • 未找到时返回空列表

get_windows_attr

获取指定窗口的属性信息。

hwnd = gui.find_window('记事本')[0]
title, class_name = gui.get_windows_attr(hwnd)
print(f"窗口标题: {title}")
print(f"窗口类名: {class_name}")

Read the full file on GitHub · 282 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 282 lines · 60 tokens per session scan A 9e899738063d

Subscribe to this mod's changes

pywayne-gui is a skill published in the GitHub repository wangyendt/wayne-skills (8 stars, last pushed 8d ago), licensed MIT. It adds 60 tokens to every session and 1,710 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

chronicle

Analyze Copilot session history for standup reports, usage tips, session search, and session reindexing. Use when the user asks for a standup, daily summary, usage tips, workflow recommendations, wants to search or find past sessions by keyword/file/PR, wants to reindex their session store, or asks about deleting…

microsoft/vscode · 72 tokens

imagegen

Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, or transparent-background cutouts. Use when Codex should create a brand-new image, transform an existing image, or derive visual variants from references, and the output…

openai/codex · 113 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens