PostToolUse

A collection of automatic checks that run after selected editing and shell commands finish. They record progress, scan for secrets, show security reminders, verify output, and run Ruby-related checks.

In plain words
What is it for?
Use it after editing Ruby files, build files, or other project files, and after running Bash commands that need progress logging, secret scanning, security reminders, or output verification.
Why use it?
It adds follow-up checks after changes or commands, helping expose leaked credentials, security concerns, and incomplete verification.

Hook

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.

agentmods
npx agentmods add hooks/slbug/claude-ruby-grape-rails/post-tool-use
Clone the repo
git clone --depth 1 https://github.com/slbug/claude-ruby-grape-rails
Per session not measured What this adds to a session before it is invoked.
When invoked not measured Not applicable: nothing here is loaded into a session.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Security

Grade A, and why

PostToolUse 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 commands this hook runs, not an audit. A hook is shell that executes on your machine at the event it names, which is why every command in it is printed with what was found.

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.

plugins/ruby-grape-rails/hooks/hooks.json · 246 lines

How it starts

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

{
  "PostToolUse": [
    {
      "matcher": "Edit|Write",
      "hooks": [
        {
          "type": "command",
          "command": "${CLAUDE_PLUGIN_ROOT}/hooks/scripts/log-progress.sh",
          "timeout": 15,
          "async": true
        },
        {
          "type": "command",
          "command": "${CLAUDE_PLUGIN_ROOT}/hooks/scripts/secret-scan.sh",
          "timeout": 180
        }
      ]
    },
    {
      "matcher": "Edit",
      "hooks": [
        {
          "type": "command",
          "if": "Edit(*.rb)",
          "command": "${CLAUDE_PLUGIN_ROOT}/hooks/scripts/security-reminder.sh",
          "timeout": 15
        },
        {
          "type": "command",
          "if": "Edit(*.rake)",
          "command": "${CLAUDE_PLUGIN_ROOT}/hooks/scripts/security-reminder.sh",
          "timeout": 15
        },
        {
          "type": "command",
          "if": "Edit(*Gemfile)",
          "command": "${CLAUDE_PLUGIN_ROOT}/hooks/scripts/security-reminder.sh",
          "timeout": 15
        },
        {
          "type": "command",
          "if": "Edit(*Rakefile)",
          "command": "${CLAUDE_PLUGIN_ROOT}/hooks/scripts/security-reminder.sh",
          "timeout": 15
        },
        {
          "type": "command",
          "if": "Edit(**/config/**)",
          "command": "${CLAUDE_PLUGIN_ROOT}/hooks/scripts/security-reminder.sh",
          "timeout": 15
        },
        {
          "type": "command",
          "if": "Edit(*.yml)",
          "command": "${CLAUDE_PLUGIN_ROOT}/hooks/scripts/security-reminder.sh",
          "timeout": 15
        },
        {
          "type": "command",
          "if": "Edit(*.env*)",
          "command": "${CLAUDE_PLUGIN_ROOT}/hooks/scripts/security-reminder.sh",
          "timeout": 15
        },
        {
          "type": "command",
          "if": "Edit(*.json)",
          "command": "${CLAUDE_PLUGIN_ROOT}/hooks/scripts/security-reminder.sh",
          "timeout": 15
        }
      ]
    },
    {
      "matcher

Read the full file on GitHub · 246 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 First seen · 246 lines scan A 2bfbb3fd2422

Subscribe to this mod's changes

PostToolUse is a hook published in the GitHub repository slbug/claude-ruby-grape-rails (7 stars, last pushed 3d ago), licensed MIT. Its token cost is not measured: a hook is shell that never enters the context. 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.