Install
$ agentstack add skill-zhinkgit-embeddedskills-net ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
Net Debug Skill
嵌入式网络通信调试工具,统一封装接口发现、抓包、离线分析、连通性测试、端口扫描和流量统计能力。
脚本与配置路径
- 脚本目录:
/scripts/ - 环境级配置:
/config.json(仅工具路径) - 工程级配置:
/.embeddedskills/config.json(网络参数) - 协议参考:
/references/common_protocols.json
依赖
tshark(随 Wireshark 安装,需加入 PATH)dumpcap(随 Wireshark 安装)- 可选:
capinfos - Windows 自带:
ipconfig、ping、tracert、netstat、arp、nslookup - Python 3.x (仅标准库)
- 抓包需要 Npcap 驱动,部分环境需管理员权限
配置
环境级配置 (skill/config.json)
仅保留工具路径相关的环境级配置:
{
"tshark_exe": "tshark",
"capinfos_exe": "capinfos"
}
工程级配置 (.embeddedskills/config.json)
工作区下的 .embeddedskills/config.json 存放工程级网络配置:
{
"net": {
"interface": "",
"target": "",
"capture_filter": "",
"display_filter": "",
"duration": 30,
"timeout_ms": 1000,
"scan_ports": "",
"capture_format": "pcapng",
"log_dir": ".embeddedskills/logs/net"
}
}
参数解析优先级
- CLI 参数 (
--interface,--target等) - 最高优先级 - 工程级配置 (
.embeddedskills/config.json中的net部分) - 状态文件 (
.embeddedskills/state.json中的历史记录) - 默认值 - 最低优先级
连接和采集参数按优先级解析,脚本通过 CLI 参数接收覆盖值。若配置缺少必要项或连接失败,询问用户并引导修改配置。
执行流程
- 检查
tshark是否可用;若不可用,提示用户安装 Wireshark(含 tshark)并确认已加入 PATH;若需要抓包,还需提示安装 Npcap 驱动;依赖缺失时终止执行并输出status: error及安装指引 - 按优先级解析参数:CLI > 工程级配置 > 状态文件 > 默认值;若多个来源对同一参数均有值,以更高优先级来源为准,并在输出 summary 中注明被覆盖的来源
- 若无子命令,默认执行
iface(列出网络接口) - 成功执行后,将确认的参数写回工程配置
- 运行对应脚本并输出结构化 JSON 结果
- 失败时优先提示权限、Npcap、过滤器、接口选择等问题
子命令
iface — 列出网络接口
python /scripts/net_iface.py [--filter ] [--tshark] [--json]
--tshark: 同时显示 tshark 抓包接口索引映射--filter: 按关键词筛选接口- 无副作用,可直接执行
capture — 抓包
python /scripts/net_capture.py [--interface ] [--duration ] [--capture-filter ] [--display-filter ] [--output ] [--format ] [--decode-as ] [--json]
- 接口、过滤器、时长按优先级解析
--interface: 抓包接口(覆盖配置)--duration: 抓包时长(覆盖配置)--capture-filter: BPF 抓包过滤器(覆盖配置)--display-filter: Wireshark 显示过滤器(覆盖配置)--output: 保存抓包文件路径--json: 输出 JSON Lines 格式(基于 tshark -T ek)--decode-as: 自定义解码规则- 默认格式 pcapng,参数完整后直接执行
analyze — 分析 pcap 文件
python /scripts/net_analyze.py [--mode ] [--filter ] [--top ] [--decode-as ] [--export-fields ] [--output ] [--json]
- 基于 tshark 和 capinfos 进行离线分析
--mode all输出全部分析维度- 无副作用,可直接执行
ping — 连通性测试
python /scripts/net_ping.py [--target ] [--tcp ] [--count ] [--traceroute] [--concurrent ] [--timeout ] [--json]
- 目标按优先级解析
--target: 目标地址(覆盖配置)--tcp: TCP 连通性测试(指定端口)--traceroute: 执行路由追踪--timeout: 超时毫秒数(覆盖配置)- 参数完整后直接执行
scan — 端口扫描
python /scripts/net_scan.py [--target ] [--ports ] [--timeout ] [--banner] [--concurrent ] [--json]
- 目标和端口范围按优先级解析
--target: 目标地址(覆盖配置)--ports: 端口范围,如 '80,443,8000-8100'(覆盖配置)--banner: 尝试获取服务 Banner- 默认收敛到嵌入式常用端口集
- 参数完整后直接执行
stats — 流量统计
python /scripts/net_stats.py [--interface ] [--duration ] [--display-filter ] [--interval ] [--mode ] [--json]
- 接口和时长按优先级解析
--interface: 抓包接口(覆盖配置)--duration: 统计时长(覆盖配置)--display-filter: Wireshark 显示过滤器(覆盖配置)- 默认输出按时段汇总的 JSON
- 无副作用,可直接执行
输出格式
所有脚本输出统一的 JSON 结构:
{
"status": "ok",
"action": "",
"summary": "",
"details": { ... }
}
错误时:
{
"status": "error",
"action": "",
"error": {
"code": "",
"message": ""
}
}
capture --json 输出 JSON Lines,进度信息写入 stderr。
交互策略
- 按优先级解析参数:CLI > 工程级配置 > 状态文件 > 默认值
- 优先用解析后的参数直接执行,不额外询问
- 连接失败时再询问用户并引导修改配置
- 成功执行后,确认的参数自动写回
.embeddedskills/config.json - 未给扫描范围时默认收敛到单主机、小范围端口
- 结果中明确回显目标范围、过滤器和持续时间
- 抓包结果优先总结异常协议、重传、RST 等
- 抓包失败优先提示权限和 Npcap 问题
协议参考
需要查询嵌入式常用端口和协议映射时,读取 references/common_protocols.json。
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: zhinkgit
- Source: zhinkgit/embeddedskills
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.