Skip to content
Agent Memory
Hook

Hooks

What andon runs automatically, and when. A hook is a command Claude Code fires at a fixed moment, without you asking for it.

From plugin
andon
1701 skill5 agents3 commands3 hooks

Claude Code

> /plugin marketplace add PrimeFoldTools/andon
> /plugin install andon@primefold-tools

What fires, and when

Stop

  • [ -f "${CLAUDE_PLUGIN_ROOT}/hooks/claim_check_hook.py" ] && CLAIM_CHECK_ENFORCE_MODE=warn python3 "${CLAUDE_PLUGIN_ROOT}/hooks/claim_check_hook.py" || true

UserPromptSubmit

Fires before Claude sees each prompt you send. A plugin can use it to inject context, so the same instruction reaches the model every turn instead of only at session start.

  • [ -f "${CLAUDE_PLUGIN_ROOT}/hooks/auto_orient.py" ] && python3 "${CLAUDE_PLUGIN_ROOT}/hooks/auto_orient.py" || true

PreToolUse

  • MatchesBash[ -f "${CLAUDE_PLUGIN_ROOT}/hooks/pipe_guard_hook.py" ] && python3 "${CLAUDE_PLUGIN_ROOT}/hooks/pipe_guard_hook.py" || true
Read hooks/hooks.json

Where it lives

  • hooks/auto_orient.pyRunsGitHub
    Read the script
    #!/usr/bin/env python3
    """
    auto_orient.py — UserPromptSubmit hook that loads your MEMORY.md index into context
    at the start of a session, so the agent starts oriented instead of amnesiac.
    
    This is the other half of the anti-amnesia loop: the wrap protocol SAVES state at
    session end; orient LOADS it at the start. Two hooks, one loop.
    
    USAGE
      1. Copy to your agent config dir (e.g. ~/.claude/hooks/).
      2. Register as a UserPromptSubmit hook in settings.json — MERGE into any existing array:
           { "hooks": { "UserPromptSubmit": [{ "matcher": "*",
               "hooks": [{ "type": "command",
                 "command": "python3 /ABSOLUTE/PATH/TO/.claude/hooks/auto_orient.py" }] }] } }
      3. It looks for `memory/MEMORY.md` (then `MEMORY.md`) in the project; override with
         AUTO_ORIENT_MEMORY_PATH=/abs/path/to/MEMORY.md
         A project file is skipped if it is a symlink, if its real path is outside the
         project folder (for example a symlinked memory/ folder), or if it is not a regular
         file. A cloned repo cannot point the hook at a file elsewhere on your disk. The
         override path is yours, so it may live anywhere.
      4. It injects the index ONCE per session (not every turn — that would waste context).
         Turn it off with AUTO_ORIENT=off.
      5. It caps the index text at 8000 bytes (a one-line header and a truncation note are
         added on top); override with AUTO_ORIENT_MAX_BYTES=N. A value that is not a
         positive whole number falls back to 8000.
    
    Fail-safe by design: any error, a missing file, or an already-oriented session →
    injects nothing and never blocks the prompt. (Contract: UserPromptSubmit context
    injection = {"hookSpecificOutput": {"hookEventName": "UserPromptSubmit",
    "additionalContext": "..."}}, exit 0.)
    """
    from __future__ import annotations
    
    import hashlib
    import json
    import os
    import stat
    import sys
    import tempfile
    import time
    from pathlib import Path
    
    DEFAULT_MAX_BYTES = 8000
    
    
    def _max_bytes():
        # Parsed at call time, not import time: an int() at module level ran outside the
        # fail-safe try below, so AUTO_ORIENT_MAX_BYTES=abc crashed the hook (exit 1).
        try:
            n = int(os.environ.get("AUTO_ORIENT_MAX_BYTES", ""))
        except ValueError:
            return DEFAULT_MAX_BYTES
        return n if n > 0 else DEFAULT_MAX_BYTES  # 0 / negative would keep nothing
    
    
    def _emit_context(text):
        sys.stdout.write(
            json.dumps(
                {
                    "hookSpecificOutput": {
                        "hookEventName": "UserPromptSubmit",
                        "additionalContext": text,
                    }
                }
            )
            + "\n"
        )
        sys.exit(0)
    
    
    def _noop():
        sys.exit(0)
    
    
    def _project_root(cwd):
        try:
            return Path(cwd).resolve(strict=True)
        except (OSError, RuntimeError):
            return None
    
    
    def _safe_project_file(candidate, root):
        """Return the resolved path of a project MEMORY.md only if it is safe to read.
    
        A cloned repo controls everything under the project folder, so refuse: a symlink at
        the file itself, any path whose real location is outside the project root (this also
        catches a symlinked parent folder such as memory/ -> /elsewhere), and anything that is
        not a regular file (FIFO, device, directory).
        """
        try:
            if candidate.is_symlink():
                return None
            real = candidate.resolve(strict=True)
            real.relative_to(root)  # ValueError when the real path escapes the project
            if not stat.S_ISREG(os.lstat(real).st_mode):
                return None
            return real
        except (OSError, RuntimeError, ValueError):
            return None
    
    
    def _find_memory(cwd):
        """Return (path, root). root is None for the user's own override path."""
        override = os.environ.get("AUTO_ORIENT_MEMORY_PATH")
        if override:
            # Set by the user in their own environment, not by the repo: it may live
            # anywhere and may be a symlink, but it must still be a regular file.
            try:
                p = Path(override).expanduser().resolve(strict=True)
                if stat.S_ISREG(os.stat(p).st_mode):
                    return p, None
            except (OSError, RuntimeError):
                pass
        if cwd:
            root = _project_root(cwd)
            if root is not None:
                for c in (Path(cwd) / "memory" / "MEMORY.md", Path(cwd) / "MEMORY.md"):
                    real = _safe_project_file(c, root)
                    if real is not None:
                        return real, root
        return None, None
    
    
    def _read_capped(path, limit, no_follow):
        """Read at most `limit` bytes. Never follows a final symlink for project files and
        never blocks on a FIFO swapped in after the checks above."""
        flags = os.O_RDONLY | getattr(os, "O_NONBLOCK", 0)
        if no_follow:
            flags |= getattr(os, "O_NOFOLLOW", 0)
        fd = os.open(str(path), flags)
        try:
            if not stat.S_ISREG(os.fstat(fd).st_mode):
                return None
            chunks, left = [], limit
            while left > 0:
                b = os.read(fd, min(left, 65536))
                if not b:
                    break
                chunks.append(b)
                left -= len(b)
            return b"".join(chunks)
        finally:
            os.close(fd)
    
    
    MARKER_MAX_AGE_S = 7 * 24 * 3600
    
    
    def _marker_dir():
        """Private per-user folder for the once-per-session markers (0700, owned by us)."""
        d = Path(tempfile.gettempdir()) / f"andon-auto-orient-{os.getuid()}"
        try:
            d.mkdir(mode=0o700)
        except FileExistsError:
            pass
        st = os.lstat(d)
        if not stat.S_ISDIR(st.st_mode) or st.st_uid != os.getuid():
            raise OSError("marker dir is not a private directory")
        if st.st_mode & 0o077:
            os.chmod(d, 0o700)
        return d
    
    
    def _prune_markers(d):
        """Delete markers older than MARKER_MAX_AGE_S, so they no longer pile up."""
        cutoff = time.time() - MARKER_MAX_AGE_S
        try:
            entries = list(os.scandir(d))
        except OSError:
            return
        for e in entries:
            try:
                if (e.name.startswith("auto_orient_"
  • hooks/claim_check_hook.pyRunsGitHub
    Read the script
    #!/usr/bin/env python3
    """
    claim_check_hook.py — Stop-hook enforcer skeleton.
    
    Blocks turn-end if the assistant claims "done / shipped / verified / complete"
    without a recent verification log entry that refers to that specific claim and
    was written in the same session. Make the agent's done-claim mean something.
    
    USAGE
      1. Copy hooks/claim_check_hook.py + hooks/log_claim.py into your agent config dir
         (e.g. ~/.claude/hooks/).
      2. Register as a Stop hook in settings.json — MERGE into any existing "Stop" array,
         don't overwrite it:
           { "hooks": { "Stop": [{ "matcher": "*",
               "hooks": [{ "type": "command",
                 "command": "CLAIM_CHECK_ENFORCE_MODE=warn python3 /abs/path/to/claim_check_hook.py" }] }] } }
      3. Tell your agent (in CLAUDE.md) that after it verifies a done-claim it must log it:
           python3 /abs/path/to/log_claim.py "what I claimed" "how I verified it"
         log_claim.py creates ~/.claude/state/claim_checks/log.jsonl on first run.
      4. Test it fired:
           echo '{"transcript_path":"/dev/null"}' | python3 claim_check_hook.py
           → should print {"continue": true, ...}
      5. Modes (default = warn; promote to block once you trust it):
           CLAIM_CHECK_ENFORCE_MODE=warn    # surface a warning, don't block  (DEFAULT)
           CLAIM_CHECK_ENFORCE_MODE=block   # block turn-end until a fresh log entry exists
           CLAIM_CHECK_ENFORCE_MODE=off     # silent pass-through
      6. Evidence source (opt-in, v0.2; independent of the mode above):
           CLAIM_CHECK_EVIDENCE=log     # the agent's own log_claim.py line           (DEFAULT)
           CLAIM_CHECK_EVIDENCE=tool    # a harness-recorded PASSING verification run in the
                                        # transcript, this session, inside the window
           CLAIM_CHECK_EVIDENCE=both    # both of the above
         A non-blank unrecognized value is treated as "both" (strictest), not as "log"; a
         blank value means "log". In tool/both mode an internal error fails CLOSED.
         The message checked is the hook input's last_assistant_message when it is a string;
         otherwise the transcript's newest assistant entry. If that entry is stale (older than
         STALE_THRESHOLD_S), log mode passes; tool/both mode re-reads for up to STALE_RETRY_S,
         then fails CLOSED. See HOOK_INSTALL.md, "Which message is checked".
         CLAIM_CHECK_VERIFY_COMMANDS="pytest,make test" overrides the allowlist.
    
    NOTE — this is a STOP hook; Stop hooks block with {"decision": "block"}.
    A PreToolUse hook uses a DIFFERENT schema ({"hookSpecificOutput": {"permissionDecision": "deny"}}).
    The two are NOT interchangeable — using the wrong one is a silent no-op.
    
    KNOWN LIMITS (binding is a forcing function, not a cryptographic guarantee):
      - Binding is by content-token overlap: it establishes TOPICAL correspondence, not proof.
        An agent that names the subject in its verification without doing the work can pass
        (legible on the record), and an incidental shared word — a file extension ("py"), an
        adverb ("successfully"), a number ("200") — can bind unrelated claim/evidence.
      - A truly subjectless closure ("Done." with no other content in the turn) is unbindable
        and degrades to a same-session freshness floor (still stronger than global freshness).
      - Two claims in the SAME sentence share that sentence's subject tokens (claims in
        DIFFERENT sentences are bound separately).
      - log_claim.py records the session from CLAUDE_CODE_SESSION_ID (set by Claude Code) or
        CODEX_SESSION_ID / CODEX_THREAD_ID (set by Codex CLI). Under a harness that sets none of
        them, entries are session-less and cannot clear a session-bound
        claim — the verification must run in the same session that makes the claim.
      - CLAIM_CHECK_EVIDENCE=tool reads the transcript, which the agent's own Bash can still
        append to: forging a passing run is possible — deliberate, and the call that writes it
        is recorded, though the forging code can hide inside a script that call runs. A
        recorded run is not bound to the claim's subject (any passing pytest covers "the
        migration is complete"), it says nothing about whether the tests are meaningful or
        selected (-k, -run NOMATCH), and it can predate later edits. The allowlist credits a
        command LINE (the harness-recorded input.command), not the program that ran: a fake
        `pytest` on PATH, ./pytest, a shell function or (global) alias named pytest passes.
        Only the Bash tool's record shape is verified; Monitor, MCP tools, PowerShell and
        subagent (sidechain) runs are not credited. A block holds one turn (stop_hook_active).
      - "**DONE** Want me to deploy?" (a bold marker followed by a question on the same line) is
        exempted as a question — genuinely ambiguous; terminator-ended closures ("Done. Anything
        else?") are treated as completed assertions and DO gate. Plain bullet closers
        ("- Fixed the auth bug.") are a known detector-recall gap, tracked with issue #3.
    
    CUSTOMIZE
      - COMPLETION_VERBS — closure verbs that trigger the check (kept tight to avoid false-fires).
      - OPT_IN_VERBS — looser verbs; enable only if your domain needs them.
      - CLOSURE_NOUNS — subjects for the bare "Task complete!" / "Migration done." form.
      - CLAIM_CHECK_FRESH_MIN — "fresh" window (15 is forgiving; don't go below ~5).
      - OVERLAP_MIN_TOKENS — content tokens a log entry must share with the claim (default 1).
      - CLAIM_CHECKS_LOG_PATH env var — override the log location.
    """
    from __future__ import annotations
    
    import json
    import os
    import re
    import shlex
    import sys
    import tempfile
    import time
    import unicodedata
    from bisect import bisect_left, bisect_right
    from datetime import datetime, timezone
    from pathlib import Path
    
    # ---------- CONFIG (edit these) ----------
    CLAIM_CHECKS_LOG = Path(
        os.environ.get(
            "CLAIM_CHECKS_LOG_PATH",
            str(Path.home() / ".claude" / "state" / "claim_checks" / "log.jsonl"),
        )
    ).expanduser()
    CLAIM_CHECK_FRESH_MIN = 15      # minutes — log entries newer than this co
  • hooks/log_claim.pyGitHub
    Read the script
    #!/usr/bin/env python3
    """
    log_claim.py — write the verification entry that claim_check_hook.py looks for.
    
    Run this right AFTER you actually verify a done-claim:
    
        python3 log_claim.py "what you claimed" "how you verified it"
    
    It creates ~/.claude/state/claim_checks/log.jsonl on first run, so the very first
    claim doesn't get blocked by a missing file/dir. Override the location with the
    CLAIM_CHECKS_LOG_PATH env var (must match the hook's).
    
    Each entry also stamps:
      - session_id — from CLAUDE_CODE_SESSION_ID (Claude Code) or, when that is unset,
        CODEX_SESSION_ID / CODEX_THREAD_ID (Codex CLI), so one session's log cannot alibi
        another session's claim on a shared $HOME.
      - claim_fingerprint — content tokens of the claim (subject nouns, closure verbs
        stopworded), so the hook can require a fresh entry that plausibly refers to the
        specific claim being made rather than accepting any recent entry. See issue #2.
    """
    from __future__ import annotations
    
    import json
    import os
    import re
    import sys
    from datetime import datetime, timezone
    from pathlib import Path
    
    CLAIM_CHECKS_LOG = Path(
        os.environ.get(
            "CLAIM_CHECKS_LOG_PATH",
            str(Path.home() / ".claude" / "state" / "claim_checks" / "log.jsonl"),
        )
    ).expanduser()
    
    # ---- claim fingerprinting (MUST stay byte-identical to claim_check_hook.py) ----
    # Closure verbs are stopworded: they appear in every done-claim, so binding on them
    # would be vacuous ("done" matches "done"). Only SUBJECT tokens (migration, endpoint,
    # paginator) carry the fingerprint. Cross-file consistency is pinned by a test.
    _STOPWORDS = frozenset({
        "the", "a", "an", "is", "are", "was", "were", "be", "been", "being",
        "has", "have", "had", "this", "that", "these", "those", "and", "or", "but",
        "to", "of", "in", "on", "at", "it", "its", "for", "with", "now", "all",
        "not", "from", "into", "out", "up", "down", "so", "as", "by", "just", "then",
        "also", "ive", "weve", "our", "your", "my", "me", "we", "i",
        # closure verbs — must NOT bind
        "done", "complete", "completed", "completing", "ready", "verified", "verify",
        "fixed", "fix", "resolved", "resolve", "shipped", "ship", "live", "set",
        "wired", "implemented", "implement", "applied", "apply", "patched", "synced",
        "finished", "finish", "production", "working",
        "merged", "pushed", "deployed", "committed", "tested", "works", "pass", "passes",
        "passed", "passing",
        # generic dev nouns — too common to bind a specific claim on their own
        "test", "tests", "code", "file", "files", "thing", "things", "stuff",
        "work", "item", "items", "run", "ran",
    })
    
    
    def _content_tokens(text):
        toks = re.findall(r"[a-z0-9]+", (text or "").lower())
        return {t for t in toks if len(t) >= 2 and t not in _STOPWORDS}
    
    
    def _fingerprint(*texts):
        # Fingerprint the claim AND the verification: an honest verification usually
        # names the artifact ("route", "alembic", "stripe"), so a claim worded
        # differently from the verification still binds. See issue #2 discussion.
        return " ".join(sorted(_content_tokens(" ".join(t for t in texts if t))))
    
    
    def _session_id():
        """The current agent session id. Claude Code sets CLAUDE_CODE_SESSION_ID. Codex CLI
        sets CODEX_SESSION_ID (and CODEX_THREAD_ID, the same value) in the shell its agent
        runs commands in; that value equals the `session_id` Codex passes to the Stop hook.
        CLAUDE_CODE_SESSION_ID wins when both are set, so Claude Code behaviour is unchanged."""
        for var in ("CLAUDE_CODE_SESSION_ID", "CODEX_SESSION_ID", "CODEX_THREAD_ID"):
            val = os.environ.get(var, "")
            if val:
                return val
        return ""
    
    
    def main():
        claim = sys.argv[1] if len(sys.argv) > 1 else ""
        verification = sys.argv[2] if len(sys.argv) > 2 else ""
        if not claim or not verification:
            print(
                'usage: python3 log_claim.py "<what you claim>" "<how you verified it>"',
                file=sys.stderr,
            )
            sys.exit(2)
    
        CLAIM_CHECKS_LOG.parent.mkdir(parents=True, exist_ok=True)
        entry = {
            "timestamp": datetime.now(timezone.utc).isoformat(),
            "claim": claim,
            "verification": verification,
            "session_id": _session_id(),
            "claim_fingerprint": _fingerprint(claim, verification),
        }
        with CLAIM_CHECKS_LOG.open("a", encoding="utf-8") as f:
            f.write(json.dumps(entry) + "\n")
        print(f"logged → {CLAIM_CHECKS_LOG}")
    
    
    if __name__ == "__main__":
        main()
    
  • hooks/pipe_guard_hook.pyRunsGitHub
    Read the script
    #!/usr/bin/env python3
    """
    pipe_guard_hook.py — PreToolUse hook: stop a test run whose exit status would lie.
    
    The claim-check Stop hook (tool/both mode) already refuses to CREDIT a run like
    `pytest -q | tail -3`: without `pipefail`, the shell reports tail's exit status, so a
    failing suite looks green. But that refusal arrives at turn end, after the agent has read
    the wrong status and moved on. This hook catches the same line BEFORE it runs, says why,
    and gives the fix, so the agent reruns it in a form the harness records honestly.
    
    It denies a Bash command when an allowlisted verification command (the same list as
    claim-check: pytest, npm test, cargo test, ... or CLAIM_CHECK_VERIFY_COMMANDS) is
      - piped into anything (`|` or `|&`) with no `set -o pipefail` earlier in the command, or
      - followed by `||`, directly or later in the same `&&`/`||` chain (`pytest || true`,
        `pytest && echo ok || true`). The line's status is then the handler's, not the test's.
    
    Everything else is allowed, including `set -o pipefail; pytest | tail -3`, a bare run,
    `pytest > out.txt`, `pytest; echo $?` and `pytest --help | head`. Commands it cannot
    tokenize are allowed: the Stop hook still withholds credit from them.
    
    What it does NOT see (it allows these): a verification inside `bash -c "..."`, `$(...)`,
    a script, a Makefile target or an alias; a group piped as a whole (`{ pytest; } | tail`,
    `(pytest) | tail`); a `set -o pipefail` that runs in a subshell or may be skipped
    (`(set -o pipefail); ...`, `false && set -o pipefail; ...`); a wrapper option it does not
    know that takes a value (`uv run --some-new-flag X pytest`). Heredoc bodies are skipped as
    data, including an unquoted one whose `$(...)` the shell would run. A deny costs one rerun.
    
    Config:
      ANDON_PIPE_GUARD=on       enable (default: off). `1`, `true` and `yes` also enable it,
                                in any case; any other value, or none, leaves it off.
      CLAIM_CHECK_VERIFY_COMMANDS="pytest,make test"   overrides the command list
    
    Input: the PreToolUse JSON on stdin. Output: a deny decision on stdout, or nothing.
    Never fails closed: any error allows the call.
    """
    from __future__ import annotations
    
    import json
    import os
    import re
    import shlex
    import sys
    from pathlib import Path
    
    _HERE = Path(__file__).resolve().parent
    _ASSIGNMENT = re.compile(r"^[A-Za-z_][A-Za-z0-9_]*=")
    _OPS = ("<<<", "<<-", "||", "|&", "&&", ";;", ">>", ">&", "&>", "<<", ">|", "<&",
            "|", "&", ";", "\n", "(", ")", "<", ">")
    _LIST_OPS = ("||", "&&", ";;", "&", ";", "\n")
    _PIPE_OPS = ("|", "|&")
    _GROUPING = ("(", ")")
    _KEYWORDS = frozenset(("if", "then", "elif", "else", "while", "until", "do", "!", "{", "}",
                           "fi", "done"))
    # Wrappers that run a later word as the command, with the options that take a separate
    # value (`timeout -s TERM 300 pytest`, `env -u PYTHONPATH pytest`). The command is the
    # first word after the wrapper's options (and env's VAR=value, timeout's duration).
    _WRAP_VALUE_OPTS = {
        "env": {"-u", "--unset", "-C", "--chdir", "-S", "--split-string"},
        "time": set(), "nohup": set(), "command": set(),
        "nice": {"-n", "--adjustment"},
        "exec": {"-a"},
        "timeout": {"-s", "--signal", "-k", "--kill-after"},
        "gtimeout": {"-s", "--signal", "-k", "--kill-after"},
        "stdbuf": {"-i", "-o", "-e", "--input", "--output", "--error"},
        "caffeinate": {"-t", "-w"},
    }
    _WRAP_RUN = frozenset(("uv", "poetry", "pipenv", "hatch", "pdm", "rye"))  # `X run ...`
    _RUN_VALUE_OPTS = frozenset((
        "--with", "--with-editable", "--with-requirements", "--python", "-p", "--project",
        "--directory", "--extra", "--group", "--only-group", "--package", "--env-file",
        "--index", "--default-index", "--index-url", "-i", "--extra-index-url", "-C", "-P",
        "-w", "-e", "--env"))
    _INFO_ARGS = frozenset(("--help", "-h", "--version", "-V"))  # prints, runs no tests
    _PLAIN_WORD = re.compile(r"[A-Za-z0-9_@%+=:,./~-]+")
    
    
    def _tokens(s):
        """Split a command line into [("w", word) | ("op", op)], the way bash reads it for
        this purpose: quotes make one word (so a quoted `|` is not a pipe), a `#` at the start
        of a word comments to end of line (the newline stays), backslash-newline joins lines,
        and a heredoc body (`<<EOF` ... `EOF`) is skipped: it is data, not commands.
        Raises ValueError on an unclosed quote."""
        out, cur, have, i, n = [], [], False, 0, len(s)
        want_delim, heredocs = None, []  # (delimiter, strip leading tabs) for each pending body
    
        def flush():
            nonlocal cur, have, want_delim
            if have:
                out.append(("w", "".join(cur)))
                if want_delim is not None:
                    heredocs.append(("".join(cur), want_delim))
                    want_delim = None
            cur, have = [], False
    
        while i < n:
            c = s[i]
            if c == "\\":
                if s[i + 1:i + 2] == "\n":
                    i += 2  # line continuation
                    continue
                cur.append(s[i + 1:i + 2])
                have, i = True, i + 2
            elif c in " \t\r":
                flush()
                i += 1
            elif c == "#" and not have:
                j = s.find("\n", i)
                i = n if j < 0 else j
            elif c == "'":
                j = s.find("'", i + 1)
                if j < 0:
                    raise ValueError("unclosed '")
                cur.append(s[i + 1:j])
                have, i = True, j + 1
            elif c == '"':
                j, buf = i + 1, []
                while j < n and s[j] != '"':
                    if s[j] == "\\" and j + 1 < n:
                        j += 1
                    buf.append(s[j])
                    j += 1
                if j >= n:
                    raise ValueError('unclosed "')
                cur.append("".join(buf))
                have, i = True, j + 1
            elif c in "|&;<>()\n":
                flush()
                op = next(o for o in _OPS if s.startswith(o, i))
                if not (op == "\n" and out and out[-1][0] == "op"
                        and out[-1][1] in ("|", "|&", "&&", "||")):
                    out.appen

Read the script before you install anything that runs on your machine. This is the one part of a plugin that acts without being asked.

@primefoldtools
Ships withandon

Stop fixing the same AI mistake twice. A Lean quality system for AI-assisted work — operators turn recurring defects into countermeasures. Built by a manufacturing operator, for people who actually ship.

1701 skill5 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
170
Star history of PrimeFoldTools/andon on GitHub, a chart by star-history.com

More plugins that ship hooks.

mempalace

mempalace

Gives Claude Code a private memory that stays on your machine. It stores past conversations word for word, so you can ask what was decided, what happened before, or who was involved and get the original context back. It can also hand tasks to other agents.

3 skills+361k
@milla-jovovich@milla-jovovich
Install Plugin
mempalace

mempalace

Local-first memory for Claude Code. It stores conversations verbatim in a private palace you can search before answering about past work, people, projects, or decisions, with optional shared-brain hub setup.

3 skills+361k
@mempalace@mempalace
Install Plugin
context-mode

context-mode

Keeps large command outputs, logs and data files out of your AI assistant's context by running processing in a sandbox and returning only the relevant parts. You also get a searchable index of local files and diagnostics for checking the setup.

4 skills4 hooks35k
@mksglu@mksglu
Install Plugin
context-mode

context-mode

Keeps large tool outputs, logs, and files out of Claude Code's context window by processing them in a sandbox and indexing them for focused search. Includes diagnostics and a knowledge base indexer.

4 skills4 hooks34k
@mksglu@mksglu
Install Plugin
ai-memory

ai-memory

Gives coding agents a git-backed wiki for long-term project memory, with skills for retrieval, durable notes, session handoffs between agents, cross-project messaging, and memory consolidation.

7 skills+216k
@akitaonrails@akitaonrails
Install Plugin
letta-code

letta-code

A coding agent harness whose agents keep memory and identity across sessions, so they learn and improve over time. You can run it in a terminal, in the browser, or through Telegram, Slack and Discord.

26 skills8 hooks3.9k
@letta-ai@letta-ai
Install Plugin
token-optimizer

token-optimizer

Audits a Claude Code or Codex setup for context-window waste, fixes it with the user's approval, and measures the savings. It also tracks costs, helps resume prior sessions, and offers a usage dashboard.

5 skills+23.2k
@alexgreensh@alexgreensh
Install Plugin
claude-subconscious

claude-subconscious

A background agent for Claude Code that watches your sessions and reads your files, builds up memory over time, and offers guidance back during your work.

4 hooks2.9k
@letta-ai@letta-ai
Install Plugin

Questions about the hooks in andon.

Which coding agents can use the hooks in andon?
The hooks in andon install in Claude Code and Cursor: each runs Claude Code hooks from .claude/settings.json, so copy the hooks there.