deployshield: Instructions file for Claude Code

CLAUDE.md

deployshield CLAUDE.md is an instructions file for Claude Code from matanryngler/deployshield. It costs 903 tokens per session, scanned A, original, MIT.

Repository-specific instructions for DeployShield, a safety tool that blocks risky command-line changes made by coding agents while allowing approved read-only commands. They also document tests, linting, pre-commit checks, and manual validation.

In plain words
What is it for?
Use them when developing or checking DeployShield, running its Python tests, linting its hook scripts, testing command validation, or installing its pre-commit hook.
Why use it?
They give an agent the commands and project context needed to work safely and verify changes in this repository.

Instructions file for Claude Code

Written for Claude Code: PreToolUse hook event. Also seen: mentions .claude-plugin; mentions CLAUDE.md; mentions Claude Code.

This is matanryngler/deployshield's own configuration. It tells Claude Code how to work on deployshield 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 deployshield configures →

Reuse

Borrowing it

Nothing to install: this file belongs to matanryngler/deployshield. 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/matanryngler/deployshield/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/matanryngler/deployshield

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 deployshield CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/matanryngler/deployshield/claude-md/github.svg)](https://agentmods.dev/instructions/matanryngler/deployshield/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/matanryngler/deployshield/claude-md"><img src="https://agentmods.dev/badge/instructions/matanryngler/deployshield/claude-md/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 deployshield CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/matanryngler/deployshield/claude-md"><img src="https://agentmods.dev/badge/instructions/matanryngler/deployshield/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 903 This file is loaded in full into every session.
When invoked 903 The same file — it is already loaded in full.
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.00903 $0.00903
Opus 5.5 $0.00361 $0.00361
Sonnet 5.5 $0.00181 $0.00181
Haiku 4.5 $0.00090 $0.00090

Measured 1mo ago against content hash 6d888006aa47, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

deployshield CLAUDE.md 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 1mo 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.md · 74 lines

How it starts

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

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

What This Is

DeployShield is a production safety guardrail for Claude Code and Gemini CLI. It blocks write/mutating CLI commands while allowing read-only ones. It works as a hook on shell commands — every command the AI tries to run goes through the validator, which default-denies any recognized CLI action that isn't on the safe-list. Unrecognized CLIs pass through untouched.

Commands

# Run tests
uv run pytest -v

# Run a single test file or class
uv run pytest tests/test_integration.py -v
uv run pytest tests/test_cloud_providers.py -v

# Lint
uv run ruff check hooks/scripts/ tests/
uv run ruff format --check hooks/scripts/ tests/

# Pre-commit (runs automatically on commit after install)
uv run pre-commit install
uv run pre-commit run --all-files

# Manual smoke test (pipe JSON to stdin, exit 0 = allow, JSON output = deny)
echo '{"hook_event_name": "PreToolUse", "tool_input":{"command":"kubectl get pods"}}' | ./hooks/scripts/validate-cloud-command.py
echo '{"hook_event_name": "BeforeTool", "tool_input":{"command":"terraform apply"}}' | ./hooks/scripts/validate-cloud-command.py

# Test session start message
python3 hooks/scripts/validate-cloud-command.py --session-start claude
python3 hooks/scripts/validate-cloud-command.py --session-start gemini

Architecture

The entire validation engine is a single Python script (hooks/scripts/validate-cloud-command.py) with no dependencies beyond the stdlib.

  • hooks/hooks.json — Primary hook file for Gemini CLI (uses BeforeTool event).
  • hooks/claude-hooks.json — Dedicated hook file for Claude Code (uses PreToolUse event).
  • .claude-plugin/plugin.json — Plugin manifest. Points to hooks/claude-hooks.json.
  • hooks/scripts/validate-cloud-command.py — Core logic. Flow: read JSON from stdin → detect platform from hook_event_name → split_compound_command (state-machine shell parser) → normalize_segment (unwraps sudo, env, xargs) → dispatch to per-provider check_* function → deny() with platform-specific JSON output if unsafe.
  • skills/deployshield/SKILL.md — Context injected into Claude when working with infra files.
  • skills/gemini/SKILL.md — Context injected into Gemini CLI.

Read the full file on GitHub · 74 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. 1mo ago First seen · 74 lines · 903 tokens per session scan A 6d888006aa47

Subscribe to this mod's changes

deployshield CLAUDE.md is an instructions file published in the GitHub repository matanryngler/deployshield (3 stars, last pushed 7mo ago), licensed MIT. It adds 903 tokens to every session, about $0.0036 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-08-31.

Related

Other instructions, from other repositories