Solidity smart contract development with Foundry. Covers writing, testing, security, deployment, and upgrades. Triggers on .sol files, contract, pragma solidity, forge.
Build secure, gas-efficient Solidity contracts with Foundry. Triggers on .sol files, contract keywords, pragma solidity, or forge commands. Guides you through writing, testing, deploying, and upgrading smart contracts with OpenZeppelin patterns and security best practices.
/plugin marketplace add settlemint/agent-marketplace/plugin install devtools@settlemintThis skill inherits all available tools. When active, it can use any tool Claude has access to.
<mcp_first> CRITICAL: Use OctoCode to search OpenZeppelin and Foundry patterns.
MCPSearch({ query: "select:mcp__plugin_devtools_octocode__githubSearchCode" })
MCPSearch({ query: "select:mcp__plugin_devtools_context7__query-docs" })
// OpenZeppelin contracts
mcp__octocode__githubSearchCode({
keywordsToSearch: ["Ownable", "AccessControl", "Pausable"],
owner: "OpenZeppelin",
repo: "openzeppelin-contracts",
path: "contracts/access",
mainResearchGoal: "Find OpenZeppelin access control patterns",
researchGoal: "Get current Ownable and AccessControl implementations",
reasoning: "Need verified security patterns",
});
// Foundry testing
mcp__context7__query_docs({
libraryId: "/foundry-rs/book",
query: "How do I use forge test with fuzz and invariant testing?",
});
Note: Context7 v2 uses server-side filtering. Use descriptive natural language queries. </mcp_first>
<quick_start> Contract structure:
// SPDX-License-Identifier: MIT
pragma solidity 0.8.28;
import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";
/// @title MyContract
/// @notice Brief description
contract MyContract is Ownable {
// Events
event ActionPerformed(address indexed actor, uint256 amount);
// Errors
error InsufficientBalance(uint256 required, uint256 available);
// State variables
uint256 private _totalAmount;
// Constructor
constructor() Ownable(msg.sender) {}
/// @notice Performs an action
/// @param amount The amount to process
function performAction(uint256 amount) external {
// Checks
if (amount > _totalAmount) {
revert InsufficientBalance(amount, _totalAmount);
}
// Effects
_totalAmount -= amount;
// Interactions
emit ActionPerformed(msg.sender, amount);
}
}
</quick_start>
<cei_pattern> CEI Pattern (Required):
Always order operations as:
function transfer(address to, uint256 amount) external {
// 1. Checks
require(balances[msg.sender] >= amount, "Insufficient");
// 2. Effects
balances[msg.sender] -= amount;
balances[to] += amount;
// 3. Interactions
emit Transfer(msg.sender, to, amount);
}
</cei_pattern>
<constraints> **Banned:** `assembly {}`, `tx.origin`, `block.timestamp` for randomness, `selfdestruct`, magic numbers, functions >50 lines, >7 parametersRequired:
external functions_disableInitializers() in implementation constructorssuper.hookName() FIRST in hook overridesNaming: Contracts=PascalCase, functions=camelCase, constants=SCREAMING_SNAKE, events=PastTense, errors=NounPhrase, private=_underscore
</constraints>
<security_checklist>
<success_criteria>
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.