semantic-guard-analysis

Detect logic vulnerabilities in smart contracts by analyzing guard-state consistency patterns.

Updated Feb 25, 2026
One-click install
npx skills add https://github.com/dajneem23/codex-skills --skill semantic-guard-analysis-dajneem23
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: semantic-guard-analysis
Source: https://github.com/dajneem23/codex-skills/tree/main/semantic-guard-analysis
Command: npx skills add https://github.com/dajneem23/codex-skills --skill semantic-guard-analysis-dajneem23

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill detects subtle logic vulnerabilities in smart contracts by identifying inconsistencies in how the contract enforces its own internal rules, even when traditional tools find no issues.

Core Features & Use Cases

  • Inconsistent Guard Detection: Finds functions that bypass security checks (like require statements or modifiers) that other functions consistently apply.
  • Contract as Specification: Leverages the principle that a contract's own behavior defines its intended logic.
  • Use Case: Auditing a smart contract where you suspect a "forgotten check" vulnerability, such as an admin function that bypasses a critical paused state check, leading to potential fund drains.

Quick Start

Analyze the provided smart contract code for semantic guard inconsistencies.

Frequently Asked Questions about semantic-guard-analysis

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

FAQPage Schema
How do I detect forgotten require statements in Solidity smart contracts?

To detect logic bugs in smart contracts, this tool analyzes guard-state consistency patterns. It identifies functions bypassing security checks that other functions consistently apply, using the contract's own behavior as its specification to find forgotten require statements or modifiers.

What is guard-state consistency analysis for vulnerability detection?

Guard-state consistency analysis for vulnerability detection is a technique that treats a smart contract's own behavior as its specification. It identifies logic vulnerabilities by finding functions that deviate from established security check patterns applied elsewhere in the contract.

How do I find logic bugs where admin functions bypass paused state checks?

To find logic bugs where admin functions bypass paused state checks, analyze the contract for inconsistent guard application. This tool flags functions that skip security checks, such as paused state validations, that other functions consistently enforce.

Does this smart contract audit tool work without external dependencies?

Yes, this smart contract audit tool operates without external dependencies. It internally requires AST parsing and dependency graph construction to identify deviations from established guard patterns and detect subtle logic vulnerabilities.

How do I audit a smart contract using its own rules as the specification?

To audit a smart contract using its own rules as the specification, provide the code for semantic guard analysis. The tool detects inconsistencies in how the contract enforces internal rules, identifying functions bypassing security checks others apply.

What is the best way to find logic vulnerabilities that traditional security audit tools miss?

The best way to find logic vulnerabilities that traditional security audit tools miss is semantic guard analysis. It detects subtle inconsistencies in contract rule enforcement by comparing guard application across functions to identify bypassed checks.