Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/ccashwell/evm-cortexnpx agentmods add skills/ccashwell/evm-cortex/forge-scriptingWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/ccashwell/evm-cortex/forge-scripting)<a href="https://agentmods.dev/skills/ccashwell/evm-cortex/forge-scripting"><img src="https://agentmods.dev/badge/skills/ccashwell/evm-cortex/forge-scripting/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/ccashwell/evm-cortex/forge-scripting"><img src="https://agentmods.dev/badge/skills/ccashwell/evm-cortex/forge-scripting.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00036 | $0.01850 |
| Opus 5.5 | $0.00014 | $0.00740 |
| Sonnet 5.5 | $0.00007 | $0.00370 |
| Haiku 4.5 | $0.00004 | $0.00185 |
Grade A, and why
forge-scripting scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 265 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Forge Script Deployment Patterns
Basic Deployment Script
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import {Script, console2} from "forge-std/Script.sol";
import {MyToken} from "../src/MyToken.sol";
contract DeployScript is Script {
function run() external {
uint256 deployerKey = vm.envUint("DEPLOYER_PRIVATE_KEY");
address deployer = vm.addr(deployerKey);
console2.log("Deployer:", deployer);
console2.log("Balance:", deployer.balance);
vm.startBroadcast(deployerKey);
MyToken token = new MyToken("My Token", "MTK", 1_000_000e18);
console2.log("Token deployed at:", address(token));
vm.stopBroadcast();
}
}
Running Scripts
# Dry run (simulation only, no tx sent)
forge script script/Deploy.s.sol --rpc-url $ETH_RPC_URL
# Broadcast (send real transactions)
forge script script/Deploy.s.sol --rpc-url $ETH_RPC_URL --broadcast
# Broadcast + verify on Etherscan
forge script script/Deploy.s.sol --rpc-url $ETH_RPC_URL \
--broadcast --verify --etherscan-api-key $ETHERSCAN_API_KEY
# With specific sender
forge script script/Deploy.s.sol --rpc-url $ETH_RPC_URL \
--broadcast --sender 0xDeployer
# Resume failed broadcast
forge script script/Deploy.s.sol --rpc-url $ETH_RPC_URL --resume
# Slow mode (wait for each tx confirmation)
forge script script/Deploy.s.sol --rpc-url $ETH_RPC_URL --broadcast --slow
Deployment Script Template
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import {Script, console2} from "forge-std/Script.sol";
import {ERC1967Proxy} from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol";
import {MyProtocol} from "../src/MyProtocol.sol";
import {Treasury} from "../src/Treasury.sol";
contract DeployProtocol is Script {
struct DeployConfig {
address admin;
address treasury;
uint256 feeRate;
address weth;
}
function getConfig() internal view returns (DeployConfig memory) {
if (block.chainid == 1) {
return DeployConfig({
admin: vm.envAddress("MAINNET_ADMIN"),
treasury: vm.envAddress("MAINNET_TREASURY"),
feeRate: 30, // 0.3%
weth: 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
});
} else if (block.chainid == 8453) {
return DeployConfig({
admin: vm.envAddress("BASE_ADMIN"),
treasury: vm.envAddress("BASE_TREASURY"),
feeRate: 30,
weth: 0x4200000000000000000000000000000000000006
});
} else if (block.chainid == 11155111) {
return DeployConfig({
admin: msg.sender,
treasury: msg.sender,
feeRate: 100,
weth: address(0)
});
} else {
revert("Unsupported chain");
}
}
function run() external {
DeployConfig memory cfg = getConfig();
uint256 deployerKey = vm.envUint("DEPLOYER_PRIVATE_KEY");
vm.startBroadcast(deployerKey);
// Deploy implementation
MyProtocol impl = new MyProtocol();
console2.log("Implementation:", address(impl));
// Deploy proxy
bytes memory initData = abi.encodeCall(
MyProtocol.initialize, (cfg.admin, cfg.treasury, cfg.feeRate, cfg.weth)
);
ERC1967Proxy proxy = new ERC1967Proxy(address(impl), initData);
console2.log("Proxy:", address(proxy));
// Deploy treasury
Treasury treasury = new Treasury(address(proxy));
console2.log("Treasury:", address(treasury));
// Post-deploy configuration
MyProtocol(address(proxy)).setTreasury(address(treasury));
vm.stopBroadcast();
// Verify deployment (runs after broadcast)
_verify(address(proxy), cfg);
}
function _verify(address proxy, DeployConfig memory cfg) internal view {
MyProtocol protocol = MyProtocol(proxy);
require(protocol.admin() == cfg.admin, "Admin mismatch");
require(protocol.feeRate() == cfg.feeRate, "Fee mismatch");
console2.log("Verification passed");
}
}
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 1mo ago First seen · 265 lines · 36 tokens per session scan A bcd3091721fb
forge-scripting is a skill published in the GitHub repository ccashwell/evm-cortex (131 stars, last pushed 17d ago), licensed MIT. It adds 36 tokens to every session and 1,850 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other skills, from other repositories
signature-replay
Signature replay attacks — missing nonces, missing chain ID, ecrecover zero address, signature malleability, cross-chain replay.
official-sui-skills
Pointer to the official Mysten Labs skills for building on Sui — language fundamentals, object model, PTBs, SDKs, publishing, upgrades, frontend integration, accessing on-chain data. Maintained upstream at github.com/MystenLabs/skills; pinned to the same ref the audit catalog derives from (see…
bridge
Cross-chain token transfers using Wormhole and CCTP.
onchainkit
Build onchain apps with Coinbase's OnchainKit React components - wallets, swaps, NFTs, payments.
marginfi
MarginFi — Solana lending and borrowing.
devtools-event-client
Create typed EventClient for a library. Define event maps with typed payloads, pluginId auto-prepend namespacing, emit()/on()/onAll()/onAllPluginEvents() API. Connection lifecycle (5 retries, 300ms), event queuing, enabled/disabled state, SSR fallbacks, singleton pattern. Unique pluginId requirement to avoid event…