agency-solidity-smart-contract-engineer

Design secure, gas-optimized Solidity smart contracts with Foundry testing and upgrade patterns.

Updated Feb 11, 2026
One-click install
npx skills add https://github.com/augustoheiss/LogicDefense --skill agency-solidity-smart-contract-engineer-augustoheiss
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: agency-solidity-smart-contract-engineer
Source: https://github.com/augustoheiss/LogicDefense/tree/main/.gemini/skills/agency-solidity-smart-contract-engineer
Command: npx skills add https://github.com/augustoheiss/LogicDefense --skill agency-solidity-smart-contract-engineer-augustoheiss

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill eliminates common security pitfalls and excessive gas costs in Solidity code by enforcing audit-ready architecture, upgrade-safe patterns, and gas profiling so teams can deploy resilient EVM contracts to mainnet with confidence.

Core Features & Use Cases

  • Security-first patterns: checks-effects-interactions, reentrancy guards, validated external calls, and use of audited OpenZeppelin primitives.
  • Upgradeable and modular architectures: guidance and examples for UUPS, transparent proxies, storage layout planning, and timelocks for safe upgrades.
  • Gas optimization & testing: storage packing, calldata usage, custom errors, Foundry gas snapshots, and example vault/token implementations with comprehensive tests.
  • Use case: Prepare an ERC-20 + UUPS staking vault deployment with >95% Foundry test coverage, documented NatSpec, and a verified upgrade path for audit sign-off.

Quick Start

Audit and optimize the provided Solidity contracts for security and gas usage, focusing on storage packing, external-call ordering, and upgrade-safety before preparing the Foundry test suite.

Frequently Asked Questions about agency-solidity-smart-contract-engineer

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

FAQPage Schema
How do I optimize Solidity smart contracts for gas and security before an audit?

To optimize Solidity smart contracts for gas and security, apply storage packing, calldata usage, and custom errors. Enforce checks-effects-interactions patterns and use audited OpenZeppelin primitives to achieve audit-ready, gas-optimized EVM architecture.

What is the best way to implement upgradeable EVM smart contracts safely?

The best way to implement upgradeable EVM smart contracts safely is using UUPS or transparent proxy patterns. Plan storage layout carefully and integrate timelocks for safe upgrades to ensure verifiable, upgrade-safe deployments.

How do I set up Foundry testing with high coverage for DeFi primitives?

Set up Foundry testing for DeFi primitives by writing comprehensive tests targeting vault and token implementations. Capture gas snapshots and validate external call ordering to achieve over 95% test coverage for audit sign-off.

Can I use OpenZeppelin primitives for protocol design on EVM-compatible chains?

Yes, you can use OpenZeppelin primitives for protocol design on EVM-compatible chains. They provide validated external calls and reentrancy guards essential for secure DeFi primitives, tokens, and vault deployments.

Why does my Solidity code need checks-effects-interactions and NatSpec documentation?

Solidity code needs checks-effects-interactions to prevent reentrancy attacks during external calls. NatSpec documentation is required to meet strict technical standards and provide verifiable, audit-ready implementations for mainnet deployment.