0xlayerghost/solidity-agent-kit/solidity-deploy
Claude Code and agent skill by 0xlayerghost/solidity-agent-kit
- community
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Checking that the SKILL.md file is still in the repository.
[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.
Install
npx vskill@latest install 0xlayerghost/solidity-agent-kit/solidity-deploySemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
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 | |
| Upgradeable contract | Use OpenZeppelin Upgrades Plugin (see below) — never hand-roll proxy deployment |
Post-deployment Operations (all required)
- Update addresses in
config/*.jsonanddeployments/latest.env - Test critical functions:
cast callto verify on-chain state is correct - Record changes in
docs/CHANGELOG.md - Submit PR with deployment transaction hash link
- If verification needed, run
forge verify-contractseparately
Key Security Rule
- Before broadcasting, let the developer choose the signing method:
- Foundry Keystore (recommended): use
--account <KEYSTORE_NAME>. - Environment file: keep
PRIVATE_KEYin a gitignored.env, runsource .env, then use--private-key "$PRIVATE_KEY". - Never put a literal private key in a command, script, log, conversation, or committed file. Never read or print the developer's
.env. - Never include `--broadcast` in templates. The user must explicitly add it when ready to deploy.
Command Templates
Upgradeable Contract Deployment (OpenZeppelin Upgrades Plugin)
For any upgradeable contract (UUPS, Transparent, Beacon), use the OpenZeppelin Foundry Upgrades Plugin instead of hand-rolling proxy deployment scripts.
Why Use the Plugin
| Manual Approach | With Plugin | |
|---|---|---|
| ~30 lines: deploy impl → deploy proxy → encode initializer → wire up | 1 line: Upgrades.deployUUPSProxy(...) | |
| ~20 lines: deploy new impl → validate storage → upgrade proxy | 1 line: Upgrades.upgradeProxy(...) | |
| Storage layout compatibility: check by eye | Auto-checked, incompatible layouts are rejected | |
Forgot _disableInitializers()? No warning | Auto-validated |
Installation
Add to remappings.txt:
Deploy Script Template (UUPS)
Upgrade Script Template
Add @custom:oz-upgrades-from MyContract annotation to V2 contract for automatic reference:
Commands
Plugin API Quick Reference
| Function | Purpose | |
|---|---|---|
Upgrades.deployUUPSProxy(contract, data) | Deploy UUPS proxy + impl + initialize | |
Upgrades.deployTransparentProxy(contract, admin, data) | Deploy Transparent proxy + impl + initialize | |
Upgrades.upgradeProxy(proxy, newContract, data) | Validate + deploy new impl + upgrade | |
Upgrades.validateUpgrade(contract, opts) | Validate only, no deploy (for CI/tests) | |
Upgrades.getImplementationAddress(proxy) | Get current implementation address | |
Upgrades.prepareUpgrade(contract, opts) | Validate + deploy new impl, return address (for multisig) |
Key Rules
- Always use `--ffi` flag — the plugin needs it for storage layout validation
- Always add `--sender <ADDRESS>` for upgrades — must match proxy owner, otherwise
OwnableUnauthorizedAccount - Use `Upgrades` in scripts, `UnsafeUpgrades` only in tests —
UnsafeUpgradesskips all safety checks - Keep V1 source code in project when upgrading — plugin needs it for storage comparison. Or use
@custom:oz-upgrades-fromannotation - Never hand-roll proxy deployment when this plugin is available — the storage layout check alone prevents critical bugs
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/solidity-deploy/SKILL.md
Popularity
- Repository stars
- 1
- 7-day trend score
- 3
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 1 Apr 2026, 7 months ago.
Extension points
hookPre/post lifecycle hooks
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/0xlayerghost/solidity-agent-kit/solidity-deploy)