Stop

Stop is a hook for Claude Code from sifxprime/kodelyth-ecc. Its token cost is not measured, scanned A, original, MIT.

A set of hooks that run when the agent finishes a response. They can track token use, record user corrections as project lessons, suggest follow-up actions, and run other configured finish-time scripts.

In plain words
What is it for?
Use it to monitor token budgets, capture corrections, save lessons, and trigger end-of-response automation.
Why use it?
They help enforce session limits and retain corrections or useful follow-up information for later work.

Hook for Claude Code

Written for Claude Code: ${CLAUDE_PLUGIN_ROOT} variable.

Runs only inside a plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else, and the catalogue could not identify which plugin ships it.

One of 8 entries in hooks.json upstream. Installing this one merges just its entry into your config; the other 7 are separate, each on its own page.

Good fit Use it to monitor token budgets, capture corrections, save lessons, and trigger end-of-response automation.

Compare 6 hooks from other repositories ↓
Install

Getting it into your agent

There is no command for this one: it runs only inside a plugin, and the catalogue could not identify which plugin ships it. The source is linked below.

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 Stop

README.md
[![agentmods](https://agentmods.dev/badge/hooks/sifxprime/kodelyth-ecc/stop/github.svg)](https://agentmods.dev/hooks/sifxprime/kodelyth-ecc/stop)
Your own site
<a href="https://agentmods.dev/hooks/sifxprime/kodelyth-ecc/stop"><img src="https://agentmods.dev/badge/hooks/sifxprime/kodelyth-ecc/stop/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 Stop

Your own site · 80×15
<a href="https://agentmods.dev/hooks/sifxprime/kodelyth-ecc/stop"><img src="https://agentmods.dev/badge/hooks/sifxprime/kodelyth-ecc/stop.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
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 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Security

Grade A, and why

Stop 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 2mo 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.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

"command": "node -e \"const fs=require('fs');const path=require('path');const {spawnSync}=require('child_process');const raw=fs.readFileSync(0,'utf8');const rel=path.join('scripts','hooks','run-with-flags.js');const hasR
Origin

Copies of this mod

1 near-identical copy found in the catalogue:

hooks/hooks.json · 131 lines

How it starts

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

{
  "Stop": [
    {
      "matcher": "*",
      "hooks": [
        {
          "type": "command",
          "command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/safety/token-budget.js\"",
          "async": false,
          "timeout": 3
        }
      ],
      "description": "Kodelyth Safety: accumulate per-session token usage and warn/block on budget threshold. Opt-in via KODELYTH_TOKEN_BUDGET=<tokens>|warn (default off).",
      "id": "kodelyth:stop:token-budget"
    },
    {
      "matcher": "*",
      "hooks": [
        {
          "type": "command",
          "command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/memory/capture-correction.js\"",
          "async": true,
          "timeout": 8
        }
      ],
      "description": "Kodelyth ECC: detect user corrections in session and encode them as hard rules to tasks/lessons.md (Self-Improvement Loop)",
      "id": "kodelyth:stop:capture-correction"
    },
    {
      "matcher": "*",
      "hooks": [
        {
          "type": "command",
          "command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/hooks/smart-suggest.js\"",
          "async": true,
          "timeout": 5
        }
      ],
      "description": "Kodelyth: Suggest the next logical agent or command after each response based on what just happened",
      "id": "kodelyth:stop:smart-suggest"
    },
    {
      "matcher": "*",
      "hooks": [
        {
          "type": "command",
          "command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/memory/capture-stop.js\"",
          "async": true,
          "timeout": 10
        }
      ],
      "description": "Kodelyth Memory: extract memory candidates from session and queue for review (never auto-stores)",
      "id": "kodelyth:stop:memory-capture"
    },
    {
      "matcher": "*",
      "hooks": [
        {
          "type": "command",
          "command": "node -e \"const fs=require('fs');const path=require('path');const {spawnSync}=require('child_process');const raw=fs.readFileSync(0,'utf8');const rel=path.join('scr

Read the full file on GitHub · 131 lines

Same file

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.

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. 2mo ago First seen · 131 lines scan A db6176c116af

Subscribe to this mod's changes

Stop is a hook published in the GitHub repository sifxprime/kodelyth-ecc (12 stars, last pushed 2d 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 (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Stop compared with hooks from other repositories

Stop next to 6 hooks from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
Stopsifxprime/kodelyth-eccHook122d agoMITA—Claude Code
SessionEnd0Mattias/bettermemoryHook03d agoMITA—Claude Code
SessionStartsupabase/supabaseHook116ktodayApache-2.0A—Claude Code
PostToolUsesupabase/supabaseHook116ktodayApache-2.0A—Claude Code
SessionStartgoogle-gemini/gemini-cliHook109ktodayApache-2.0A—Claude Code
PreToolUseapache/supersetHook76ktodayApache-2.0A—Claude Code
PreToolUseheygen-com/hyperframesHook94ktodayApache-2.0A—Claude Code