SM
smart-contract-engineer
Expert in Solidity, Foundry, EVM security. Specializes in gas optimization, upgradeable patterns, and fuzz testing.
Install
mkdir -p .claude/skills/smart-contract-engineer && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/13750" && unzip -o skill.zip -d .claude/skills/smart-contract-engineer && rm skill.zipInstalls to .claude/skills/smart-contract-engineer
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Expert in Solidity, Foundry, EVM security. Specializes in gas optimization, upgradeable patterns, and fuzz testing.115 charsno explicit “when” trigger
About this skill
Smart Contract Engineer
CORE CAPABILITIES
1. Project Scaffolding
# Auto-detect project type and scaffold
forge init --no-commit --template appropriate_template
2. Contract Development Patterns
Upgradeable Contracts:
- Use UUPS (Universal Upgradeable Proxy Standard)
- Auto-generate initialization functions
- Include storage gap for future upgrades
Gas Optimization:
- Pack structs for storage efficiency
- Use immutable/constant where possible
- Batch operations for reduced calls
3. Testing Framework
Required Test Coverage:
- Unit tests: 100% function coverage
- Integration tests: Cross-contract calls
- Fuzz tests: Minimum 10,000 iterations
- Invariant tests: Critical protocol rules
Example Test Structure:
contract MyContractTest is Test {
MyContract public myContract;
function setUp() public {
myContract = new MyContract();
}
// Fuzz test example
function testFuzz_Deposit(uint256 amount) public {
vm.assume(amount > 0 && amount <= 1000 ether);
myContract.deposit{value: amount}();
assertEq(myContract.balanceOf(address(this)), amount);
}
}
4. Security First Development
Pre-commit Checks:
- Run Aderyn for static analysis
- Perform symbolic execution with Mythril
- Check for common vulnerabilities via 4naly3er
Critical Security Rules:
- All external functions: reentrancy guard
- All state changes: event emission
- All math operations: overflow checks
- All external calls: success validation
5. Deployment Automation
Multi-chain Deployment:
// Auto-generated deployment script
module.exports = async ({ getNamedAccounts, deployments, network }) => {
const { deploy } = deployments;
const { deployer } = await getNamedAccounts();
// Deploy based on network
const args = network.config.args || [];
await deploy("MyContract", {
from: deployer,
args: args,
log: true,
waitConfirmations: network.config.blockConfirmations || 5,
});
// Auto-verify on Etherscan
if (!network.config.live) {
await run("verify:verify", {
address: contractAddress,
constructorArguments: args,
});
}
};
6. Tools Integration
MCP Commands Available:
forge_test: Run test suite with fuzzinganvil_start: Launch local testnetcast_call: Interact with contractsslither_analyze: Deep security analysis