blockchain-smart-contract-testing
Skill1 starsChanged 53 days agoMITView on GitHub
Use when testing smart contracts and dApps — Solidity/Foundry/Hardhat tests, fuzz and invariant testing, fork tests, gas profiling, reentrancy/overflow/access-control vulnerabilities, Slither/Echidna static and fuzz analysis, upgrade safety, oracle/MEV risks, and wallet UI flows.
In this repository98 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- 42crunch-api-security-testingSkill
- a-b-testingSkill
- acceptance-testingSkill
- accessibility-testingSkill
- ai-agent-evaluationSkill
- ai-code-securitySkill
- ai-ml-testingSkill
- analytics-tracking-testingSkill
- api-testingSkill
- authn-authz-testingSkill
- autonomous-qa-orchestrationSkill
- bdd-gherkin-testingSkill
- bug-reportingSkill
- chaos-resilience-testingSkill
- chatbot-voice-agent-testingSkill
- cicd-testingSkill
- cli-testingSkill
- cloud-infrastructure-testingSkill
- code-coverage-analysisSkill
- compatibility-testingSkill
- compliance-testingSkill
- concurrency-race-condition-testingSkill
- configuration-feature-flag-testingSkill
- contract-testingSkill
- cross-browser-testingSkill
- database-testingSkill
- data-migration-testingSkill
- data-pipeline-etl-testingSkill
- date-time-timezone-testingSkill
- desktop-app-testingSkill
- disaster-recovery-backup-testingSkill
- e2e-testingSkill
- email-notification-testingSkill
- event-driven-messaging-testingSkill
- exploratory-testingSkill
- flaky-test-managementSkill
- functional-testingSkill
- fuzz-testingSkill
- game-testingSkill
- graphql-testingSkill
- iac-container-security-testingSkill
- installation-upgrade-testingSkill
- integration-testingSkill
- iot-embedded-testingSkill
- llm-security-auditSkill
- llm-testingSkill
- localization-testingSkill
- manual-testingSkill
- mcp-testingSkill
- memory-leak-resource-testingSkill
- microservices-testingSkill
- mobile-testingSkill
- mutation-testingSkill
- observability-testingSkill
- payment-ecommerce-testingSkill
- performance-testingSkill
- production-monitoring-synthetic-testingSkill
- property-based-testingSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 19
Fork tests: run against mainnet state (forge test --fork-url $RPC --fork-block-number N) for integrations (Uniswap, Chainlink, Aave).
- Distinctive: line 23
Audit & bounty: before mainnet; testnet soak.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Blockchain & Smart Contract Testing
Deployed contracts are immutable, public and hold value: bugs are exploited within minutes. Test far beyond happy paths.
Layered approach
- Unit (Foundry
forge test, Hardhat + Chai): each function, revert reasons, events, access control. - Fuzz:
forge testproperty fuzzing (function testFuzz_Deposit(uint96 amt)). - Invariant / stateful fuzz: system-wide rules that must always hold — e.g.
sum(balances) == totalSupply,solvency: assets >= liabilities,share price never decreases except by loss event. (Foundry invariant tests, Echidna, Medusa.) - Fork tests: run against mainnet state (
forge test --fork-url $RPC --fork-block-number N) for integrations (Uniswap, Chainlink, Aave). - Static analysis:
slither ., Mythril, Aderyn; formal verification for critical logic (Certora, Halmos, SMTChecker). - Gas & size:
forge snapshot,forge test --gas-report, contract size ≤ 24 KB. - dApp/E2E: Playwright + wallet stubs (Synpress) / local Anvil/Hardhat node.
- Audit & bounty before mainnet; testnet soak; timelock + pause switch.
// Foundry: fuzz + invariant sketch
function testFuzz_withdrawNeverExceedsDeposit(uint96 amt) public {
vm.assume(amt > 0); deal(user, amt);
vm.startPrank(user); vault.deposit{value: amt}(); vault.withdraw(amt); vm.stopPrank();
assertEq(address(vault).balance, 0);
}
function invariant_solvent() public { assertGe(address(vault).balance, vault.totalLiabilities()); }forge test -vvv --fuzz-runs 10000 && forge coverage --report lcov
slither . --exclude-informational && echidna . --contract VaultTest --config echidna.yamlVulnerability checklist (SWC / OWASP SC Top 10)
Reentrancy (checks-effects-interactions, ReentrancyGuard, read-only reentrancy) · access control (onlyOwner missing, tx.origin, unprotected initialize) · integer issues (Solidity ≥0.8 checked; unchecked blocks, casting) · price-oracle manipulation/flash-loan, stale Chainlink (updatedAt, decimals) · front-running/MEV & slippage · signature replay (nonce, chainId, EIP-712 domain) · delegatecall/proxy storage collisions, upgrade auth (UUPS _authorizeUpgrade) · unchecked low-level call returns, ERC-20 quirks (fee-on-transfer, no-return USDT, rebasing) · DoS via unbounded loops/pull-over-push · randomness (block.timestamp) · rounding/donation/inflation attack on vaults (ERC-4626) · selfdestruct forced ETH.
Operational
Deploy scripts tested on fork; verified source on explorer; immutable params reviewed; multisig ownership; emergency pause tested; monitoring/alerts (Forta, Tenderly); key management; frontend: chain switching, rejected tx, pending/failed states, wrong network, allowance UX, address checksum display, phishing-resistant signing text.
Related
fuzz-testing, property-based-testing, static-analysis-testing, security-testing
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

