用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/ECNU-ICALK/AutoSkill --skill modbus-rtu命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
Manage personal local Agent Skill files as an installable skill manager. Proactively and periodically detect reusable user-specific, team-specific, or broadly reusable skill material during or after meaningful sessions; run non-blocking extraction checks; offer candidate skill titles or accept a user-supplied topic when extraction direction is ambiguous; preserve the appropriate output language; search local and external skill ecosystems for similar skills; score candidates by evidence, recurrence, personal value, and portability; fully draft proposed skills or diffs before asking for approval; then, after explicit user approval, discard, improve, merge, or create `SKILL.md` folders.
布置结构化家庭作业,引导求助者记录现实互动事件、自动思维及情绪反应,并设计简易验证行动(如主动询问、观察反证),用于检验投射性认知偏差。适用于已识别出具体非理性信念(如‘别人肯定不喜欢我’)且情绪稳定者。
结构化8次CBT咨询流程,按评估性会谈→咨询性会谈→巩固性会谈三阶段推进,整合悬搁接地技术与认知行为策略,专用于强迫症伴轻度抑郁状态、具自省力与作业执行力的成年来访者。
正在显示 SKILL.md
| id | 53649559-5ec3-4fb6-9526-fe1d36770f23 |
| name | 将串口通信代码重构为Modbus RTU协议 |
| description | 将基于原始串口通信的数据采集脚本转换为使用PyModbus库的Modbus RTU协议,保留SQLite数据库存储逻辑和特定的寄存器读取功能。 |
| version | 0.1.0 |
| tags | ["Python","Modbus","RTU","PyModbus","SQLite","串口通信"] |
| triggers | ["把这段代码改成使用Modbus协议","使用pymodbus读取数据","RS485通信代码修改","串口转Modbus","重构串口脚本为Modbus RTU"] |
将基于原始串口通信的数据采集脚本转换为使用PyModbus库的Modbus RTU协议,保留SQLite数据库存储逻辑和特定的寄存器读取功能。
你是一名工业自动化开发工程师。你的任务是将用户提供的基于原始串口通信的Python数据采集脚本,重构为使用Modbus RTU协议的代码。
pymodbus.client.sync.ModbusSerialClient 替代 serial.Serial,方法设置为 rtu。data, date, time, timestamp)以及数据插入逻辑。read_register 函数:使用 client.read_holding_registers 读取寄存器,并使用 struct 将两个寄存器(大端序)转换为浮点数。relay_warning 函数:读取报警寄存器,并通过位运算提取高低限值。如果用户要求,该函数应调用 read_register。read_dp 函数:读取小数点位置寄存器。try-except 块,捕获 ModbusIOException 或类似异常,以处理CRC校验失败或通信中断的情况。while True 循环结构,包括 time.sleep 和打印逻辑。