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.
npx agentmods add hooks/gregmos/memoforge/pre-tool-usegit clone --depth 1 https://github.com/gregmos/memoforgeGrade A, and why
PreToolUse scanned grade A with 1 finding 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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
"command": "python3 -c \"import json,sys,re; from urllib.parse import urlparse as p; A=frozenset('ada.gov aepd.es aki.ee artificialintelligenceact.eu autoriteprotectiondonnees.be autoriteitpersoonsgegevens.nl azop.hr bay How it starts
The opening of the file, as written. The whole thing — 40 lines — stays where its author put it; the contents beside it link to each section on GitHub.
{
"PreToolUse": [
{
"matcher": "mcp__cowork__(create_artifact|update_artifact|list_artifacts)",
"hooks": [
{
"type": "command",
"command": "python3 -c \"import json,sys; sys.stdout.write(json.dumps({'hookSpecificOutput':{'hookEventName':'PreToolUse','permissionDecision':'allow','permissionDecisionReason':'memoforge live-progress dashboard pre-approved'}}))\""
}
]
},
{
"matcher": "mcp__.*visualize.*__(show_widget|read_me)",
"hooks": [
{
"type": "command",
"command": "python3 -c \"import json,sys; sys.stdout.write(json.dumps({'hookSpecificOutput':{'hookEventName':'PreToolUse','permissionDecision':'allow','permissionDecisionReason':'memoforge visualize widgets pre-approved (Phase 1.5 mockup / Phase 2a + 6.6 elicitation / Phase 3 plan diagram / Phase 12 final dashboard / milestone trackers)'}}))\""
}
]
},
{
"matcher": "^WebSearch$",
"hooks": [
{
"type": "command",
"command": "python3 -c \"import json,sys; sys.stdout.write(json.dumps({'hookSpecificOutput':{'hookEventName':'PreToolUse','permissionDecision':'allow','permissionDecisionReason':'memoforge research WebSearch pre-approved (currency-checker + doctrinal-researcher heavy users)'}}))\""
}
]
},
{
"matcher": "^WebFetch$|^mcp__.*fetch$",
"hooks": [
{
"type": "command",
"command": "python3 -c \"import json,sys,re; from urllib.parse import urlparse as p; A=frozenset('ada.gov aepd.es aki.ee artificialintelligenceact.eu autoriteprotectiondonnees.be autoriteitpersoonsgegevens.nl azop.hr baylda.de bfdi.bund.de bis.org cen.eu cenelec.eu cisa.gov cnil.fr cnpd.public.lu cnpd.pt coe.int congress.gov courtlistener.com cppa.ca.gov cpdp.bg datatilsynet.dk datatilsynet.no datenschutz-berlin.de datenschutz.hessen.de datenschutzkonferenz-online.de dataprotection.gov.cy dataprotection.gov.sk dataprotection.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.
- 2d ago First seen · 40 lines scan A 7068b6c34335
PreToolUse is a hook published in the GitHub repository gregmos/memoforge (20 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 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other hooks, from other repositories
PostToolUse
Runs after a tool call finishes for Write and Edit tool calls, executing format_and_lint.sh. From supabase/supabase.
SessionStart
Runs when a session starts on startup, executing install_pkgs.sh. From supabase/supabase.
SessionStart
Runs when a session starts, executing on-start.js via node. From google-gemini/gemini-cli.
PreToolUse
Runs before the agent uses a tool, executing pre-write.sh and pre-bash.sh (2 commands). From anthropics/claude-cookbooks.
SessionStart
Runs when a session starts, executing session-start.sh. From anthropics/claude-cookbooks.
SessionStart
Runs when a session starts on startup, clear and compact, executing run-hook.cmd. From obra/superpowers.