sn-safe-write

sn-safe-write is a skill for Claude Code from IvanBBaev/servicenow-mcp-ai. It costs 43 tokens per session (1,183 once invoked), scanned A, original, MIT.

A review-first process for changing ServiceNow records and configuration. It previews a create, update, upsert, or delete before applying it, then reads the result back and can plan an inverse change.

In plain words
What is it for?
Use it for approved ServiceNow data or configuration changes. It supports checking current values, reviewing before-and-after fields, verifying the result, and preparing a revert.
Why use it?
Direct changes can overwrite data or affect configuration unexpectedly. A preview and explicit approval make the intended change visible before it is applied.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions subagents.

Part of the servicenow-mcp-ai plugin — 8 skills, 2 agents, 3 hooks, 1 MCP server shipped together

Good fit Use it for approved ServiceNow data or configuration changes. It supports checking current values, reviewing before-and-after fields, verifying the result, and preparing a revert.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ivanbbaev/servicenow-mcp-ai/sn-safe-write
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add IvanBBaev/servicenow-mcp-ai --skill sn-safe-write
Clone the repo
git clone --depth 1 https://github.com/IvanBBaev/servicenow-mcp-ai

Made for: Claude Code.

Or install servicenow-mcp-ai, the plugin that ships this one along with the rest of its 8 skills, 2 agents, 3 hooks, 1 MCP server.

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 sn-safe-write

README.md
[![agentmods](https://agentmods.dev/badge/skills/ivanbbaev/servicenow-mcp-ai/sn-safe-write/github.svg)](https://agentmods.dev/skills/ivanbbaev/servicenow-mcp-ai/sn-safe-write)
Your own site
<a href="https://agentmods.dev/skills/ivanbbaev/servicenow-mcp-ai/sn-safe-write"><img src="https://agentmods.dev/badge/skills/ivanbbaev/servicenow-mcp-ai/sn-safe-write/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 sn-safe-write

Your own site · 80×15
<a href="https://agentmods.dev/skills/ivanbbaev/servicenow-mcp-ai/sn-safe-write"><img src="https://agentmods.dev/badge/skills/ivanbbaev/servicenow-mcp-ai/sn-safe-write.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 43 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,183 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.00043 $0.01183
Opus 5.5 $0.00017 $0.00473
Sonnet 5.5 $0.00009 $0.00237
Haiku 4.5 $0.00004 $0.00118

Measured 2d ago against content hash d52d8960633d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

sn-safe-write 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 2d 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.

skills/sn-safe-write/SKILL.md · 86 lines

How it starts

The opening of the file, as written. The whole thing — 86 lines — stays where its author put it; the contents beside it link to each section on GitHub.

sn-safe-write — plan, review, apply, verify

A write tool called without apply: true returns a before/after preview and changes nothing only while the server is in plan mode (the default). In apply mode (SN_WRITE_MODE=apply) the same call executes at once. So the first step is always to learn the mode — never send a write call before it.

When not to use

  • Reading, investigating or explaining — use sn-triage, sn-impact or the sn-investigator subagent; this skill is for changes only.
  • Changing credentials — servicenow_set_credentials has its own confirmation.
  • Unattended bulk writes in apply mode — those need an operator decision, not a skill.
  • Hand-off: for a non-trivial plan (scripts, ACLs, configuration records, more than one record, or a prod profile) pass the plan preview to the sn-change-reviewer subagent (where the client has it) and apply only on a go verdict the user accepts.

Steps

  1. Check the mode and the target: servicenow_get_status — writeMode, policy.destructiveConfirm, the active profile and its entry in profileDetails (env, writeMode, writeModeHold). Never switch profiles or write modes silently.
  2. Pick the branch from that answer:
    • Plan mode (writeMode: "plan") — continue with step 3; a call without apply is a safe preview.
    • Apply mode on a non-prod profile (writeMode: "apply") — there is no preview: every write call, with or without apply, changes the instance, and destructive tools skip the plan_token check. Stop and ask the user before any write call: describe the exact change (table, record, fields, old and new values from step 3's read) and wait for an explicit yes. Offer to have the operator switch this profile to plan mode instead.
    • Prod profile (env: "prod") — a prod profile configured for apply stays in plan mode (writeModeHold says why) until the operator acknowledges it with SN_PROD_WRITES=I_UNDERSTAND (or the per-profile form); while held, follow the plan branch and say the target is production when you show the preview. If prod really is in apply mode, follow the apply branch above, and expect destructive tools to ask for a client confirmation (or to fail with CONFIRM_REQUIRED when the client cannot confirm).
  3. Read the current state: servicenow_get_record or servicenow_query_table for the rows you will touch.
  4. Plan (plan mode only): call servicenow_create_record, servicenow_update_record, servicenow_upsert_record or servicenow_delete_record without apply. Check that the answer says mode: "plan", then show the user the preview (the fields that change, before and after).
  5. Apply only after the user approves this preview: repeat the same call with apply: true. A non-destructive write (create, update, upsert) needs nothing else. A destructive apply (servicenow_delete_record, a writing servicenow_batch, servicenow_revert_write, …) also needs the plan_token from that preview — without one the server returns the preview again (with apply_skipped) instead of running it, a stale token is PLAN_REQUIRED, and the plugin's hook stops a token-less apply before it is sent. In apply mode, the approved call from step 2 is the one and only call. For configuration records pass update_set so the change is captured.
  6. Verify: read the record back with servicenow_get_record.
  7. Undo path: servicenow_list_writes shows the local write journal; servicenow_revert_write plans the inverse of an entry and applies it with apply: true. Both live in the opt-in revert package and servicenow_batch in the batch package: when enabledPackages in the step 1 answer lacks one, enable it with the server's enable_package admin tool and tell the user. The record tools are in table (part of core).

Read the full file on GitHub · 86 lines

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. 2d ago Changed · +1 lines d52d8960633d
  2. 8d ago Changed · +44 lines 757e3988638d
  3. 13d ago Changed · +4 lines 84e328c0adeb
  4. 20d ago First seen · 37 lines · 43 tokens per session scan A bf6ad85e3585

Subscribe to this mod's changes

sn-safe-write is a skill published in the GitHub repository IvanBBaev/servicenow-mcp-ai (8 stars, last pushed yesterday), licensed MIT. It adds 43 tokens to every session and 1,183 once invoked, about $0.0002 per session on Opus 5.5. 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-09-27.

Related

Other skills, from other repositories

debugging-mutations

Verify what changed on a ServiceNow instance after a tool call — sysaudit inspection, syslog/transaction logs, session context, Flow Designer execution logs, outbound HTTP traces.

serac-labs/serac · 41 tokens

inbound-email

Handle email arriving at a ServiceNow instance — inbound email action ordering and stop-processing, the real syseventinemailaction column names, and reading sysemail when a message created no record.

serac-labs/serac · 43 tokens

instance-performance-triage

Answer "the instance is slow" or "my nightly job never ran" from ServiceNow's own telemetry — transaction logs, syslog, systrigger, progress workers, execution trackers — instead of ad-hoc scripts that add to the load.

serac-labs/serac · 55 tokens

mcp-tool-discovery

Find and call tools on this ServiceNow MCP server — the two meta-tools it starts with, why a missing session id makes every other tool unreachable, which queries actually match, and which advertised tools are not on the server at all.

serac-labs/serac · 53 tokens

background-script-execution

What actually happens when you call snowexecutescript — the Scripted REST endpoint Serac auto-deploys on first use, the scheduled-job fallback, what scheduledjobpending means, and how to get output back when the call comes home empty.

serac-labs/serac · 54 tokens

change-rollback

Undo a change already written to a ServiceNow instance — recover the prior payload from sysupdateversion, write it back without corrupting it, and know which damage update set back-out, Deleted Records, or nothing at all can reverse.

serac-labs/serac · 51 tokens