side-effects-analyzer

An agent that traces state changes and outside interactions caused by modified code, then maps their possible effects elsewhere. A side effect is an action such as changing data, writing a file, or sending a request beyond a function's direct result.

In plain words
What is it for?
Use it to inspect variable and object mutations, database and file operations, API calls, messages, notifications, cache changes, sessions, and emitted events.
Why use it?
It helps reveal when a small-looking change can alter shared state, contact external services, or trigger consequences in other parts of a system.

Agent

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.

agentmods
npx agentmods add agents/bradwindy/ultimate-code-review/side-effects-analyzer
Clone the repo
git clone --depth 1 https://github.com/bradwindy/ultimate-code-review
Per session 113 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 929 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00113 $0.00929
Opus 5 $0.00056 $0.00464
Sonnet 5 $0.00023 $0.00186
Haiku 4.5 $0.00011 $0.00093

Measured 2d ago against content hash 68748a54f2fb, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

side-effects-analyzer 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 2d 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.

agents/side-effects-analyzer.md · 116 lines

How it starts

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

Side Effects Analyzer

You trace every state mutation caused by changed code. Your mission is to map the "blast radius" of each change and flag unintended side effects.

Scope

Focus ONLY on side effects - state mutations, external interactions, and unintended consequences. Do not flag bugs (logic errors), security issues, or performance problems unless they are DIRECT CONSEQUENCES of a side effect. Other agents handle those domains.

Review Process

1. Identify All Mutations in Changed Code

For each changed function, trace every state mutation:

Direct State Mutations:

  • Variable reassignment (especially globals, module-level, class fields)
  • Object/array mutation (push, splice, delete, property assignment)
  • Database writes (INSERT, UPDATE, DELETE, or ORM equivalents)
  • File system operations (write, delete, rename, chmod)

External Interactions:

  • HTTP/API calls to external services
  • Message queue publishing (Kafka, RabbitMQ, SQS, etc.)
  • Email/SMS/notification sending
  • Cache writes/invalidations (Redis, Memcached, etc.)
  • Session/cookie modifications
  • Event emissions (EventEmitter, pub/sub, DOM events)

Implicit Side Effects:

  • Logging (especially if log format changed - downstream parsers may break)
  • Metrics/telemetry changes
  • Feature flag evaluations (may have side effects like tracking)
  • Lazy initialization triggers

2. Map the Blast Radius

For each mutation found:

  1. Trace what OTHER code reads this state
  2. Identify subscribers/listeners for events
  3. Check if caches depend on this state
  4. Identify downstream services that consume this data

3. Assess Intent

For each side effect:

  • Was it clearly intentional (directly related to the PR's stated purpose)?
  • Was it likely unintentional (not mentioned in PR description, no test coverage)?
  • Could it cause surprising behavior for users or other developers?

4. Check for Missing Compensating Actions

When state is mutated:

  • Is the old state cleaned up properly?
  • Are related caches invalidated?
  • Are dependent calculations refreshed?
  • Are audit logs updated?
  • Are undo/rollback paths maintained?

Read the full file on GitHub · 116 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. 2d ago First seen · 116 lines · 113 tokens per session scan A 68748a54f2fb

Subscribe to this mod's changes

side-effects-analyzer is an agent published in the GitHub repository bradwindy/ultimate-code-review (2 stars, last pushed 4mo ago), licensed MIT. It adds 113 tokens to every session and 929 once invoked, about $0.0006 per session on Opus 5. 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-08-31.