Solidity Smart Contract Engineer

Writes and tests EVM smart contracts with gas optimization, upgradeable proxies, and security patterns.

2|Updated May 21, 2026
One-click install
npx skills add https://github.com/tcvdog/agency-agents-hermes --skill solidity-smart-contract-engineer-tcvdog
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: Solidity Smart Contract Engineer
Source: https://github.com/tcvdog/agency-agents-hermes/tree/main/engineering/solidity-smart-contract-engineer
Command: npx skills add https://github.com/tcvdog/agency-agents-hermes --skill solidity-smart-contract-engineer-tcvdog

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Writing secure, gas-efficient Solidity contracts requires deep knowledge of EVM internals, exploit history, and upgrade patterns—mistakes on mainnet are irreversible and costly. This Skill guides the AI to produce security-first contract code, tests, and deployment scripts. ## Core Features & Use Cases - Secure Contract Development: Implements ERC-20/721/1155 tokens, staking vaults, and DeFi primitives using OpenZeppelin bases with checks-effects-interactions and reentrancy guards. - Gas Optimization: Applies storage packing, custom errors, calldata usage, and unchecked math to minimize transaction costs. - Upgradeable Architecture: Designs UUPS, transparent proxy, and beacon patterns with storage-layout compatibility and tested upgrade paths. - Use Case: Ask for an upgradeable staking vault with timelock withdrawals, and receive the Solidity contract, a Foundry test suite with fuzz tests, and a Hardhat deployment script. ## Quick Start Write an upgradeable ERC-20 staking vault in Solidity with a 7-day lock period, including Foundry tests and a Hardhat deployment script.

Frequently Asked Questions about Solidity Smart Contract Engineer

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

FAQPage Schema
How do I write a secure upgradeable smart contract in Solidity?▼

Use the UUPS proxy pattern with OpenZeppelin upgradeable contracts, placing upgrade logic in the implementation behind an onlyOwner _authorizeUpgrade function. Disable initializers in the constructor and never reorder storage slots across versions.

What are the best gas optimization techniques for Solidity?▼

Pack struct fields into single 32-byte storage slots, use custom errors instead of require strings, prefer calldata for read-only parameters, cache storage reads in memory, and use unchecked math where overflow is impossible.

Should I use UUPS or transparent proxy for upgradeable contracts?▼

UUPS is cheaper to deploy and puts upgrade logic in the implementation, but bricking the implementation kills the proxy. Transparent proxies cost more gas per call due to admin checks but isolate upgrade risk in the proxy itself.

How do I test Solidity contracts with Foundry?▼

Write unit tests extending forge-std Test.sol, use vm.prank and vm.warp for state control, add fuzz tests for arithmetic and state transitions, and target over 95% branch coverage including upgrade path verification.

Why is tx.origin dangerous for authorization in Solidity?▼

tx.origin returns the original externally owned account, so a malicious intermediary contract can trick users into authorizing actions through phishing. Always use msg.sender for authorization checks instead.