agency-solidity-smart-contract-engineer

Writes, tests, and deploys secure EVM smart contracts with gas optimization and upgradeable proxy patterns.

Updated Jul 14, 2026
One-click install
npx skills add https://github.com/AI-Staffing-Solution-Consultants-LLC/core-engineering-system --skill agency-solidity-smart-contract-engineer-ai-staffing-solution-consultants-llc
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: agency-solidity-smart-contract-engineer
Source: https://github.com/AI-Staffing-Solution-Consultants-LLC/core-engineering-system/tree/main/.agents/skills/engineering-solidity-smart-contract-engineer
Command: npx skills add https://github.com/AI-Staffing-Solution-Consultants-LLC/core-engineering-system --skill agency-solidity-smart-contract-engineer-ai-staffing-solution-consultants-llc

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Writing smart contracts that survive mainnet requires deep expertise in security patterns, gas optimization, and upgradeable architecture — mistakes cost real money and cannot be patched after deployment. This Skill provides an expert Solidity engineer persona that produces security-first contract code, comprehensive Foundry test suites, and deployment scripts following audited OpenZeppelin standards. ## Core Features & Use Cases - Secure Contract Development: Implements ERC-20, ERC-721, and ERC-1155 tokens plus DeFi primitives (vaults, staking, AMMs) using checks-effects-interactions, reentrancy guards, and role-based access control. - Upgradeable Architecture: Designs UUPS, transparent proxy, and beacon patterns with storage-layout-safe upgrade paths and initializer patterns. - Gas Optimization: Applies storage packing, custom errors, calldata usage, and unchecked arithmetic, with Foundry gas snapshots to profile hot paths. - Testing & Deployment: Generates Foundry unit, fuzz, and invariant tests plus Hardhat deployment scripts with proxy setup. - Use Case: Ask it to build a staking vault with timelocked withdrawals — it delivers a UUPS-upgradeable contract with packed storage, SafeERC20 handling, a full Foundry test suite including fuzz tests, and a Hardhat deployment script. ## Quick Start Write an upgradeable ERC-20 staking vault with a 7-day lock period, including Foundry tests and a Hardhat deployment script.

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 write a secure upgradeable smart contract in Solidity?▼

Use the UUPS proxy pattern with OpenZeppelin upgradeable contracts, placing upgrade authorization behind an owner check and disabling initializers in the constructor. Preserve storage layout across upgrades by never reordering or removing state variables, and test the full v1-to-v2 upgrade path in Foundry.

How to optimize gas usage in Solidity contracts?▼

Pack struct fields into single 32-byte storage slots, use custom errors instead of require strings, prefer calldata for read-only array parameters, and cache storage reads in memory. Profile hot paths with forge snapshot to verify savings against the theoretical minimum.

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

UUPS is cheaper to deploy and puts upgrade logic in the implementation, but a bricked implementation kills the proxy. Transparent proxies cost more gas per call due to admin checks but isolate upgrade logic in the proxy itself, making them safer for high-value protocols.

Does Foundry support fuzz and invariant testing for smart contracts?▼

Yes, Foundry natively supports fuzz tests via parameterized test functions and invariant tests that assert protocol-wide properties across randomized call sequences. Use vm.assume to bound inputs and target >95% branch coverage for audit readiness.

What are common reentrancy vulnerabilities in Solidity?▼

Reentrancy occurs when external calls execute before state updates, letting attackers re-enter functions like withdraw before balances change. Prevent it with checks-effects-interactions ordering, OpenZeppelin ReentrancyGuard, and call{value} with proper guards instead of transfer or send.