CtrlK
BlogDocsLog inGet started
Tessl Logo

defi-protocol-templates

Implement DeFi protocols with production-ready templates for staking, AMMs, governance, and lending systems. Use when building decentralized finance applications or smart contract protocols.

Install with Tessl CLI

npx tessl i github:wshobson/agents --skill defi-protocol-templates
What are skills?

Overall
score

71%

Does it follow best practices?

Evaluation100%

1.25x

Agent success when using this skill

Validation for skill structure

SKILL.md
Review
Evals

Evaluation results

100%

26%

Yield Staking Platform Contract

Staking contract reentrancy and reward tracking

Criteria
Without context
With context

Solidity version

60%

100%

SPDX license

100%

100%

OpenZeppelin IERC20

0%

100%

ReentrancyGuard import

0%

100%

nonReentrant on stake

100%

100%

nonReentrant on withdraw

100%

100%

nonReentrant on getReward

100%

100%

updateReward modifier

100%

100%

1e18 reward precision

100%

100%

Default reward rate 100

0%

100%

Staked event

100%

100%

Withdrawn event

100%

100%

RewardPaid event

100%

100%

Without context: $0.3835 · 2m 2s · 13 turns · 62 in / 6,876 out tokens

With context: $0.5462 · 1m 53s · 25 turns · 526 in / 5,044 out tokens

100%

3%

Decentralized Token Swap Pool

AMM fee calculation and liquidity share math

Criteria
Without context
With context

Solidity version

75%

100%

SPDX license

100%

100%

OpenZeppelin IERC20

100%

100%

0.3% fee formula

87%

100%

Constant-product swap

100%

100%

sqrt initial shares

100%

100%

min subsequent shares

100%

100%

Reserve tracking

100%

100%

Mint event

100%

100%

Burn event

100%

100%

Swap event

100%

100%

Without context: $0.3363 · 1m 42s · 12 turns · 12 in / 5,914 out tokens

With context: $0.4143 · 1m 35s · 16 turns · 313 in / 4,848 out tokens

100%

30%

DAO On-Chain Governance System

Governance token voting power and proposal parameters

Criteria
Without context
With context

Solidity version

100%

100%

SPDX license

100%

100%

ERC20Votes inheritance

100%

100%

ERC20Permit in constructor

100%

100%

Initial supply 1M tokens

0%

100%

votingPeriod = 17280

0%

100%

proposalThreshold

0%

100%

getPastVotes for eligibility

100%

100%

getPastVotes for vote weight

100%

100%

ProposalCreated event

100%

100%

VoteCast event

100%

100%

ProposalExecuted event

100%

100%

Without context: $0.3496 · 1m 57s · 14 turns · 13 in / 5,907 out tokens

With context: $0.4462 · 1m 27s · 18 turns · 922 in / 4,578 out tokens

Evaluated
Agent
Claude Code

Table of Contents

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.