Release

Skarn 0.35.0: Claude Code reads

Before Claude Code runs a Read, the guard now scans the file the read names. skarn setup also wires PostToolBatch for Claude Code, a new skarn inventory command describes each assistant on the machine, and the NDJSON stream has a written field contract.

Published 2026-11-09.

The guard on Claude Code

Before Claude Code runs a Read, skarn guard opens the file the read names and scans its content, when the file is a regular text file of up to 4 MiB. Audit mode reports what the guard would decide. Enforce mode, which needs a paid license, blocks: a file holding a detected secret is denied before its content reaches the model, and an env file with no detected secret is denied too, at the permission step, by the hooks Skarn ships. Only a Read has its file opened and scanned ahead of the call; a shell command such as cat or a script is judged by its command line, as before.

skarn setup now also wires PostToolBatch for Claude Code, so the guard scans the results of the tool calls it covers in each batch before the next request to the model. In enforce mode a detected secret in any of those results stops the turn before that request. The flagged result stays in the conversation, so clear it before you continue.

To pick up both, upgrade skarn to 0.35.0, then update the hooks. On an install made with skarn setup, run the update. Until you do, skarn doctor reports the older hooks as drifted. --update writes audit mode unless you pass a mode, so keep enforce with the second form:

skarn setup --update skarn setup --update --mode enforce

On the Claude Code plugin, refresh the marketplace, update the plugin, and restart Claude Code:

claude plugin marketplace update skarn claude plugin update skarn-guard@skarn

The plugin ships hooks/hooks.json in audit mode, so if you run enforce, change --guard-mode audit to --guard-mode enforce in every command entry of that file again, the PostToolBatch entry included.

In enforce mode, a file holding a test or fixture credential is denied on every Read until you accept its fingerprint with skarn guard accept. In audit mode, a call flagged before it runs and again in its batch counts twice in skarn guard report. A block of a task list entry (TaskCreated) now takes effect; Claude Code ignored the response the guard sent before.

Inventory

skarn inventory prints one record for this machine. Per assistant it states how completely Skarn could observe its sessions and its configuration, the declared session store roots, the client versions seen in sessions, how many MCP servers its configuration declares and how many its sessions called, its last activity and its session count. Per machine it states the guard mode the hooks ask for and the mode the guard runs in. It needs no license. Server and project names appear only with --project, with any credential or home path inside a name masked.

skarn inventory skarn inventory --format ndjson

skarn check --format ndjson writes the same record as its second line, the skarn.inventory line. To build it, check --format ndjson now also reads the assistant configuration files skarn vet reads and the guard configuration layers, both read-only.

NDJSON event contract

skarn check --format ndjson now has a written field contract, NDJSON-CONTRACT.md in the skarn-dist repository. This release adds keys and renames or removes none:

  • Every line names the machine and the account that ran the scan when each is known: host.name, skarn.scanner_user (written as **** when it contains @), and the operator tags skarn.identity and skarn.org from the SKARN_IDENTITY and SKARN_ORG environment variables.
  • A finding line carries skarn.cli, the assistant whose session holds the finding, when it is known; the summary line lists the assistants read as skarn.clis.
  • A finding or coverage line read from a Compliance API export carries skarn.subject_host set to export.
  • skarn check --format json carries on each incident a fingerprint equal to the NDJSON skarn.fingerprint, and a chainId when the incident belongs to an attack chain.

Detection

  • composio-api-key now matches Composio organization keys (oak_) beside user keys (uak_). The new rule composio-project-or-consumer-key matches project (ak_) and Connect consumer (ck_) keys when Composio is named near the key, and a consumer key also as the value of an x-consumer-api-key header. The bundled rule pack has 253 rules.
  • An .npmrc per-registry _password or _auth value is reported again. In 0.34.0 these lines were read as // comments and reported only as suppressed.
  • An encode-and-send pipeline the agent wrote into a file without running it is now its own finding, base64-exfiltration-pipeline-written, at high instead of critical. A pipeline the session runs stays base64-exfiltration-pipeline at critical.

Fewer false positives

  • A paging cursor in a tool result, such as an OData $skiptoken or a nextPageToken, is no longer reported as a credential.
  • bash-env-dump no longer fires on env values that are placeholders in angle brackets, such as <your-value-here>. A credential URL inside brackets still fires.
  • The guard no longer treats kubeconfig-manager/README.md, src/kubeconfig.ts or credentials.json.example as credential files, or config.env.ts as an env file. admin.kubeconfig, gcp-credentials.json and .env.sh still match.

Cost estimates

Cost estimates now price gpt-6.1-sol, gpt-6.1-terra, gpt-6-sol, gpt-6-luna, gpt-6-cyber, gpt-6-rosalind and Gemini 4 Argon; sessions on these models reported no cost before. Gemini 4 Argon is priced at the introductory rate Google lists through November 30, 2026.

Other changes

  • skarn serve: the Messages view adds Jump to latest, Show all, and Conversation only, which hides tool calls and tool results.
  • install.ps1 warns when an older skarn earlier on your PATH would run instead of the copy it just installed, lists every copy with its version, and says how to remove the older one.
  • Commands that take a session id find the session from file names instead of parsing every session file, and discovery reads Grok and Gemini overlap files in parallel. On a machine with 8,903 session files, skarn messages on one session went from about 73 seconds to under one.

Every hook event the guard handles on Claude Code is in the guard hook-event reference, and every command and option is in the manual.

Get 0.35.0

Install or upgrade, then run skarn assess to scan the AI coding sessions on the machine.

[email protected]