Getting it into your agent
This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.
/plugin marketplace add dhslegen/digital-delivery-team/plugin install digital-delivery-teamWrote 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.
[](https://agentmods.dev/hooks/dhslegen/digital-delivery-team/pre-tool-use)<a href="https://agentmods.dev/hooks/dhslegen/digital-delivery-team/pre-tool-use"><img src="https://agentmods.dev/badge/hooks/dhslegen/digital-delivery-team/pre-tool-use.svg" alt="Measured on agentmods" height="20"></a>Grade A, and why
PreToolUse 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 5d 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.
This is a copy
88% identical to SessionStart — 10 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
What it actually says
{
"PreToolUse": [
{
"matcher": "Bash|Write|Edit|MultiEdit|Task",
"hooks": [
{
"type": "command",
"command": "node -e 'const p=require(\"path\"),f=require(\"fs\"),o=require(\"os\");const ok=r=>r&&f.existsSync(p.join(r,\"hooks\",\"plugin-hook-bootstrap.js\"));const r=(()=>{const e=process.env.DDT_PLUGIN_ROOT||process.env.CLAUDE_PLUGIN_ROOT;if(ok(e))return p.resolve(e);const h=p.join(o.homedir(),\".claude\");for(const s of [[\"digital-delivery-team\"],[\"digital-delivery-team@digital-delivery-team\"],[\"marketplace\",\"digital-delivery-team\"],[\"marketplaces\",\"digital-delivery-team\"]]){const c=p.join(h,\"plugins\",...s);if(ok(c))return c}try{const ms=p.join(h,\"plugins\",\"marketplaces\");for(const m of f.readdirSync(ms,{withFileTypes:true})){if(!m.isDirectory())continue;const dr=p.join(ms,m.name);if(ok(dr))return dr;const ne=p.join(ms,m.name,\"digital-delivery-team\");if(ok(ne))return ne}}catch{}try{const cb=p.join(h,\"plugins\",\"cache\");for(const pub of f.readdirSync(cb,{withFileTypes:true})){if(!pub.isDirectory())continue;const pd=p.join(cb,pub.name,\"digital-delivery-team\");if(!f.existsSync(pd))continue;for(const v of f.readdirSync(pd,{withFileTypes:true}))if(v.isDirectory()){const c=p.join(pd,v.name);if(ok(c))return c}}}catch{}return null})();if(!r){process.stderr.write(\"[DDT Hook] Plugin root not found; skipping\\n\");process.exit(0)}process.env.DDT_PLUGIN_ROOT=r;process.env.CLAUDE_PLUGIN_ROOT=r;process.argv.splice(1,0,p.join(r,\"hooks\",\"plugin-hook-bootstrap.js\"));require(process.argv[1])' ddt:pre-tool-use hooks/handlers/pre-tool-use.js standard,strict"
}
],
"description": "Record digital-delivery-team tool preflight metrics",
"id": "ddt:pre-tool-use"
}
]
}What else hooks.json configures
This page is one entry in a file that holds 8. Installing the file brings all of them; each is measured and scanned on its own page.
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.
- 5d ago First seen · 15 lines scan A 101ca3fafee4
PreToolUse is a hook published in the GitHub repository dhslegen/digital-delivery-team (1 stars, last pushed 3mo 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. It is 88% identical to SessionStart, differing in 10 lines, and is treated as a copy.
Other hooks, from other repositories
PostToolUse
Runs after a tool call finishes for Write and Edit tool calls, running an inline shell check (2 commands). From wigtn/wigtn-plugins.
SessionStart
Runs when a session starts, executing check-update.sh. From dhernz/site-to-prompt.
UserPromptSubmit
Runs when you submit a prompt, before the agent sees it, executing guard-sensitive-data.sh. From lendtrain/mortgage.
TaskCompleted
Runs when a task is marked completed, executing journal_event.sh via bash. From Nova-Violet-Role/RoT-DTD-GOAL.
ConfigChange
Runs on the ConfigChange event, executing journal_event.sh via bash. From Nova-Violet-Role/RoT-DTD-GOAL.
SessionStart
Runs when a session starts, executing on-start.js via node. From google-gemini/gemini-cli.