evm-defi-architect

Designs, tests, audits, and deploys Solidity smart contracts on Ethereum and EVM chains.

Updated Aug 25, 2026
One-click install
npx skills add https://github.com/Shahnilsharma/smart-contracts-auditor-skill --skill evm-defi-architect-shahnilsharma
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: evm-defi-architect
Source: https://github.com/Shahnilsharma/smart-contracts-auditor-skill/tree/main/plugins/evm-defi-architect/skills
Command: npx skills add https://github.com/Shahnilsharma/smart-contracts-auditor-skill --skill evm-defi-architect-shahnilsharma

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Building a DeFi protocol on Ethereum or another EVM chain requires coordinating contract architecture, secure Solidity coding, fuzz and invariant testing, static analysis, and audit-grade review — a workflow most developers handle piecemeal with inconsistent rigor. This Skill runs the full pipeline from threat modeling through deployment verification using an agency-grade audit methodology modeled on firms like Trail of Bits and OpenZeppelin. ## Core Features & Use Cases - Architecture and threat modeling: Maps DeFi mechanics (lending, AMMs, vaults, staking, DAOs) into contract designs with a risk matrix, key-compromise resilience rating, and money-flow analysis before any code is written. - Dual QA suites: Generates Foundry unit, fuzz, and invariant tests plus Hardhat 3 (viem + node:test) role-based scenario runners, with Slither, Mythril, and Echidna static analysis triage. - Agency-grade audit reports: Produces findings with impact×likelihood severity, an OWASP Smart Contract Top 10 (2026) coverage traceability matrix, economic/game-theoretic review, and optional professional .docx report formatting. - Use Case: Ask it to "build and audit a staking vault on Sepolia" and it scopes the threat model, writes the Solidity contract with SafeERC20 and reentrancy guards, generates fuzz and invariant tests, runs the audit checklist, and prepares a forge script deployment with wallet setup guidance. ## Quick Start Ask the assistant to design, test, and audit a Solidity DeFi contract for Ethereum Sepolia, for example: "Build me an ERC-4626 vault with Foundry fuzz tests and a full audit report."

Frequently Asked Questions about evm-defi-architect

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

FAQPage Schema
How do I audit a Solidity smart contract with Foundry and Slither?

The Skill runs a phased audit: scope and threat model first, then Slither for fast static analysis, Mythril for deeper symbolic execution on money-handling contracts, and a manual OWASP-based checklist review. Critical and High findings require an executable Foundry test demonstrating the exploit before being reported as confirmed.

How to write fuzz and invariant tests for Solidity contracts?

Use Foundry testFuzz_ functions with vm.assume and bound() for parametric fuzzing, and invariant_ functions with a handler contract and ghost variables for stateful properties like solvency. The Skill generates both, targeting the specific risks identified in the threat model rather than generic fuzzing.

Can I deploy to EVM chains other than Ethereum?

Yes, any EVM chain is supported by supplying a docs URL or markdown file with chain parameters. The Skill resolves chain ID, RPC, gas token, explorer verification API, and EVM-version quirks (such as missing Cancun opcodes on some L2s) before writing code.

Does the audit cover economic and flash loan attacks?

Yes, a dedicated economic and game-theoretic review covers MEV exposure, flash-loan-funded price or governance manipulation, and cost-of-attack versus value-at-risk. Composed multi-step exploit chains across external dependencies are explicitly traced, per the OWASP 2026 incident pattern.

What are the limitations of an AI-generated smart contract audit?

The Skill enforces a validation gate requiring executable proof-of-concept tests for Critical and High findings to reduce false positives, but it does not replace a human audit. The suite's own documentation states it has not been validated end-to-end against real deployed contracts and recommends comparison with professional audit firms.

Why does the Skill ask about wallets before every deployment?

Wallet handling is never assumed because key management is a major real-world loss category. The Skill asks each time whether to use a cast encrypted keystore, environment variable keys (local only), a hardware wallet for mainnet, or Anvil's public test accounts, and flags unsafe choices explicitly.