这是一个用于构建和核验实验仪器控制软件的 Codex Skill。它覆盖 MATLAB uifigure 与 SCPI/TCP/串口工作流,以及 Python/Tkinter 与 pyserial 工作流,重点处理采集状态、响应解析、连续扫描、数据导出和安全退出。
- 将已有仪器脚本改造成桌面 GUI。
- 排查连接、超时、读数不完整、连续采集和关闭窗口时的问题。
- 保存带采集参数的 MAT/CSV 数据,并核对绘图与导出结果。
- 对 Python GUI 进行离线自测、打包和有边界的硬件验证。
将本仓库克隆到个人 Skills 目录:
git clone https://github.com/Jerry-behappy/instrument-control-skill.git "$env:USERPROFILE\.codex\skills\instrument-control"然后在 Codex 中使用 $instrument-control,例如:
使用 $instrument-control,把现有的 SCPI 采集脚本改成可单次和连续采集的 MATLAB GUI。
SKILL.md
agents/openai.yaml
references/matlab-scpi-gui.md
references/python-tkinter-serial-gui.md
SKILL.md 给出整体工作流程。两份参考文件分别提供 MATLAB/SCPI 和 Python/Tkinter 串口 GUI 的实现与核验要点。真实仪器命令与量程必须以对应设备的官方编程手册为准;上线前应进行有边界的硬件测试。
This Codex Skill guides the development and validation of laboratory instrument-control software. It covers MATLAB uifigure applications using SCPI, TCP, or serial communication and Python/Tkinter applications using pyserial. The workflow emphasizes acquisition state, response parsing, continuous scans, data export, and reliable shutdown.
- Turn an existing instrument script into a desktop GUI.
- Diagnose connection, timeout, incomplete-read, continuous-acquisition, and shutdown issues.
- Export MAT/CSV files with acquisition settings and verify plotted and saved data.
- Run offline checks, package Python GUIs, and perform bounded hardware validation.
Clone the repository into your personal Skills directory:
git clone https://github.com/Jerry-behappy/instrument-control-skill.git "$env:USERPROFILE\.codex\skills\instrument-control"Then invoke $instrument-control in Codex, for example:
Use $instrument-control to turn my existing SCPI acquisition script into a MATLAB GUI with single and continuous acquisition.
SKILL.md
agents/openai.yaml
references/matlab-scpi-gui.md
references/python-tkinter-serial-gui.md
SKILL.md defines the overall workflow. The two reference files cover MATLAB/SCPI and Python/Tkinter serial GUI patterns. Confirm device-specific commands and ranges against the official programming manual, then validate on real hardware within agreed limits before deployment.