reafference-corollary-discharge

reafference-corollary-discharge is a skill for OpenCode from plurigrid/asi. It costs 0 tokens per session (2,999 once invoked), scanned A, original, MIT.

A behavior-checking method based on neuroscience: predict the feedback an action should cause, compare it with what actually happened, and focus on the mismatch.

In plain words
What is it for?
It is for analyzing interactions, detecting mismatches between predictions and observations, and adjusting attention to error signals.
Why use it?
It helps separate expected, self-generated effects from unexpected signals that may indicate a problem or threat.

Skill for OpenCode

Written for OpenCode: installed under .opencode/. Also seen: reads .claude/ paths; mentions Codex.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python3 lib/claude_corollary_discharge.py.

Good fit It is for analyzing interactions, detecting mismatches between predictions and observations, and adjusting attention to error signals.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/plurigrid/asi
agentmods
npx agentmods add skills/plurigrid/asi/reafference-corollary-discharge

Made for: OpenCode.

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 reafference-corollary-discharge

README.md
[![agentmods](https://agentmods.dev/badge/skills/plurigrid/asi/reafference-corollary-discharge/github.svg)](https://agentmods.dev/skills/plurigrid/asi/reafference-corollary-discharge)
Your own site
<a href="https://agentmods.dev/skills/plurigrid/asi/reafference-corollary-discharge"><img src="https://agentmods.dev/badge/skills/plurigrid/asi/reafference-corollary-discharge/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 reafference-corollary-discharge

Your own site · 80×15
<a href="https://agentmods.dev/skills/plurigrid/asi/reafference-corollary-discharge"><img src="https://agentmods.dev/badge/skills/plurigrid/asi/reafference-corollary-discharge.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,999 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00000 $0.02999
Opus 5 $0.00000 $0.01499
Sonnet 5 $0.00000 $0.00600
Haiku 4.5 $0.00000 $0.00300

Measured 9d ago against content hash b82a8044627a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

reafference-corollary-discharge 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 9d 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.

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.

ies/music-topos/.opencode/skill/reafference-corollary-discharge/SKILL.md · 387 lines

How it starts

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

Skill: Reafference & Corollary Discharge (von Holst Neuroscience)

Category: Behavioral Verification | Neural Mechanism Implementation Level: Advanced (Requires understanding of: reafference theory, signal processing, corollary discharge) Status: ✓ COMPLETE & OPERATIONAL Trit Assignment: +1 (PLUS) - Active threat detection & signal amplification Propagates To: codex, claude, amp, cursor, copilot


Overview

Implements von Holst's reafference theory (1950) - a breakthrough neuroscience principle describing how organisms distinguish self-generated signals from external threats.

Core Principle:

"The brain doesn't passively receive sensory feedback. It actively PREDICTS what feedback should occur and CANCELS it out. Only MISMATCHES between prediction and sensation reach conscious attention."

This skill applies this mechanism to interaction analysis, creating a complete:

  1. Efference Copy (prediction) generation system
  2. Sensory Reafference (observation) matching
  3. Comparator (error signal) computation
  4. Corollary Discharge (suppression/amplification) mechanism

Key Features

1. Efference Copy Generation

  • Input: Interaction content (file paths, descriptions)
  • Method: SHA-256 hash → color index mapping (1-5)
  • Output: Deterministic predicted color for each interaction
  • Property: Identical predictions for identical inputs

2. Sensory Reafference Matching

  • Input: Observed interaction history from ~/.claude/history.jsonl
  • Method: Compare predicted vs observed colors
  • Output: Match score (0.0 = mismatch, 1.0 = perfect match)
  • Property: TAP state classification (LIVE/VERIFY/BACKFILL)

3. Comparator: Error Signal Computation

  • Formula: error = expected - actual
  • Method: Color distance in 5-color space
  • Output: Error magnitude (0.0-1.0) and threat level
  • Threat Levels:
    • SAFE: error < 0.01 (99% confidence in prediction)
    • WARNING: 0.01 ≤ error < 0.2 (partial mismatch)
    • CRITICAL: error ≥ 0.2 (major divergence)

Read the full file on GitHub · 387 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. 9d ago First seen · 387 lines · 0 tokens per session scan A b82a8044627a

Subscribe to this mod's changes

reafference-corollary-discharge is a skill published in the GitHub repository plurigrid/asi (64 stars, last pushed 2mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,999 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

systematic-debugging

4-phase root cause debugging: understand bugs before fixing.

NousResearch/hermes-agent · 16 tokens

langsmith-observability

LLM observability platform for tracing, evaluation, and monitoring. Use when debugging LLM applications, evaluating model outputs against datasets, monitoring production systems, or building systematic testing pipelines for AI applications.

davila7/claude-code-templates · 45 tokens

experimental-code-coverage-local-debugger

Runs code coverage locally via Universal Test Runner (UTR) or helper scripts, mimicking LUCI trybots. Activate when CQ tryjobs fail or underreport coverage, to test local GN/recipe repairs before uploading, or to debug hermetic crashes.

chromium/chromium · 59 tokens

adversarial-reviewer

Adversarial code review that assumes bugs exist and hunts for them. Use when asked to review code, find bugs, audit for correctness, stress-test a PR, or when someone says "tear this apart" or "what's wrong with this". Give no benefit of the doubt — every line is guilty until proven innocent.

emdash-cms/emdash · 71 tokens

cli-e2e

Write, modify, or debug Docker-based Composio CLI end-to-end tests under ts/e2e-tests/cli, including binary invocation, fixture isolation, output assertions, and package manifests. Use for CLI E2E test suites only; use cli-command for CLI source implementation.

ComposioHQ/composio · 62 tokens

work

Deliver one maintainer-approved EmDash issue, choosing the bug-fix path for a defect and the direct implementation path for an enhancement or task.

emdash-cms/emdash · 31 tokens