Skip to content
Back to skills

Solidity Deploy

ASecurity

[AUTO-INVOKE] MUST be invoked BEFORE deploying contracts or writing deployment scripts (*.s.sol). Covers pre-flight checks, forge script commands, post-deployment validation, and verification. Trigger: any task involving forge script, contract deployment, or block explorer verification.

  • 207 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 4, 2026
testingbashapi

Works with

  • api

Security analysis

A100/100

Pro scans all 13 files and shows the line behind each finding

Scanned September 4, 2026

npx -y skills add NeverSight/skills_feed --skill solidity-deploy --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Solidity Deploy?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Solidity Deploy
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/neversight-solidity-deploy/badge)](https://www.skillsdirectory.com/skills/neversight-solidity-deploy)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: solidity-deploy
description: "[AUTO-INVOKE] MUST be invoked BEFORE deploying contracts or writing deployment scripts (*.s.sol). Covers pre-flight checks, forge script commands, post-deployment validation, and verification. Trigger: any task involving forge script, contract deployment, or block explorer verification."
---

# Deployment Workflow

## Language Rule

- **Always respond in the same language the user is using.** If the user asks in Chinese, respond in Chinese. If in English, respond in English.

## Pre-deployment Checklist (all must pass)

| Step | Command / Action |
|------|-----------------|
| Format code | `forge fmt` |
| Run all tests | `forge test` — zero failures required |
| Check gas report | `forge test --gas-report` — review critical functions |
| Verify config | Manually check `config/*.json` parameters |
| Dry-run | `forge script <Script> --fork-url $RPC_URL -vvvv` (no `--broadcast`) |
| Check balance | `cast balance $DEPLOYER --rpc-url $RPC_URL` — sufficient gas? |
| Gas limit set | Deployment command must include `--gas-limit` |

## Deployment Decision Rules

| Situation | Rule |
|-----------|------|
| Default deployment | **No `--verify`** — contracts are not verified on block explorers by default |
| User requests verification | Add `--verify` and `--etherscan-api-key` to the command |
| Post-deploy verification | Use `forge verify-contract` as a separate step |
| Multi-chain deploy | Separate scripts per chain, never batch multiple chains in one script |
| Proxy deployment | Deploy implementation first, then proxy — verify both separately |

## Post-deployment Operations (all required)

1. Update addresses in `config/*.json` and `deployments/latest.env`
2. Test critical functions: `cast call` / `cast send` to verify on-chain behavior
3. Record changes in `docs/CHANGELOG.md`
4. Submit PR with deployment transaction hash link
5. If verification needed, run `forge verify-contract` separately

## Command Templates

```bash
# Load environment
source .env

# Standard deployment (no verification by default)
forge script script/Deploy.s.sol:DeployScript \
  --rpc-url $RPC_URL \
  --private-key $PRIVATE_KEY \
  --broadcast \
  --gas-limit 5000000 \
  -vvvv

# Deployment with verification (only when explicitly requested)
forge script script/Deploy.s.sol:DeployScript \
  --rpc-url $RPC_URL \
  --private-key $PRIVATE_KEY \
  --broadcast \
  --verify \
  --etherscan-api-key $ETHERSCAN_API_KEY \
  --gas-limit 5000000 \
  -vvvv

# Verify existing contract separately
forge verify-contract <ADDRESS> <CONTRACT> \
  --chain-id <CHAIN_ID> \
  --etherscan-api-key $ETHERSCAN_API_KEY \
  --constructor-args $(cast abi-encode "constructor(address)" <ARG>)

# Quick on-chain function test after deployment
cast call <CONTRACT_ADDRESS> "functionName()" --rpc-url $RPC_URL
cast send <CONTRACT_ADDRESS> "functionName(uint256)" 100 \
  --rpc-url $RPC_URL --private-key $PRIVATE_KEY
```

Files in this skill

  • SKILL.md2.9 KB
  • description_ar.txt463 B
  • description_cn.txt243 B
  • description_de.txt375 B
  • description_en.txt288 B
  • description_es.txt404 B
  • description_fr.txt371 B
  • description_it.txt339 B
  • description_ja.txt484 B
  • description_ko.txt326 B
  • description_ru.txt546 B
  • description_tw.txt243 B
  • stats.json66 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…