skills/pna/SKILL.md
Controls the Rohde & Schwarz Phase Noise Analyzer via REST API. Use this skill when the user wants to measure phase noise, start PNA sweeps, check instrument health, or read frequency-domain data. Triggers include: "PNA", "phase noise", "sweep", "measure noise", "start measurement", "/measure/", "/health/". Also use when user mentions "Rohde & Schwarz", "spectrum", "PNR", or asks about "carrier suppression", "SSB phase noise". Do NOT use for general network requests unrelated to PNA instruments.
npx skillsauth add Plan1014/LabPilot pnaInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill when working with PNA (Phase Noise Analyzer) measurements.
The PNA service controls a Rohde & Schwarz Phase Noise Analyzer. It maintains a persistent long-lived connection to the instrument — connected at service startup and held until shutdown.
The PNA service must be running before starting measurements.
If the service is not running, Agent must start it first using bash(background=True):
bash(command="python -m instrument.pna.main", background=True)
The service runs on port 8002.
CRITICAL: Always use background=True when starting the PNA service. Without it, the command will block the agent indefinitely.
bash(command="python -m instrument.pna.main", background=True)
/healthBase URL: http://127.0.0.1:8002
| Method | Endpoint | Description |
|--------|----------|-------------|
| POST | /measure | Start a new measurement |
| GET | /measure/{task_id} | Get task status |
| POST | /measure/{task_id}/cancel | Cancel a running measurement |
| GET | /health | Health check — pna_connected reflects actual PNA connection |
lifespan (before first request is handled)GET /health returns pna_connected: true/false based on actual instrument stateIf pna_connected is false, the PNA instrument could not be reached at service startup. Report this to the user.
GET http://127.0.0.1:8002/health
Response: {"status": "ok", "pna_connected": true}
POST http://127.0.0.1:8002/measure
{
"start_freq": 1,
"stop_freq": 100000,
"csv_filename": "my_trace.csv"
}
Response: {"task_id": "abc123", "status": "pending"}
GET http://127.0.0.1:8002/measure/abc123
Response:
{
"task_id": "abc123",
"status": "completed",
"csv_path": "D:\\PDHlocking\\LabPilot\\data\\PNA_data\\my_trace.csv",
"result": {"trace_points": 801}
}
background=False — it will block the agent indefinitelybackground=True when calling bash to start the PNA serviceMeasurement data is saved as CSV to data/PNA_data/. To read specific frequency points:
import csv
csv_path = "D:\\PDHlocking\\LabPilot\\data\\PNA_data\\my_trace.csv"
target_freqs = [1, 10, 100, 1000] # Hz — read these points
with open(csv_path) as f:
reader = csv.DictReader(f)
for row in reader:
if float(row["Frequency_Hz"]) in target_freqs:
print(f"{row['Frequency_Hz']} Hz: {row['Power_dBm']} dBm")
Output format: CSV with columns Frequency_Hz, Power_dBm. Frequencies are in Hz, power in dBm.
When measurement completes, result is pushed to NotificationHub (port 8000):
[WebSocket] task_completed: csv_path=..., trace_points=...
Failed measurement:
[WebSocket] task_failed: error=...
| Env Variable | Default | Description | |--------------|---------|-------------| | PNA_RESOURCE | USB::0xAAD::0x290::101334::INSTR | VISA resource string | | PNA_VISA_TIMEOUT | 1500000 | VISA timeout in ms | | PNA_OPC_TIMEOUT | 800000 | OPC timeout in ms | | PNA_DATA_DIR | data/PNA_data | Output directory | | PNA_PORT | 8002 | Service port | | PNA_DEFAULT_START_FREQ | 1 | Default start freq (Hz) | | PNA_DEFAULT_STOP_FREQ | 100000 | Default stop freq (Hz) |
data/PNA_data/Frequency_Hz, Power_dBmhttp://127.0.0.1:8000/notifypna_connected: false in /health → Report "PNA instrument connection failed. Check USB connection and instrument power."bash(command="curl http://127.0.0.1:8002/health")bash(command="python -m instrument.pna.main", background=True)pna_connected in health response — if false, report connection issuePOST /measuretask_id, tell user "measurement started"development
Use this skill whenever the user wants to create a new SKILL.md file, design a reusable workflow, or package instructions for Claude to follow. Triggers include: "帮我创建一个技能", "create a new skill", "我想添加一个新的 XX 技能", "make this a skill", "create a skill for X", "turn this into a reusable skill". This skill helps users design, brainstorm, and generate new skills through interactive guidance, following the official SKILL.md anatomy guidelines. Do NOT use for general conversations unrelated to skill creation.
documentation
Parse and analyze academic papers from PDF files, generate structured JSON summaries and save to docs/papers directory.
development
Use this skill whenever interacting with the PDH (Pound-Drever-Hall) optical cavity locking FastAPI service running at http://127.0.0.1:8001. Triggers include: any request to calculate PI, query task results, check or control lock state, set PID/modulation parameters, export waveforms, or monitor power. Also use when user mentions "PDH", "Pound-Drever-Hall", "lock", "锁定", "PI calculation", "task ID", "/pi/", "/lock/", "/pid/", "/modulation/", "/plot/", "/power/" endpoints. Do NOT use for general FastAPI services unrelated to PDH locking.
development
Maintainer-only workflow for handling GitHub Secret Scanning alerts on OpenClaw. Use when Codex needs to triage, redact, clean up, and resolve secret leakage found in issue comments, issue bodies, PR comments, or other GitHub content.