ap-reactions

ap-reactions is a skill for Claude Code, Codex from agentproto/ts. It costs 110 tokens per session (2,262 once invoked), scanned A, original, Apache-2.0.

An event system that runs a registered action after an agent session is completed. It records receipts so the same completion is not handled twice, even after a restart.

In plain words
What is it for?
Use it to archive completed sessions, add their results to memory, or run another post-session task with retry handling.
Why use it?
It removes the need to manually trigger follow-up work and helps explain whether a reaction ran or failed. It is for work after completion, not for blocking actions before they happen.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to archive completed sessions, add their results to memory, or run another post-session task with retry handling.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/agentproto/ts/ap-reactions
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.

Any agent
npx skills add agentproto/ts --skill ap-reactions
Clone the repo
git clone --depth 1 https://github.com/agentproto/ts

Made for: Claude Code, Codex.

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 ap-reactions

README.md
[![agentmods](https://agentmods.dev/badge/skills/agentproto/ts/ap-reactions/github.svg)](https://agentmods.dev/skills/agentproto/ts/ap-reactions)
Your own site
<a href="https://agentmods.dev/skills/agentproto/ts/ap-reactions"><img src="https://agentmods.dev/badge/skills/agentproto/ts/ap-reactions/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 ap-reactions

Your own site · 80×15
<a href="https://agentmods.dev/skills/agentproto/ts/ap-reactions"><img src="https://agentmods.dev/badge/skills/agentproto/ts/ap-reactions.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 110 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,262 The whole file, excluding the scripts and references it only reads on demand.
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.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00110 $0.02262
Opus 5.5 $0.00044 $0.00905
Sonnet 5.5 $0.00022 $0.00452
Haiku 4.5 $0.00011 $0.00226

Measured 1mo ago against content hash a427057dfeeb, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

ap-reactions 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 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

{ "tool": "terminal_start", "args": { "argv": ["curl", "-s", "-H", "Origin: http://localhost:3000", "http://127.0.0.1:18790/reactions"] } }
packages/skill-pack-agentproto/src/skills/ap-reactions/SKILL.md · 121 lines

How it starts

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

ap-reactions

When to use

  • Something must happen after a session completes, exactly once per completion, even if the daemon restarts in between (archive a finished child, ingest into the brain, run a post-turn pass).
  • You need to know why a reaction did not fire, or whether the durable path is healthy.
  • Not for time-based work (use ap-cron), not for gating a tool call or a spawn before it runs (reactions run after the event, they cannot veto), and not for one-off waiting on a session (use ap-wait-durable).

The model in four lines

  1. An event happens. Today the only event a routine or an on map can use is agentproto:session-completed: a session is terminal AND its outcome says completed (declared, steward verdict, operator "mark as completed") or a completion policy passed. It fires once per terminal transition.
  2. A binding (an event routine, an AGENT.md on entry, or a builtin) matches it.
  3. The runner writes a receipt keyed <session>/<event>/<occurrence>/<binding> before it runs the target. The same completion delivered twice runs once.
  4. The action runs. A failed attempt is retried, up to 3 attempts in total. After a crash, a receipt left running is replayed at boot only if the action is idempotent; a non-idempotent one is logged as stuck and not replayed.

A session that a reaction starts is stamped with origin reaction:<binding> and a depth; the chain stops at depth 4 (receipt dead, reason recursion_cap).

Actions you can name

Only actions registered in the daemon can be named. Anything else is refused and listed under reactions.refused.

Action What it does
session:archive Archives the session of the event. Idempotent. Skips (receipt still done, with an outcomeRef) when the session is missing, already archived, alive, pinned or keepAlive: skipped:session_missing, skipped:already_archived, skipped:alive, skipped:pinned, skipped:keep_alive. A session with a successor is archived too.
session:clerk-pass Runs the AIP-68 clerk pass. It is registered for the builtin clerk reaction, which is its intended driver (see Recipe 3). A routine on agentproto:session-completed could name it, but that is not what it is for, and a routine cannot subscribe to the clerk's own event agentproto:clerk-due. The pass is not idempotent.

Read the full file on GitHub · 121 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. 1mo ago Changed a427057dfeeb
  2. 1mo ago First seen · 121 lines · 110 tokens per session scan A f05510d00fe1

Subscribe to this mod's changes

ap-reactions is a skill published in the GitHub repository agentproto/ts (11 stars, last pushed today), licensed Apache-2.0. It adds 110 tokens to every session and 2,262 once invoked, about $0.0004 per session on Opus 5.5. 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-10-27.

Related

ap-reactions compared with skills from other repositories

ap-reactions next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
ap-reactionsagentproto/tsSkill11todayApache-2.0A110Claude Code, Codex
skill-creator-primersammcj/agentic-codingSkill1743d agoApache-2.0A74Claude Code
llm-wikisammcj/agentic-codingSkill1743d agoApache-2.0A82Claude Code
extract-wisdomsammcj/agentic-codingSkill1743d agoApache-2.0A43Claude Code
apply-mantel-stylessammcj/agentic-codingSkill1743d agoApache-2.0A37Claude Code, Codex
home-assistantsammcj/agentic-codingSkill1743d agoApache-2.0A57Claude Code
deepevalsammcj/agentic-codingSkill1743d agoApache-2.0A19Claude Code, Codex