defi-protocol-templates Skill (wshobson) for Claude: What It Does and How to Install It
Gives Claude Solidity templates for staking, AMM, governance and flash loan contracts to adapt.
- Installs
- 10.6K
- on skills.sh
- Stars
- 42.1K
- on GitHub
- Files
- 1
- besides SKILL.md
- Updated
- Oct 2026
- last repo commit
This skill gives Claude four DeFi contract templates, from wshobson's agents collection: staking with reward distribution, a simple AMM, a governance token with a governor, and a flash loan provider and receiver. The main file holds the staking and AMM code, and references/details.md holds governance and flash loans.
It loads when you build staking platforms, AMMs, governance token systems or flash loan features. The code imports OpenZeppelin contracts, and SKILL.md says nothing about audits.
Good for
- Solidity developers starting a DeFi contract
- Teams prototyping staking or governance features
- Learners reading how common DeFi patterns are built
Install defi-protocol-templates
Claude Code
- 1
Copy this prompt.
Install the defi-protocol-templates skill in Claude Code. Run this command: /plugin marketplace add wshobson/agents /plugin install blockchain-web3@claude-code-workflows Then check that it loaded and tell me how to use it.
- 2
Paste it into Claude Code. It shows the change and asks before running it.
Pick one route. The plugin routes install the whole blockchain-web3 plugin: 1 agent, 0 commands and 4 skills (counted from the plugin folder in the repo tree, which has no hooks or MCP config files). The skills-only routes install just this skill, with no agents or commands. The templates import OpenZeppelin contracts, which your project needs to have installed.
Built from the package data we hold. Not yet tested by us. Source.
What's in the skill
When it loads
Implement DeFi protocols with production-ready templates for staking, AMMs, governance, and flash loans. Use when building decentralized finance applications or smart contract protocols.
Sections in SKILL.md
- When to Use This Skill
- Staking Contract
- AMM (Automated Market Maker)
- Additional patterns and templates
Key facts
- License
- MIT (repo and plugin.json)
- Installs on skills.sh
- 10,647 (Nov 2, 2026)
- Last repo commit
- Oct 30, 2026
- What it includes
- 2 files including SKILL.md: references/details.md (no scripts)
What it includes
StakingRewards with stake, withdraw, getReward and exit
Uses OpenZeppelin ReentrancyGuard and Ownable, with a per-second reward rate.
Write ·
Staking contractSimpleAMM with add and remove liquidity and token swaps
A pool of two tokens with a 0.3% swap fee in the code.
Write ·
AMMGovernanceToken (ERC20Votes) and a Governor with propose, vote and execute
In references/details.md.
Write ·
Governance tokenFlashLoanProvider, an IFlashLoanReceiver interface and an example receiver
The provider takes a 0.09% fee in the code. In references/details.md.
Write ·
Flash loan
From the official docs
Permissions
Medium risk
It writes smart contract code that handles tokens, so a bug in it can lose funds once deployed. Get the code reviewed and tested before it holds real money.
What it can do
- Read your data
- Create and change things
- Delete things
- Read-only mode
Watch out for
The templates move tokens and are not shown as audited
The staking, AMM and flash loan code calls transfer and transferFrom on ERC20 tokens. SKILL.md does not mention audits, so review and test the code yourself before deploying it with real funds. github.com
The plugin route installs more than this skill
The blockchain-web3 plugin has 1 agent, no commands and 4 skills. We found no hooks or MCP config files in its folder. The skills-only routes install just this skill. github.com
Security advisories
No published security advisories as of Nov 2, 2026.
Technical details
| Turning on read-only | No read-only mode is documented in SKILL.md. Use version control for files it writes. |
|---|---|
| Sign-in and keys | SKILL.md and details.md do not mention any account or key. |
| Scopes |
|
Questions
What does the defi-protocol-templates skill do?
It gives Claude Solidity templates for four DeFi building blocks: staking, an AMM, governance and flash loans. Claude adapts them to your project when you ask.
How do I install defi-protocol-templates?
Use the install box at the top of this page. It lists the plugin route and two skills-only commands, plus a Claude app upload. The skills-only commands skip the plugin's agent.
Are the contracts audited and ready for mainnet?
SKILL.md calls them production-ready templates but says nothing about audits or tests. Treat the code as a starting point and get your own review and tests before real funds touch it.
Should I install the whole blockchain-web3 plugin?
Only if you want the rest. The plugin folder holds 1 agent, no commands and 4 skills, and the repo tree shows no hooks or MCP config files in it. The other skills there are nft-standards, solidity-security and web3-testing.
Does it deploy contracts for me?
SKILL.md contains templates only and no deploy steps. Claude writes code files in your project. Deployment is something you set up and run yourself.
Is it safe to install?
It is a guide with one reference file and no scripts. When you ask for a contract, Claude writes Solidity files in your project. The templates move ERC20 tokens, so test and review them before they hold real funds.
Information
updated Nov 2, 2026
- Repository
- wshobson/agents
- Folder
plugins/blockchain-web3/skills/defi-protocol-templates
Sources
Docs, issue trackers and discussions this page is built from.
Show all 5Hide
- defi-protocol-templates SKILL.md · github.com
- wshobson/agents README · github.com
- blockchain-web3 plugin.json · github.com
- wshobson/agents marketplace.json · github.com
- defi-protocol-templates details.md · github.com