state-inconsistency-auditor

Identifies state inconsistency bugs by mapping coupled pairs and mutation paths across codebases.

243|63|Updated Mar 6, 2026
One-click install
npx skills add https://github.com/0xiehnnkta/nemesis-auditor --skill state-inconsistency-auditor
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: state-inconsistency-auditor
Source: https://github.com/0xiehnnkta/nemesis-auditor/tree/main/.claude/skills/state-inconsistency-auditor
Command: npx skills add https://github.com/0xiehnnkta/nemesis-auditor --skill state-inconsistency-auditor

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill identifies critical bugs where a system's state becomes inconsistent due to operations failing to update all related data, potentially leading to silent data corruption or application failures.

Core Features & Use Cases

  • State Invariant Analysis: Systematically maps coupled state pairs and identifies operations that break their required relationships.
  • Mutation Path Tracking: Analyzes every function and code path that modifies state variables to ensure all dependent states are also updated.
  • Use Case: Auditing a DeFi protocol to ensure that when a user's balance is updated, their corresponding reward or historical snapshot is also correctly adjusted, preventing discrepancies in future calculations.

Quick Start

Analyze the provided codebase for state inconsistency bugs.

Frequently Asked Questions about state-inconsistency-auditor

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I detect state inconsistency bugs in my smart contracts?

State inconsistency bugs occur when operations modify one variable without updating dependent state, causing silent data corruption. You can detect them by mapping coupled state pairs and analyzing mutation paths to ensure all related variables are updated together across code paths.

Why does updating a user balance without their reward snapshot cause data integrity issues?

Updating a user balance without their reward snapshot causes data integrity issues because it breaks the structural invariant between coupled state pairs. When mutation paths fail to update dependent historical snapshots, future reward calculations will use outdated data, leading to silent protocol corruption.

What is structural invariant analysis for bug detection?

Structural invariant analysis for bug detection systematically maps required relationships between coupled state variables and verifies that all mutation paths preserve them. It identifies code operations that break these state invariants, ensuring data integrity across various programming languages.

Can I use mutation path tracking for DeFi protocol auditing?

Yes, you can use mutation path tracking for DeFi protocol auditing to analyze every function modifying state variables. It ensures that when user balances are updated, corresponding rewards or historical snapshots are also adjusted, preventing discrepancies in future calculations.

Does state invariant analysis work with various programming languages?

State invariant analysis works across various programming languages by mapping coupled state pairs and tracking mutation paths structurally. It identifies operations that modify one piece of state without updating its dependent counterpart, ensuring data integrity regardless of the specific language syntax.