security

Review Solidity smart contracts for common vulnerabilities and secure coding patterns.

Updated Mar 6, 2026
One-click install
npx skills add https://github.com/andginja/ethskills --skill security-andginja
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: security
Source: https://github.com/andginja/ethskills/tree/main/skills/security
Command: npx skills add https://github.com/andginja/ethskills --skill security-andginja

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill addresses the critical need for robust security in Solidity smart contracts, preventing financial losses due to common vulnerabilities and ensuring immutable code is deployed correctly.

Core Features & Use Cases

  • Vulnerability Identification: Detects and explains common exploits like reentrancy, access control bugs, and integer math errors.
  • Secure Coding Patterns: Provides battle-tested code examples and best practices for writing secure Solidity.
  • Pre-Deployment Checklist: Offers a comprehensive checklist to ensure contracts are thoroughly vetted before mainnet deployment.
  • Tooling Integration: Demonstrates how to use static analysis tools like Slither and Mythril for enhanced security auditing.
  • Use Case: A developer is writing a new DeFi lending protocol and needs to ensure their contract is protected against flash loan attacks and reentrancy. They would use this Skill to review their code, implement recommended security patterns, and run the provided Foundry tests.

Quick Start

Use the security skill to review the provided Solidity code for common vulnerabilities.

Frequently Asked Questions about security

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

FAQPage Schema
How do I prevent reentrancy and flash loan attacks in Solidity smart contracts?

To prevent reentrancy and flash loan attacks in Solidity smart contracts, implement secure coding patterns like the Checks-Effects-Interactions pattern and use specific vault inflation attack vectors. Foundry test examples help validate these protections before deployment.

What are the best static analysis tools for auditing Solidity smart contracts?

Slither and Mythril are recommended static analysis tools for auditing Solidity smart contracts. They identify vulnerabilities like access control bugs and integer math errors, providing an automated layer of security before manual review and mainnet deployment.

How does oracle manipulation affect DeFi protocols and how can I secure against it?

Oracle manipulation affects DeFi protocols by allowing attackers to artificially alter asset prices, causing financial loss. Secure against it by following specific secure coding patterns and pre-deployment checklists designed to validate oracle data integrity.

Can I use Foundry to test for token decimal mismatches and integer math vulnerabilities?

Yes, you can use Foundry to test for token decimal mismatches and integer math vulnerabilities. The framework provides specific test examples that validate how your contracts handle unexpected decimal inputs and arithmetic overflows.

What should be on a pre-deployment security checklist for DeFi smart contracts?

A pre-deployment security checklist for DeFi smart contracts should include verifying access controls, checking for reentrancy, validating oracle inputs, and running static analysis tools like Slither to ensure immutable code is deployed securely.