solidity

Generate secure Solidity contracts with Foundry tests and deployment scripts.

Updated Apr 11, 2026
One-click install
npx skills add https://github.com/ToXMon/tolu --skill solidity-toxmon
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: solidity
Source: https://github.com/ToXMon/tolu/tree/main/skills/solidity
Command: npx skills add https://github.com/ToXMon/tolu --skill solidity-toxmon

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill codifies production-grade Solidity best practices to reduce vulnerabilities, enforce secure patterns, and standardize testing and deployment so contracts are audit-ready and resilient in mainnet environments.

Core Features & Use Cases

  • Secure coding standards: import rules, strict pragmas, custom errors, storage packing, immutable usage, and revert-first patterns.
  • Testing and verification: Foundry-centric workflows, stateless and invariant fuzzing, branching-tree test design, and multi-tool fuzzing recommendations.
  • Deployment and governance: Forge deployment scripts, CI checks, multisig-first admin patterns, and audit preparation checklists.
  • Use Case: Prepare an ERC20/ERC721 or DeFi protocol for audit by implementing named errors, gas optimizations, comprehensive fuzz/invariant tests, and a vetted deployment script.

Quick Start

Use the solidity skill to generate a secure, production-ready ERC20 contract with Foundry tests, gas optimizations, natspec security contact, and a Forge deployment script ready for audit.

Frequently Asked Questions about solidity

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

FAQPage Schema
How do I write secure, production-ready Solidity smart contracts?

Secure Solidity smart contracts require strict pragma rules, named custom errors, storage packing, and revert-first patterns. Production-ready contracts also enforce secure import rules and use immutables to reduce vulnerabilities and optimize gas consumption.

What is the best way to set up Foundry fuzz testing and invariant tests for DeFi protocols?

Foundry fuzz testing for DeFi protocols uses stateless and invariant fuzzing with branching-tree test design. Multi-tool fuzzing recommendations and invariant patterns verify protocol state integrity and uncover edge-case vulnerabilities before mainnet deployment.

How do I prepare an ERC20 contract for a security audit?

Preparing an ERC20 contract for a security audit involves implementing named custom errors, gas optimizations, and comprehensive fuzz tests. You also need NatSpec security contacts, invariant tests, and a vetted Forge deployment script.

Can I use Forge deployment scripts for multisig governance and CI integration?

Yes, Forge deployment scripts support multisig-first admin patterns and CI checks. Multisig governance readiness requires secure deployment scripts that enforce strict admin controls and integrate automated checks into continuous integration workflows.

What secure coding standards should I follow for Solidity smart contract development?

Solidity secure coding standards mandate strict pragmas, named custom errors, storage packing, and immutable usage. Revert-first patterns and strict import rules standardize contract development to enforce resilient mainnet environments.