一键导入
kingstvis-socket
Use when running KingstVIS capture/export through SocketAPI with one explicit `capture` command and fully specified parameters.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when running KingstVIS capture/export through SocketAPI with one explicit `capture` command and fully specified parameters.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
在当前会话里按已写好的实现计划顺序执行任务时使用
在已有规格或多步骤任务需求、且在动代码之前使用。若上游 ddev-pc-test 已产出测试用例,自动走 TDD 流程:先实现测试 demo 代码(红灯),再实现被测代码(绿灯),测试覆盖不到的部分直接开发。
文档审查技能。将文档审查任务派发给独立子代理,重点审查文档基于代码改动的合理性、说明正确性、前后一致性、错漏和逻辑谬误,以及 AI 实现过程中产生的决策记录(implementation-notes.md)。当用户需要审查技术文档、spec文档、设计文档、计划文档、API文档、README 或任何与代码改动相关的文档时使用。
代码修改场景下,spec 文档确认后,需要继续以图优先方式梳理结构体定义、数据流和流程时使用
在代码修改前需要编写 spec 文档且应优先用图表达边界、入口、流程和改动关系时使用(仅限代码改动场景,非项目级架构文档初始化)
在代码实现完成后、准备结束任务或进入发布前使用,用来核对代码实现是否与 spec 文档以及 detail 文档一致,并通过代码质量审查、清理、编码规范和注释审查后给出最终验收结论
| name | kingstvis-socket |
| description | Use when running KingstVIS capture/export through SocketAPI with one explicit `capture` command and fully specified parameters. |
强制:本 skill 提供以下精确定义的工具,必须直接调用,禁止自行实现替代品。
$SKILL_ROOT = <本 skill 加载输出中 "Base directory for this skill:" 行的路径>
| 工具 | 路径 | 用途 |
|---|---|---|
| kingstvis_socket_client.py | $SKILL_ROOT/scripts/kingstvis_socket_client.py | KingstVIS SocketAPI 统一客户端(capture/connect/状态查询) |
执行逻辑分析仪抓取时,先提取 $SKILL_ROOT,再用 python "$SKILL_ROOT/scripts/kingstvis_socket_client.py" ... 调用。
Use this skill when the user wants AI-assisted KingstVIS automation through the official SocketAPI.
127.0.0.1:23367.--format csv for normal AI-assisted timing analysis..agents/cache/logic_timing_windows.csv, treat it as the primary persisted source for timing-window planning.recommended_next_window_sec for the matching test entry before falling back to a fresh manual estimate.capture_status.json、导出的 .csv、以及基于 CSV 计算的耗时摘要。capture. Do not use start, stop, export, or raw send as the normal workflow.capture command with explicit parameters..agents/cache/logic_timing_windows.csv exists and the current task can be mapped to a known test_method + test_file + test_case, read that entry first and use it to size the initial capture window.capture is a foreground blocking command. It does not return until the full capture/export flow finishes or fails.capture-bg plus capture-status or capture-wait.capture-bg, prefer passing an explicit --path for single-capture tasks so the status file records the exact exported file path deterministically.--timeout must be comfortably larger than --sample-time; otherwise the background runner may time out on the start step before export begins.connect for connectivity check.get-last-error for dedicated diagnosis after a failed run.Use the bundled client:
python agents\skills\kingstvis-socket\scripts\kingstvis_socket_client.py --help
Default output directory:
kingstvis_captures/
First verify connectivity if needed:
python agents\skills\kingstvis-socket\scripts\kingstvis_socket_client.py connect
Then run one complete capture command.
Minimal example:
python agents\skills\kingstvis-socket\scripts\kingstvis_socket_client.py capture --count 1 --format csv --output-dir kingstvis_captures
Common explicit example:
python agents\skills\kingstvis-socket\scripts\kingstvis_socket_client.py capture --count 1 --sample-rate 10000000 --sample-time 0.5 --threshold-voltage 1.65 --reset-trigger --pos-edge 0 --channels 0 1 --format csv --output-dir kingstvis_captures
Capture planning rule:
.agents/cache/logic_timing_windows.csv, first look for a matching historical record and start from its recommended_next_window_sec.capture, estimate the event duration and add margin for trigger latency, startup delay, tail latency, and possible retries.--sample-time first, confirm the waveform is complete, then tighten the window later if needed.actual_window_sec, completeness judgment, and recommended_next_window_sec for the next run.Current capture sequence inside the script is:
start -> wait --wait-after-start -> stop -> optional wait --wait-after-stop -> export
The agent should still call only capture, not the internal steps directly.
Execution semantics:
capture blocks until the whole sequence above completes.capture-bg.capture-status or capture-wait and confirm completion state before claiming success.Single capture:
python agents\skills\kingstvis-socket\scripts\kingstvis_socket_client.py capture --count 1 --format csv --output-dir kingstvis_captures
Single capture with selected channels:
python agents\skills\kingstvis-socket\scripts\kingstvis_socket_client.py capture --count 1 --channels 0 1 --format csv --output-dir kingstvis_captures
Single capture with sample and trigger settings:
python agents\skills\kingstvis-socket\scripts\kingstvis_socket_client.py capture --count 1 --sample-rate 10000000 --sample-time 0.5 --threshold-voltage 1.65 --reset-trigger --pos-edge 0 --high-level 1 2 --low-level 3 4 --channels 0 1 --format csv --output-dir kingstvis_captures
Simulated capture when hardware is unavailable:
python agents\skills\kingstvis-socket\scripts\kingstvis_socket_client.py capture --simulate --count 1 --format csv --output-dir kingstvis_captures
Multiple captures:
python agents\skills\kingstvis-socket\scripts\kingstvis_socket_client.py capture --count 3 --interval 0.5 --format csv --output-dir kingstvis_captures
If CSV export is rejected by the installed KingstVIS version:
python agents\skills\kingstvis-socket\scripts\kingstvis_socket_client.py capture --count 1 --format csv --fallback-kvdat --output-dir kingstvis_captures
If export timing is unstable after stop:
python agents\skills\kingstvis-socket\scripts\kingstvis_socket_client.py capture --count 1 --wait-after-stop 0.5 --format csv --output-dir kingstvis_captures
Background capture when later steps must continue immediately:
python agents\skills\kingstvis-socket\scripts\kingstvis_socket_client.py capture-bg --status-file kingstvis_captures\capture_status.json --count 1 --sample-rate 10000000 --sample-time 0.5 --channels 0 1 --format csv --path kingstvis_captures\capture.csv
说明:
capture-bg 现在会透传完整 capture 参数给后台 runner。sample-time 较长时,记得把全局 --timeout 一并调大,并确保明显大于 sample-time,例如 --sample-time 30 --timeout 60。--path,这样 capture_status.json 会回填:
output_pathoutput_exists--output-dir + --basename,工具会在 count=1 时自动推导输出路径,但显式 --path 仍然是首选。csv,并直接基于 CSV 做后续 AI 分析,不要求再打开 KingstVIS 应用查看。Check whether it is still running:
python agents\skills\kingstvis-socket\scripts\kingstvis_socket_client.py capture-status --status-file kingstvis_captures\capture_status.json
Wait for completion before reporting success:
python agents\skills\kingstvis-socket\scripts\kingstvis_socket_client.py capture-wait --status-file kingstvis_captures\capture_status.json --wait-timeout 60
Connectivity check:
python agents\skills\kingstvis-socket\scripts\kingstvis_socket_client.py connect
Read last error after a failed capture:
python agents\skills\kingstvis-socket\scripts\kingstvis_socket_client.py get-last-error
Do not use the commands below in normal agent workflow:
sendstartstart --simulatestopexportset-sample-rate, set-sample-time, set-triggerThose commands are implementation details or low-level diagnosis tools. Prefer putting all required parameters onto one capture command.
NAK as failure.capture command, response, output path, and whether the output file exists.capture was started in the background, report that it is still running until completion evidence is collected.NAK response or the output file actually appears.capture fails and further diagnosis is needed, run get-last-error separately.connectcapturecapture-bgcapture-statuscapture-waitget-last-error only after failure diagnosis is needed