Detects Solidity development framework (Foundry, Hardhat, or Hybrid) and adapts workflows accordingly. Use at the start of any Solidity development task to determine which tools and commands to use.
/plugin marketplace add IvanTorresEdge/molcajete.ai/plugin install ivantorresedge-sol-tech-stacks-solidity@IvanTorresEdge/molcajete.aiThis skill inherits all available tools. When active, it can use any tool Claude has access to.
This skill enables automatic detection of the Solidity development framework being used in a project and adapts workflows accordingly.
Use this skill at the beginning of any Solidity development workflow to:
Check for foundry.toml in the project root:
# Foundry indicator
if [ -f "foundry.toml" ]; then
echo "Foundry detected"
fi
Foundry-specific files:
foundry.toml - Main configuration filelib/ directory - Dependencies (via git submodules)test/ directory with .t.sol filesscript/ directory for deployment scriptsCommands:
forge buildforge testforge scriptforge coverageCheck for hardhat.config.js or hardhat.config.ts in the project root:
# Hardhat indicator
if [ -f "hardhat.config.js" ] || [ -f "hardhat.config.ts" ]; then
echo "Hardhat detected"
fi
Hardhat-specific files:
hardhat.config.js or hardhat.config.ts - Main configurationpackage.json with hardhat dependenciesnode_modules/ directorytest/ directory with .js or .ts filesscripts/ directory for deploymentCommands:
npx hardhat compilenpx hardhat testnpx hardhat run scripts/deploy.jsnpx hardhat coverageBoth frameworks can coexist in the same project:
# Hybrid indicator
if [ -f "foundry.toml" ] && ([ -f "hardhat.config.js" ] || [ -f "hardhat.config.ts" ]); then
echo "Hybrid setup detected"
fi
Hybrid workflow strategy:
# Foundry
forge build
# Hardhat
npx hardhat compile
# Hybrid (prefer Foundry)
forge build
# Foundry
forge test
forge test -vvv # Verbose
forge test --match-test testName
# Hardhat
npx hardhat test
npx hardhat test --grep "pattern"
# Hybrid
forge test # Fast unit tests
npx hardhat test # Integration tests with JS tooling
# Foundry
forge script script/Deploy.s.sol:DeployScript --rpc-url $RPC_URL --broadcast
# Hardhat
npx hardhat run scripts/deploy.js --network mainnet
# Hybrid (prefer Hardhat for deployment)
npx hardhat run scripts/deploy.js --network mainnet
# Foundry
forge test --gas-report
# Hardhat
REPORT_GAS=true npx hardhat test
# Hybrid
forge test --gas-report # More detailed
# Foundry
forge coverage
forge coverage --report lcov
# Hardhat
npx hardhat coverage
# Hybrid (prefer Foundry)
forge coverage --report lcov
All agents should call this skill first before executing any framework-specific commands:
**Framework Detection Process:**
1. Check for foundry.toml → Foundry detected
2. Check for hardhat.config.js/ts → Hardhat detected
3. Both present → Hybrid detected
4. Neither present → Prompt user or initialize
**Step 1: Detect Framework**
I'll first check which framework is configured in this project.
[Uses Bash tool to check for foundry.toml and hardhat.config.*]
**Framework detected:** Foundry
**Step 2: Adapt Commands**
Based on Foundry detection, I'll use:
- Compilation: `forge build`
- Testing: `forge test`
- Coverage: `forge coverage`
[Proceeds with Foundry-specific workflow...]
When both frameworks are detected, follow these guidelines:
Use Foundry for:
Use Hardhat for:
If neither framework is detected:
⚠️ **No Solidity framework detected**
I couldn't find foundry.toml or hardhat.config.js/ts in this project.
Would you like to:
1. Initialize Foundry (`forge init`)
2. Initialize Hardhat (`npx hardhat init`)
3. Skip framework setup (manual configuration)
If commands fail due to wrong framework assumptions:
⚠️ **Framework mismatch detected**
The command failed. Let me re-check the framework configuration and adapt.
[Re-runs framework detection]
Switching to [detected framework] workflow...
This skill is foundational and should be referenced by:
foundry-setup skillhardhat-setup skill| Task | Foundry | Hardhat | Hybrid Strategy |
|---|---|---|---|
| Compile | forge build | npx hardhat compile | Use Foundry |
| Test | forge test | npx hardhat test | Use Foundry |
| Coverage | forge coverage | npx hardhat coverage | Use Foundry |
| Deploy | forge script | npx hardhat run | Use Hardhat |
| Verify | forge verify-contract | npx hardhat verify | Use Hardhat |
| Gas Report | forge test --gas-report | REPORT_GAS=true npx hardhat test | Use Foundry |
Remember: Framework detection is the first step in any Solidity workflow. Always detect before executing commands.
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 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 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.