MCPInstall

can-debug

当需要调试 CAN 总线通信时使用,支持通过 USB-CAN 适配器监听、发送 CAN 帧和扫描节点。

Installs
554
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/leokemp223/embed-ai-tool --skill can-debug
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads can-debug automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

CAN 总线调试

适用场景

  • 嵌入式设备实现了 CAN 通信,需要验证收发是否正常。
  • 需要监听 CAN 总线上的所有帧或过滤特定 ID。
  • 需要向 CAN 总线发送测试帧并等待响应。
  • 需要扫描总线上的活跃节点。

必要输入

  • CAN 接口类型(pcan、kvaser、slcan、socketcan、virtual 等)。
  • 通道名(取决于接口类型,如 PCAN_USBBUS1、COM3、can0)。
  • 波特率(默认 500000)。

依赖

  • python-can(pip install python-can)
  • 对应适配器的驱动(如 PCAN 需要 PCAN-Basic API)

执行步骤

  1. 先阅读 references/usage.md,确认操作参数。
  2. 探测环境:
    python scripts/can_tool.py --detect
    
  3. 根据需求执行操作:
    # 监听总线
    python scripts/can_tool.py --interface pcan --channel PCAN_USBBUS1 --listen --duration 10
    
    # 发送帧
    python scripts/can_tool.py --interface pcan --channel PCAN_USBBUS1 --send --id 0x123 --data 01,02,03
    
    # 扫描节点
    python scripts/can_tool.py --interface pcan --channel PCAN_USBBUS1 --scan --scan-range 0x001-0x0FF
    

失败分流

  • connection-failure:适配器未连接或驱动未安装。
  • bus-error:CAN 总线错误(如未接终端电阻)。
  • timeout:发送后无响应。

输出约定

示例输出格式:

结果: ✅ 监听完成,收到 15 帧
  连接: pcan PCAN_USBBUS1 500000

  [14:30:01] 0x123  [8]  01 02 03 04 05 06 07 08
  [14:30:01] 0x456  [4]  AA BB CC DD

交接关系

  • 从 build-keil / build-platformio 烧录固件后,用此 skill 验证 CAN 通信。
  • 与 serial-monitor 互补:serial-monitor 查看串口调试输出,can-debug 进行 CAN 协议级调试。

FAQ

What does the can-debug skill do?

当需要调试 CAN 总线通信时使用,支持通过 USB-CAN 适配器监听、发送 CAN 帧和扫描节点。

How do I install can-debug?

Run npx skills add https://github.com/leokemp223/embed-ai-tool --skill can-debug in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/can-debug/ (personal) or .claude/skills/can-debug/ (project).

Which AI agents can use can-debug?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is can-debug safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains can-debug?

It is published by leokemp223 in leokemp223/embed-ai-tool. It has 554 recorded installs.

More from leokemp223/embed-ai-tool

View all →

serial-monitor

leokemp223/embed-ai-tool

当需要识别正确串口、调用自带脚本抓取日志,并分析嵌入式固件运行状态时使用。

585 installs

build-keil

leokemp223/embed-ai-tool

当需要通过 Keil MDK 命令行编译嵌入式工程,调用自带脚本解析工程文件、执行构建并定位固件产物时使用。

572 installs

build-platformio

leokemp223/embed-ai-tool

当需要通过 PlatformIO 命令行编译嵌入式工程,调用自带脚本解析环境配置、执行构建并定位固件产物时使用。

568 installs

workflow

leokemp223/embed-ai-tool

当需要串联多个 skill 完成编译+烧录+监控或编译+烧录+调试等流水线任务时使用。

flash-keil

leokemp223/embed-ai-tool

当需要通过 Keil MDK 内置调试器烧录固件到目标板时使用,利用工程中已配置的调试器和 Flash 算法执行下载。

566 installs

build-cmake

leokemp223/embed-ai-tool

当需要配置或构建基于 CMake 的嵌入式固件工程,调用自带脚本执行构建并定位固件产物时使用。

564 installs

Popular code quality & workflow skills

View category →

grill-me

mattpocock/skills

A relentless interview to sharpen a plan or design.

Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.

handoff

mattpocock/skills

Compact the current conversation into a handoff document for another agent to pick up.

domain-modeling

mattpocock/skills

Build and sharpen a project's domain model. Use when discussing codebase terminology, writing or editing a GLOSSARY.md, or recording or editing an ADR.

codebase-design

mattpocock/skills

Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.

diagnosing-bugs

mattpocock/skills

Diagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow.