AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified Apache-2.0 Self-run

State Overlay Consistency Checker

skill-sounder25-foundational-agent-skills-22-state-overlay-consistency · by Sounder25

Detect and prevent state-visibility violations across execution contexts within a single transaction.

No reviews yet
0 installs
5 views
0.0% view→install

Install

$ agentstack add skill-sounder25-foundational-agent-skills-22-state-overlay-consistency

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-sounder25-foundational-agent-skills-22-state-overlay-consistency)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
2mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of State Overlay Consistency Checker? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

SKILL-022 — State Overlay Consistency Checker

Status

PROPOSED → VERIFIED (after EELS reproduction)

Purpose

Detect and prevent state-visibility violations across execution contexts within a single transaction.

This skill ensures that state mutations (code deployment, storage writes, warm slots, balances) performed in one execution frame (e.g., CREATE, CREATE2) are visible and inherited by all subsequent execution contexts (CALL, DELEGATECALL, STATICCALL) during the same transaction.

This skill exists to stop silent gas under-charging and consensus-breaking execution paths.

Problem Class

Silent Overlay Forking

A transaction performs:

  1. CREATE / CREATE2
  2. Writes code to state
  3. Immediately performs CALL to the created address

But:

  • Child execution context does not see the deployed code.
  • Call executes as if target is empty.
  • Gas accounting under-charges.
  • Final balances diverge from expected EELS state.

This failure is invisible to standard unit tests unless gas and state continuity are explicitly validated.

Trigger

  • Manual: verify state continuity
  • Automatic (any single transaction):
  • CREATE → CALL
  • CREATE2 → CALL
  • CREATE → DELEGATECALL
  • TSTORE → CALL
  • SSTORE → CALL

Preconditions

  • Transaction-scoped execution
  • Nested execution contexts / overlays
  • Ability to inspect:
  • Code
  • Storage
  • Gas accounting
  • Frame hierarchy

Core Invariants

1. Code Visibility Invariant

If code is written at address A at time T, then: GetCode(A) MUST return non-empty for all execution frames at time > T within the same transaction.

Violation ⇒ FAIL

2. Overlay Inheritance Invariant

Every child execution frame must:

  • Inherit parent overlay state
  • Not fork from base/global snapshot
  • Preserve:
  • Code hashes
  • Storage roots
  • Warm slot sets

Unexpected divergence ⇒ FAIL

3. Gas Propagation Sanity Check

For any CALL:

  • If target address has non-empty code: Child execution must consume gas.
  • If total gas charged equals base cost only (e.g., 2600): Flag as probable invisible execution.

This check is heuristic but high-confidence.

4. Write-Then-Read Consistency

Detect patterns:

  • SetCode → GetCode
  • SSTORE → SLOAD
  • TSTORE → TLOAD

If a read does not observe a prior write within the same transaction, fail immediately.

Output

PASS

{
  "status": "PASS",
  "frames_checked": 7,
  "mutations_verified": 14
}

FAIL

{
  "status": "FAIL",
  "failure_type": "state_overlay_inconsistency",
  "address": "0x05d4acfafec9c8ac000000000000000000000000",
  "symptoms": [
    "CALL charged base gas only",
    "child execution gas == 0",
    "deployed code invisible"
  ],
  "root_cause_hint": "Subcall created fresh overlay without inheriting parent state"
}

Severity

  • Critical
  • Silent gas mis-accounting
  • Invalid execution semantics
  • Potential consensus divergence
  • Auto-block recommended

Integration

| Skill | Role | |-------|------| | SKILL-007 | Requires invariants | | SKILL-017 | Detects stuck execution | | SKILL-018 | Hard pre-execution gate | | SKILL-019 | Red-team scenario gen | | SKILL-020 | Postmortem logging |

Design Principle

State changes are meaningless unless they are observable.

Origin

Derived from: CS-001 — State Overlay Visibility Failure during CREATE2 → CALL execution.

This skill exists to prevent gas-math patches that mask state-propagation bugs.

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.