defi-protocols
Specialized knowledge of DeFi protocols including smart contracts, tokens, and decentralized lending on blockchains.
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o defi-protocols.zip https://jpskill.com/download/22029.zip && unzip -o defi-protocols.zip && rm defi-protocols.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/22029.zip -OutFile "$d\defi-protocols.zip"; Expand-Archive "$d\defi-protocols.zip" -DestinationPath $d -Force; ri "$d\defi-protocols.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
defi-protocols.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
defi-protocolsフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 1
📖 Claude が読む原文 SKILL.md(中身を展開)
この本文は AI(Claude)が読むための原文(英語または中国語)です。日本語訳は順次追加中。
defi-protocols
Purpose
This skill equips the AI with specialized knowledge of DeFi protocols, enabling precise interactions with smart contracts, tokens, and decentralized lending on blockchains like Ethereum and Binance Smart Chain.
When to Use
Use this skill for tasks involving DeFi app development, smart contract auditing, token management, or lending protocol integrations. Apply it when handling blockchain transactions, yield farming, or protocol vulnerabilities in real-time coding scenarios.
Key Capabilities
- Interact with smart contracts using Web3.js or Ethers.js libraries to read/write state.
- Manage ERC-20/ERC-721 tokens, including transfers and approvals.
- Handle decentralized lending via protocols like Aave or Compound, querying interest rates or borrowing limits.
- Analyze on-chain data from block explorers like Etherscan API endpoints (e.g.,
/api?module=account&action=balance). - Simulate transactions with tools like Hardhat for testing smart contracts.
Usage Patterns
To use this skill, initialize a Web3 provider in your code and set environment variables for API keys. For example, in a Node.js script, import Web3 and connect to a network:
const Web3 = require('web3');
const web3 = new Web3(process.env.RPC_URL || 'http://localhost:8545');
For DeFi-specific tasks, wrap contract interactions in try-catch blocks and use ABI files for decoding. When querying Aave, fetch pool data by specifying the contract address and function signature.
Common Commands/API
- CLI: Use Hardhat for deploying contracts:
npx hardhat run scripts/deploy.js --network sepolia --api-key $ETHEREUM_API_KEY. - API: Ethereum JSON-RPC via endpoints like
eth_callfor contract calls:curl -X POST --data '{"jsonrpc":"2.0","method":"eth_call","params":[{...}],"id":1}' $RPC_URL. - Aave API: Query lending pools with
GET https://api.thegraph.com/subgraphs/name/aave/protocol-v2using GraphQL queries. - Config formats: Store ABI in JSON files, e.g.,
{ "abi": [{ "name": "balanceOf", "inputs": [...] }] }, and load viafs.readFileSync('abi.json'). - Token interactions: Use Ethers.js for transfers:
contract.methods.transfer(address, amount).send({ from: walletAddress }).
Integration Notes
Integrate this skill with wallets like MetaMask by using Web3 providers that handle signer objects. For authentication, set env vars like $ETHEREUM_API_KEY for services such as Infura or Alchemy. When combining with other skills, ensure compatibility by standardizing blockchain networks (e.g., use Web3.js for both DeFi and general blockchain tasks). For oracles like Chainlink, import their contracts and call functions like getPrice before executing DeFi logic.
Error Handling
Handle common errors like transaction reverts by checking for TransactionError in Ethers.js: try { await contract.methods.borrow().send(); } catch (error) { if (error.reason.includes('insufficient collateral')) console.log('Add more collateral'); }. For API failures, verify status codes (e.g., 429 for rate limits) and retry with exponential backoff. Use event listeners for blockchain errors, e.g., contract.events.ErrorOccurred().on('data', handleError). Always validate inputs to prevent exploits like reentrancy in lending protocols.
Concrete Usage Examples
- Query Aave Lending Pool: To check available liquidity for a token, use this Ethers.js snippet:
const pool = await ethers.getContractAt('ILendingPool', '0x...'); const liquidity = await pool.getReserveData(tokenAddress); console.log(liquidity.availableLiquidity.toString());. Set$AAVE_SUBGRAPH_KEYfor any required API access. - Deploy a Simple Token Contract: In a Hardhat project, run
npx hardhat compilethennpx hardhat deploy --network mumbai, with config inhardhat.config.jslikemodule.exports = { networks: { mumbai: { url: process.env.RPC_URL, accounts: [process.env.PRIVATE_KEY] } } };. This deploys an ERC-20 token for DeFi use.
Graph Relationships
- Related to: ethereum (shares blockchain cluster), smart-contracts (overlaps on contract interactions), tokens (focuses on ERC standards).
- Connected via: blockchain cluster for broader ecosystem access.
- Dependencies: Requires protocols like aave for lending specifics.