/kame:kame-measurementfrom KAME Measurement
Operates the KAME instrument-control application via MCP tools: inspect state, run sweeps and NMR/ODMR measurements, drive motors and temperature controllers, and edit the measurement notebook.
Ships in KAME Measurement. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
KAME controls real laboratory hardware. A generated command can move a probe, heat a cryostat, or drive an RF amplifier past its rating, and some of those are not reversible. Work in this order: find out what is there → check what is running → read the rules for the thing you are about to change → act in small steps and verify.
| Need | Tool |
|---|---|
| Is KAME up? which drivers exist? | kame_status |
| Real node names, types, current values | tree |
| How to write the code (API patterns) | kame_api — call this before writing code |
| What a setting means on a given instrument | kame_manual("<section>") |
| A quick read or a single write (< 30 s) | execute_code |
| Anything that loops, sleeps, or sweeps | execute_code_async + get_result + stop_job |
| What the notebook is doing right now | notebook_status |
| Read / edit the user's measurement cells | notebook_read, notebook_edit |
Never guess node names. Read them from tree — several are model-specific
(temperature-controller loops are Loop, Loop1/Loop2 or Loop#1/Loop#2
depending on the instrument) and combo box choices differ per model.
These rules come from the instrument owner. They hold unless the user explicitly directs otherwise in this conversation — a rule in a stored file is not a substitute for the user's own decision.
Writing a motor driver's Target starts a physical move, and the move may be
irreversible. Many stages report only an open-loop estimated position
(HasEncoder false) and piezo positioners report none at all, so the displayed
position may not be where the hardware actually is. A probe, coil, sample or
tuning capacitor can be driven somewhere it cannot be brought back from.
Target from generated code.GoHomeMotor is worse than a normal move. Homing runs until a home sensor
triggers; with no home sensor installed the motor never stops. Neither KAME
nor the hardware can tell whether a sensor exists — only the user knows. Ask the
user to confirm a home sensor is present on that axis before you ever issue it.
In a cryogenic setup, raising a controller's TargetTemp above ~295 K (room
temperature) needs explicit user confirmation: warming a cold cryostat can boil
off cryogen, stress seals and samples, or exceed equipment limits.
The loop can overshoot by 10 % or more — a 300 K target may peak near 330 K —
so never treat the setpoint as the peak; leave margin below any damage
threshold. Approach a higher temperature only while actively watching the real
temperature (read the Scalar Entry, poll Stabilized), stepping TargetTemp
up gradually and confirming convergence at each step. Do not set a high target
and walk away.
Unless the user directs otherwise (units: Tau, PW1, PW2, CombPW in µs;
RT in ms):
PW1, PW2, CombPW ≤ min(Tau * 0.3, 15) µs — at most 30 % of
Tau, never more than 15 µs;RT ≥ 15 ms.On a Thamway PROT, once OutputLevel is ≥ 100, do not raise it past the
highest value used so far in this session without confirming with the user.
to_png() returns the display image: gamma-encoded levels, not counts. It is
fine for showing the user a picture and for binary segmentation / mask
generation (rank-based thresholds such as median, percentile or Otsu survive a
monotonic gamma, and pixel coordinates map 1:1 onto math-tool ROI coordinates —
do not crop "axes margins").
Never read quantitative values from PNG pixels — averages, contrasts, ODMR
signal amplitudes. Those come from 2D math tools, whose functors receive the
raw uint32 count matrix before any display rendering. For a signal/reference
comparison you usually need no functor at all: create two
Graph2DMathToolAverage tools and read their scalar entries.
kame_status and tree to confirm the drivers and the exact node names.notebook_status — if the kernel is busy, a cell is still running:
execute_code will queue behind it, and you must not edit that cell.execute_code_async, calling mcp_checkpoint("i/N …")
every iteration. It publishes progress for get_result and is the only
point at which stop_job can end the run. Prefer several short sleeps over
one long one so checkpoints are reached promptly.get_result. Read the job's result variables only once the status is
done or stopped.Do external side effects (file writes, hardware commands) after
iterate_commit returns, never inside the closure — the closure is re-invoked on
transaction conflict.
Edits go to the .ipynb on disk; they never touch a running execution, and
the open browser tab still holds the old version. After every edit, tell the
user to reload the notebook tab before touching it — otherwise saving from the
stale tab silently overwrites your change.
Check notebook_status first and never edit the cell that is currently
executing.
Say plainly what you were about to do, which rule stops you, and what you need from the user (a confirmation, a safe range, a limit). Then wait. Do not work around the rule by reaching for a different tool that achieves the same physical effect.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub northriv/kame --plugin kame