instrument-mcp: Command for Claude Code

.claude/commands/safety-audit.md

safety-audit is a command for Claude Code from mingyo186/instrument-mcp. It costs 0 tokens per session (259 once invoked), scanned A, original, MIT.

A command for reviewing the instrument-mcp server's safety layer, which controls and checks operations sent to laboratory equipment. It focuses on write operations, such as changing a power supply's output.

In plain words
What is it for?
Checking that every write tool passes through safety validation, reviewing voltage, current, and step limits, inspecting blocked commands, and checking error handling and boundary tests such as zero, negative, and very large values.
Why use it?
It helps find missing safety checks, unsafe default limits, blocked dangerous SCPI commands, unclear errors, and weak edge-case tests. SCPI is a command language commonly used to control test equipment.

Command for Claude Code

Written for Claude Code: installed under .claude/.

This is mingyo186/instrument-mcp's own configuration. It tells Claude Code how to work on instrument-mcp itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything instrument-mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to mingyo186/instrument-mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/mingyo186/instrument-mcp/master/.claude/commands/safety-audit.md
Clone the repo
git clone --depth 1 https://github.com/mingyo186/instrument-mcp

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for safety-audit

README.md
[![agentmods](https://agentmods.dev/badge/commands/mingyo186/instrument-mcp/safety-audit/github.svg)](https://agentmods.dev/commands/mingyo186/instrument-mcp/safety-audit)
Your own site
<a href="https://agentmods.dev/commands/mingyo186/instrument-mcp/safety-audit"><img src="https://agentmods.dev/badge/commands/mingyo186/instrument-mcp/safety-audit/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for safety-audit

Your own site · 80×15
<a href="https://agentmods.dev/commands/mingyo186/instrument-mcp/safety-audit"><img src="https://agentmods.dev/badge/commands/mingyo186/instrument-mcp/safety-audit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 259 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.00259
Opus 5 $0.00000 $0.00130
Sonnet 5 $0.00000 $0.00052
Haiku 4.5 $0.00000 $0.00026

Measured 8d ago against content hash 28436b447766, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

safety-audit scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/safety-audit.md · 23 lines

What it actually says

Safety Layer의 안전성을 감사합니다.

점검 항목

  1. 모든 쓰기 Tool이 Safety를 거치는지 확인

    • src/tools/power_supply.py의 모든 쓰기 함수에서 safety.check_* 호출 확인
    • 새로 추가된 Tool에 Safety 검증 누락이 없는지 확인
  2. 안전 제한값 검토

    • src/config.pySafetyLimits 기본값이 보수적인지 확인
    • MAX_VOLTAGE, MAX_CURRENT, MAX_STEP 값의 적절성 검토
  3. 차단 명령어 검토

    • blocked_scpi_commands 목록이 충분한지 확인
    • 위험한 SCPI 명령어가 누락되지 않았는지 점검
  4. 에러 처리 검토

    • Safety 검증 실패 시 명확한 에러 메시지 반환 확인
    • Driver 에러가 적절히 처리되는지 확인
  5. 테스트 커버리지

    • tests/unit/test_safety.py의 경계값 테스트 충분한지 확인
    • 엣지 케이스(0V, 음수, 매우 큰 값) 테스트 확인
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 23 lines · 0 tokens per session scan A 28436b447766

Subscribe to this mod's changes

safety-audit is a command published in the GitHub repository mingyo186/instrument-mcp (0 stars, last pushed 6mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 259 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.