Token导航 LogoToken导航TokenDH.com
前端设计敏感数据github未标认证来源可访问许可证需确认审计异常

solidity-deploy实体部署

Agent Skill

用于辅助云资源、部署、容器、基础设施和运维自动化任务。它适合让 Agent 检查配置、整理部署步骤、分析资源状态、生成排障思路或辅助云服务接入。使用时需要明确目标环境、账号权限、区域和资源组,区分本地测试与生产操作;涉及删除资源、重启服务、修改网络或权限配置时,应先确认影响范围。

总安装

1,529

周安装

65

GitHub Stars

1

下载量

536
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:solidity-deploy(实体部署)
来源仓库:https://github.com/0xlayerghost/solidity-agent-kit
仓库路径:skills/solidity-deploy
安装命令:
npx skills add https://github.com/0xlayerghost/solidity-agent-kit --skill solidity-deploy
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/0xlayerghost/solidity-agent-kit --skill solidity-deploy

简介

用于辅助云资源、部署、容器和基础设施相关的运维自动化任务。

  • 适合让 Agent 检查配置、整理部署步骤或分析资源状态,支持生成排障思路。
  • 使用时需明确目标环境、账号权限和资源组,区分本地测试与生产操作的影响。
  • 涉及删除资源或修改网络配置时,应先确认影响范围,避免误操作。
  • solidity-deploy 属于前端设计类 Skill,可作为该场景下的辅助能力补充。

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)

StepCommand / Action
Format codeforge fmt
Run all testsforge test — zero failures required
Check gas reportforge test --gas-report — review critical functions
Verify configManually check config/*.json parameters
Dry-runforge script <Script> --fork-url <RPC_URL> -vvvv (no --broadcast)
Check balancecast balance <DEPLOYER> --rpc-url <RPC_URL> — sufficient gas?
Gas limit setDeployment command must include --gas-limit

Deployment Decision Rules

SituationRule
Default deploymentNo --verify — contracts are not verified on block explorers by default
User requests verificationAdd --verify and --etherscan-api-key to the command
Post-deploy verificationUse forge verify-contract as a separate step
Multi-chain deploySeparate scripts per chain, never batch multiple chains in one script
Proxy deploymentDeploy implementation first, then proxy — verify both separately
Upgradeable contractUse OpenZeppelin Upgrades Plugin (see below) — never hand-roll proxy deployment

Post-deployment Operations (all required)

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

Key Security Rule

  • Never pass private keys directly in commands. Use Foundry Keystore (cast wallet import) to manage keys securely.
  • Never include --broadcast in templates. The user must explicitly add it when ready to deploy.

Command Templates

# Dry-run (simulation only, no on-chain execution)
forge script script/Deploy.s.sol:DeployScript \
  --rpc-url <RPC_URL> \
  --gas-limit 5000000 \
  -vvvv

# When user is ready to deploy, instruct them to add:
#   --account <KEYSTORE_NAME> --broadcast

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

# Quick on-chain read test after deployment
cast call <CONTRACT_ADDRESS> "functionName()" --rpc-url <RPC_URL>

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 ApproachWith Plugin
~30 lines: deploy impl → deploy proxy → encode initializer → wire up1 line: Upgrades.deployUUPSProxy(...)
~20 lines: deploy new impl → validate storage → upgrade proxy1 line: Upgrades.upgradeProxy(...)
Storage layout compatibility: check by eyeAuto-checked, incompatible layouts are rejected
Forgot _disableInitializers()? No warningAuto-validated

Installation

forge install OpenZeppelin/openzeppelin-foundry-upgrades
forge install OpenZeppelin/openzeppelin-contracts-upgradeable

Add to remappings.txt:

@openzeppelin/contracts/=lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/
@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/

Deploy Script Template (UUPS)

// script/Deploy.s.sol
import {Script, console} from "forge-std/Script.sol";
import {Upgrades} from "openzeppelin-foundry-upgrades/Upgrades.sol";
import {MyContract} from "../src/MyContract.sol";

contract DeployScript is Script {
    function run() public {
        vm.startBroadcast();

        // One line: deploys impl + proxy + calls initialize
        address proxy = Upgrades.deployUUPSProxy(
            "MyContract.sol",
            abi.encodeCall(MyContract.initialize, (msg.sender))
        );

        console.log("Proxy:", proxy);
        console.log("Impl:", Upgrades.getImplementationAddress(proxy));

        vm.stopBroadcast();
    }
}

Upgrade Script Template

// script/Upgrade.s.sol
import {Script, console} from "forge-std/Script.sol";
import {Upgrades} from "openzeppelin-foundry-upgrades/Upgrades.sol";

contract UpgradeScript is Script {
    function run() public {
        address proxy = vm.envAddress("PROXY_ADDRESS");
        vm.startBroadcast();

        // One line: validates storage layout + deploys new impl + upgrades proxy
        Upgrades.upgradeProxy(proxy, "MyContractV2.sol", "");

        console.log("Upgraded. New impl:", Upgrades.getImplementationAddress(proxy));

        vm.stopBroadcast();
    }
}

Add @custom:oz-upgrades-from MyContract annotation to V2 contract for automatic reference:

/// @custom:oz-upgrades-from MyContract
contract MyContractV2 is Initializable, OwnableUpgradeable, UUPSUpgradeable {
    // ...
}

Commands

# Deploy proxy (dry-run) — --ffi is required for storage layout checks
forge script script/Deploy.s.sol --rpc-url <RPC_URL> --ffi -vvvv

# Deploy proxy (broadcast)
forge script script/Deploy.s.sol --rpc-url <RPC_URL> --ffi --account <KEYSTORE_NAME> --broadcast

# Upgrade proxy (dry-run)
PROXY_ADDRESS=0x... forge script script/Upgrade.s.sol --rpc-url <RPC_URL> --ffi -vvvv

# Upgrade proxy (broadcast)
PROXY_ADDRESS=0x... forge script script/Upgrade.s.sol --rpc-url <RPC_URL> --ffi --account <KEYSTORE_NAME> --broadcast

# Validate upgrade without deploying (useful for CI)
# Use Upgrades.validateUpgrade("MyContractV2.sol", opts) in a test

Plugin API Quick Reference

FunctionPurpose
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 testsUnsafeUpgrades skips all safety checks
  • Keep V1 source code in project when upgrading — plugin needs it for storage comparison. Or use @custom:oz-upgrades-from annotation
  • Never hand-roll proxy deployment when this plugin is available — the storage layout check alone prevents critical bugs

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

34.86%
按下载量换算187

Claude

30.3%
按下载量换算162

Cursor

19.86%
按下载量换算106

Gemini CLI

10.66%
按下载量换算57

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

未通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills