ship-safe-hooks

ship-safe-hooks is a skill for Claude Code from asamassekou10/ship-safe. It costs 41 tokens per session (640 once invoked), scanned A, original, MIT.

Real-time Claude Code hooks that check files and shell commands during development, before changes are written or run.

In plain words
What is it for?
Use them to install, remove, or check the status of Ship Safe protection for file writes and Bash commands.
Why use it?
They can block critical secrets and dangerous commands early and show security findings after files change.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: reads .claude/ paths; mentions Claude Code.

Part of the ship-safe plugin — 9 skills shipped together

Good fit Use them to install, remove, or check the status of Ship Safe protection for file writes and Bash commands.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/asamassekou10/ship-safe/ship-safe-hooks
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 asamassekou10/ship-safe --skill ship-safe-hooks
Clone the repo
git clone --depth 1 https://github.com/asamassekou10/ship-safe

Made for: Claude Code.

Or install ship-safe, the plugin that ships this one along with the rest of its 9 skills.

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 ship-safe-hooks

README.md
[![agentmods](https://agentmods.dev/badge/skills/asamassekou10/ship-safe/ship-safe-hooks/github.svg)](https://agentmods.dev/skills/asamassekou10/ship-safe/ship-safe-hooks)
Your own site
<a href="https://agentmods.dev/skills/asamassekou10/ship-safe/ship-safe-hooks"><img src="https://agentmods.dev/badge/skills/asamassekou10/ship-safe/ship-safe-hooks/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 ship-safe-hooks

Your own site · 80×15
<a href="https://agentmods.dev/skills/asamassekou10/ship-safe/ship-safe-hooks"><img src="https://agentmods.dev/badge/skills/asamassekou10/ship-safe/ship-safe-hooks.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 41 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 640 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 2 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 9 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Agent Snooping · line 42
    Skill reads from agent configuration directories (.claude/, .codex/, .gemini/). These directories may contain API keys, personal settings, and other credentials that the skill has no legitimate need to access.
    Fix: Remove all code or instructions that access agent configuration directories (.claude/, .codex/, .gemini/). If configuration values are needed, pass them explicitly as parameters or environment variabl
  • high Agent Snooping · line 51
    Skill reads from agent configuration directories (.claude/, .codex/, .gemini/). These directories may contain API keys, personal settings, and other credentials that the skill has no legitimate need to access.
    Fix: Remove all code or instructions that access agent configuration directories (.claude/, .codex/, .gemini/). If configuration values are needed, pass them explicitly as parameters or environment variabl
  • high Agent Snooping · line 63
    Skill reads from agent configuration directories (.claude/, .codex/, .gemini/). These directories may contain API keys, personal settings, and other credentials that the skill has no legitimate need to access.
    Fix: Remove all code or instructions that access agent configuration directories (.claude/, .codex/, .gemini/). If configuration values are needed, pass them explicitly as parameters or environment variabl
  • high Agent Snooping · line 66
    Skill reads from agent configuration directories (.claude/, .codex/, .gemini/). These directories may contain API keys, personal settings, and other credentials that the skill has no legitimate need to access.
    Fix: Remove all code or instructions that access agent configuration directories (.claude/, .codex/, .gemini/). If configuration values are needed, pass them explicitly as parameters or environment variabl
  • high Agent Snooping · line 66
    Skill reads from agent configuration directories (.claude/, .codex/, .gemini/). These directories may contain API keys, personal settings, and other credentials that the skill has no legitimate need to access.
    Fix: Remove all code or instructions that access agent configuration directories (.claude/, .codex/, .gemini/). If configuration values are needed, pass them explicitly as parameters or environment variabl
  • medium MCP Rug Pull · line 26
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
  • medium MCP Rug Pull · line 31
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
  • medium MCP Rug Pull · line 36
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
  • medium Rogue Agent · line 45
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
How audits are shown
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.00041 $0.00640
Opus 5 $0.00020 $0.00320
Sonnet 5 $0.00008 $0.00128
Haiku 4.5 $0.00004 $0.00064

Measured 12d ago against content hash 0129abded652, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

ship-safe-hooks scanned grade A with 2 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 12d 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.

Reads agent configuration directorieslowAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

- To see what was installed: `cat ~/.claude/settings.json`

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- **Block** `Bash` calls matching dangerous patterns (curl piped to shell, credential exfiltration)
claude-code-plugin/skills/ship-safe-hooks/SKILL.md · 67 lines

How it starts

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

Ship Safe — Claude Code Hooks

You are installing ship-safe as real-time security hooks into Claude Code. Once installed, ship-safe will:

  • Block Write / Edit / MultiEdit calls that contain critical secrets (API keys, tokens, private keys) before they are written to disk
  • Block Bash calls matching dangerous patterns (curl piped to shell, credential exfiltration)
  • Scan every file after it is written and inject advisory findings directly into this conversation
  • Show a local Protected by Ship Safe status line in Claude Code when both hooks are ready

Step 1: Determine the action

If $ARGUMENTS is remove: run the remove command below. If $ARGUMENTS is status: run the status command below. Otherwise (default or install): run the install command.

Step 2: Run the command

Install (default):

npx ship-safe@latest hooks install

Remove:

npx ship-safe@latest hooks remove

Status check:

npx ship-safe@latest hooks status

Step 3: Report the result

On install success:

  • Confirm that two hooks are now registered in ~/.claude/settings.json
  • Confirm that the Ship Safe status line is registered as well, unless another status line already exists
  • Explain what each hook does:
    • PreToolUse (on Write / Edit / MultiEdit / Bash): blocks critical secrets and dangerous commands in real time
    • PostToolUse (on Write / Edit / MultiEdit): scans the written file and reports findings in context
  • Tell the user that no restart is needed — hooks take effect immediately
  • The status line is a local indicator backed by the installed hooks; it is not a decorative claim

On remove success:

  • Confirm the hooks were removed from ~/.claude/settings.json

On status:

  • Report which hooks are installed (✔) and which are missing (✗)
  • If any are missing, offer to run install

On error:

  • If the command fails, check whether Node.js 18+ is available: node --version
  • If hook scripts are missing, suggest reinstalling: npm install -g ship-safe

Read the full file on GitHub · 67 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. 12d ago First seen · 67 lines · 41 tokens per session scan A 0129abded652

Subscribe to this mod's changes

ship-safe-hooks is a skill published in the GitHub repository asamassekou10/ship-safe (842 stars, last pushed 5d ago), licensed MIT. It adds 41 tokens to every session and 640 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 2 findings (reads agent configuration directories, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories