behavioral-state-analysis

Audit smart contracts with Behavioral State Analysis and prioritized findings.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill streamlines smart contract security audits by focusing analysis on a contract's specific behavior and type, reducing wasted effort and improving the accuracy of findings.

Core Features & Use Cases

  • Token-Efficient Auditing: Scopes analysis to relevant threat engines based on contract classification.
  • Prioritized Findings: Uses a tiered output depth and confidence scoring to highlight critical vulnerabilities.
  • Use Case: Audit a new DeFi lending protocol by first identifying its core states and invariants, then running targeted economic and access control threat engines to uncover potential exploits.

Quick Start

Analyze the provided smart contract code using the behavioral-state-analysis skill to identify critical vulnerabilities.

Frequently Asked Questions about behavioral-state-analysis

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

FAQPage Schema
How do I audit a smart contract for DeFi economic exploits?

To audit a smart contract for DeFi economic exploits, you can use Behavioral State Analysis to identify core states and invariants, then run targeted threat engines to uncover potential vulnerabilities. This scopes analysis to the specific contract type to efficiently discover critical access control weaknesses.

What is the best way to perform a token-efficient security audit on Solidity contracts?

A token-efficient security audit scopes analysis by classifying the smart contract type and running only the relevant threat engines. This approach uses tiered output depth and confidence scoring to highlight critical vulnerabilities without wasting computational effort on irrelevant checks.

How does threat modeling work for cross-contract attack surface analysis?

Threat modeling for cross-contract attack surface analysis works by first identifying a contract's specific behaviors and invariants, then applying targeted economic and access control threat engines to map potential exploits across interacting protocols, ensuring accurate and prioritized vulnerability discovery.

Can I use this approach to find access control vulnerabilities in a lending protocol?

Yes, you can find access control vulnerabilities in a lending protocol by using Behavioral State Analysis. It identifies the protocol's core states and runs targeted threat engines to prioritize and uncover critical access control weaknesses and potential economic exploits efficiently.

How do I prioritize vulnerabilities found during a smart contract security audit?

You prioritize vulnerabilities found during a smart contract security audit by using a tiered output depth and confidence scoring mechanism. This highlights critical vulnerabilities based on the specific behavior and type of the analyzed contract.

When do I need to run specific threat engines for vulnerability analysis?

You need to run specific threat engines for vulnerability analysis when a smart contract has been classified by its type and behavior. This ensures only the relevant economic, access control, or cross-contract threat models are executed for efficient discovery.