Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Python固件升级与串口通讯辅助

ASecurity

专用于Python固件升级场景,处理.bin文件选择、128字节分块传输、异或取反校验计算及串口通讯逻辑。

2 stars
0 votes
0 copies
0 views
Added 9/27/2026
ai-agentspython

Security Analysis

A100/100

Scanned 9/27/2026

$npx -y skills add David-Li0406/meta-skill-evloving --skill 'python固件升级与串口通讯辅助' --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Python固件升级与串口通讯辅助?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Python固件升级与串口通讯辅助
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/david-li0406-python-cd4d48f7/badge)](https://www.skillsdirectory.com/skills/david-li0406-python-cd4d48f7)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
Files
SKILL.md
---
id: "3c433f0d-baac-4995-a5c0-1a1309aed852"
name: "Python固件升级与串口通讯辅助"
description: "专用于Python固件升级场景,处理.bin文件选择、128字节分块传输、异或取反校验计算及串口通讯逻辑。"
version: "0.1.0"
tags:
  - "python"
  - "串口通讯"
  - "固件升级"
  - "异或校验"
  - "wxpython"
triggers:
  - "python 固件升级"
  - "python 串口传输128字节"
  - "python 异或取反校验"
  - "python bin文件选择"
  - "python 蓝牙指令异或"
---

# Python固件升级与串口通讯辅助

专用于Python固件升级场景,处理.bin文件选择、128字节分块传输、异或取反校验计算及串口通讯逻辑。

## Prompt

# Role & Objective
扮演Python嵌入式开发专家,协助编写固件升级工具和串口通讯协议代码。

# Operational Rules & Constraints
1. **文件选择与处理**:使用wxPython的FileDialog时,必须设置wildcard为`"BIN files (*.bin)|*.bin"`以限制仅选择.bin文件。使用`os.path`模块获取文件名、后缀和大小。
2. **分块传输**:文件传输(特别是串口传输)必须严格按照**128字节**的固定长度进行分块读取和发送。使用二进制模式(`'rb'`)读取文件。
3. **校验和计算**:实现校验算法时,需将数据序列(字符串或字节)依次进行异或(XOR)运算,并对最终结果进行按位取反(`~`)。若结果需限制为单字节,需与`0xFF`进行按位与操作。
4. **数据转换**:提供bytes与16进制字符串互转的代码(如使用`bytes.hex()`或`binascii.hexlify`)。
5. **串口操作**:使用`pyserial`库,确保数据按128字节分块写入串口。

# Anti-Patterns
- 不要使用除128字节以外的分块大小,除非用户明确指定。
- 不要对二进制固件文件使用文本模式读取。

## Triggers

- python 固件升级
- python 串口传输128字节
- python 异或取反校验
- python bin文件选择
- python 蓝牙指令异或

Attribution

David-Li0406David-Li0406
View sourceSee grades on GitHubMore from David-Li0406 →
SSkills Directory ProSkills Directory

Get any skill into Claude in one click.

Download any skill as a ZIP for Claude.ai, Claude Desktop, or .claude/skills. $9/mo.

See Pro

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills Directory ProSkills Directory

Get any skill into Claude in one click.

Download any skill as a ZIP for Claude.ai, Claude Desktop, or .claude/skills. $9/mo.

See Pro

Related Skills

Caveman

Terse caveman voice: answer first, fluff gone, every technical fact kept. Use for /caveman, "caveman mode", "talk like caveman", "be brief", "less tokens". Stays on until "stop caveman" or "normal mode".

1100021 votes

Hyperplan

Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...

698431 votes

Writing Skills

Create and manage Claude Code skills in HASH repository following Anthropic best practices. Use when creating new skills, modifying skill-rules.json, understanding trigger patterns, working with hooks, debugging skill activation, or implementing progressive disclosure. Covers skill structure, YAML frontmatter, trigger types (keywords, intent patterns), UserPromptSubmit hook, and the 500-line rule. Includes validation and debugging with SKILL_DEBUG. Examples include rust-error-stack, cargo-dep...

3931 votes

Mcp Code Execution

Routes multi-tool workflows through MCP servers for large datasets and pipelines. Use when Bash tool overhead is limiting throughput on data-heavy tasks.

3421 votes

catchup

Recovers the conversation and failed tool calls of a previous Codex, Amp, Claude Code, Antigravity, Cline, Copilot CLI, Cursor, DeepSeek Harness, Grok Build, Kimi, OpenCode, Pi Agent, or ZCode session. Use when the user says "catch up", "what did the last session do", "get me up to speed", "I switched agents", asks to recover/summarize a previous session before continuing, or asks to diagnose or report a catchup failure. Do NOT use for the current conversation, git history, or any non-agent log.

741 votes
View all in ai-agents →