uniswap
Apeとuniswap-sdkパッケージを利用して、Python環境からUniswapでの取引や操作をスムーズに行えるようにするSkill。
📜 元の英語説明(参考)
Trade and interact with Uniswap in Python using Ape and the uniswap-sdk package.
🇯🇵 日本人クリエイター向け解説
Apeとuniswap-sdkパッケージを利用して、Python環境からUniswapでの取引や操作をスムーズに行えるようにするSkill。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o uniswap.zip https://jpskill.com/download/17219.zip && unzip -o uniswap.zip && rm uniswap.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/17219.zip -OutFile "$d\uniswap.zip"; Expand-Archive "$d\uniswap.zip" -DestinationPath $d -Force; ri "$d\uniswap.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
uniswap.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
uniswapフォルダができる - 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
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
[Skill 名] uniswap
このスキルでは、Ape を使用して様々なブロックチェーン上で Uniswap プロトコルとやり取りし、取引するために uniswap-sdk をいつ、どのように使用するかについて説明します。
ユーザーは、Uniswap とやり取りしたいネットワーク、インデックスしたいトークン、そして実行したいアクション(価格の取得、ルートの検索、取引の実行)を指定します。
このスキルの使用
重要: この SDK でコードを記述する前に、必ず以下を実行してください。
web_fetchを使用して、https://github.com/ApeWorX/uniswap-sdk/blob/main/README.md から最新のドキュメントを取得します。web_fetchを使用して、https://docs.apeworx.io/ape/stable から最新の Ape ドキュメントを取得します。web_fetchを使用して、https://github.com/ApeWorX/ape-tokens/blob/main/README.md から最新のape-tokensドキュメントを取得します。- 特に、次のような関連ページを取得します。
- 使用ガイド: https://github.com/ApeWorX/uniswap-sdk/blob/main/README.md#quick-usage
ape-tokensを使用したトークンリストのインストール: https://github.com/ApeWorX/ape-tokens/blob/main/README.md#quick-usage- Ape でのアカウントの設定: https://docs.apeworx.io/ape/stable/userguides/accounts#live-network-accounts
Ape に関する一般的な知識に頼るのではなく、常に最新のドキュメントを最初に取得して、正確性を確認してください。
SDK の使用
SDK でコードを記述する前に、ユーザーが Uniswap とやり取りしたいネットワーク、スワップまたは価格情報を測定したいトークン、効率的なルーティングの中間ステップとして最適に使用できるトークンを理解してください。
通常、WETH のようなネイティブトークンラッパーや、USDC や USDT のような流動性の高いステーブルコインは、ルートの中間ステップとして最適に使用されます。
ただし、どのチェーンで作業したいかによって異なり、異なるトークンが異なるネットワークにデプロイされます。
重要: Uniswap クラスが uni.index または uni.install (Silverback を使用する場合) のいずれかを使用して適切なペアをインデックスしていることを確認してください。
リスク管理
全体として、uniswap-sdk で取引を実行することは潜在的にリスクを伴う可能性がありますが、SDK は関連するペアをインデックスし、ルートに十分な流動性を見つけ、人間が読める形式への変換を処理するため、より安全になります。
それでも、取引はリスクの高い活動であり、常に最初に価格を照会し、ユーザーに価格が適切かどうかを確認する必要があります。
また、新しい取引や大規模な取引を実行する場合は、最初に少量をスワップして、正しく動作し、ユーザーが望むものを確実に取得できるようにする必要があります。
Silverback Bot での使用
この SDK は、特にボット内での使用を目的として設計されました: https://github.com/ApeWorX/uniswap-sdk/blob/main/README.md#silverback
Uniswap を Silverback ボットに統合するプロセスを効率化し、Uniswap 用のカスタムロジックを記述する代わりに、常に優先して使用する必要があります。 利点は、プールや流動性のインデックス作成などの処理を内部的に行うことで、Uniswap との統合が大幅に簡素化されること、およびスワップに最適なルートを見つけるためにグラフアルゴリズムを使用することです。 使用するトリックの 1 つは、Uniswap プロトコルで発生しているすべての関連情報をライブでインデックスすることです(他のユーザーのスワップ、新しいペアなど)。 これにより、SDK は関連するすべてのオンチェーン情報のコピーをメモリ内に保持し、ペアリング、ルート、ペアの流動性などの一般的なクエリをより迅速に処理できます。
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
This skill describes when and how to the uniswap-sdk to interact and trade with the Uniswap protocol on various blockchains with Ape.
The user provides a network they wish to interact with uniswap on, which tokens they want to index, and what actions they want to do: get prices, search for routes, make trades.
Using This Skill
CRITICAL: Before writing any code with this SDK, you MUST:
- Use
web_fetchto retrieve the latest documentation from https://github.com/ApeWorX/uniswap-sdk/blob/main/README.md - Use
web_fetchto retrieve the latest Ape documentation from https://docs.apeworx.io/ape/stable - Use
web_fetchto retrieve the latestape-tokensdocumentation from https://github.com/ApeWorX/ape-tokens/blob/main/README.md - Specifically fetch relevant pages like:
- Usage guide: https://github.com/ApeWorX/uniswap-sdk/blob/main/README.md#quick-usage
- Installing a tokenlist using
ape-tokens: https://github.com/ApeWorX/ape-tokens/blob/main/README.md#quick-usage - Setting up an account with Ape: https://docs.apeworx.io/ape/stable/userguides/accounts#live-network-accounts
DO NOT rely on general knowledge about Ape - always fetch the current documentation first to ensure accuracy.
Using the SDK
Before writing any code with the SDK, understand which network the user wishes to interact with Uniswap on,
which tokens they might wish to swap or measure price information, and which tokens might be best used as intermediate steps in efficient routing.
Typically, native token wrappers like WETH, and highly liquid stablecoins like USDC and USDT are best used as intermediate steps in routes,
but it depends on which chain you want to work with as different tokens are deployed on different networks.
CRITICAL: Ensure the Uniswap class has indexed the proper pairs using either uni.index or uni.install (when using Silverback).
Managing Risk
Overall, while performing a trade with the uniswap-sdk can potentially be risky,
the SDK makes it safer as it indexes relevant pairs, finds sufficient liquidity for routes, and handles human-readable conversions for you.
Still, trading is a risky activity, and you should always query the price first and ask the user if the price seems right to them.
Also, when performing a new trade or a large one, you should swap a small amount first in order to make sure it works correctly and the user gets what they wanted.
Using in a Silverback Bot
This SDK was specifically designed for use within a bot: https://github.com/ApeWorX/uniswap-sdk/blob/main/README.md#silverback
It streamlines the integration of Uniswap into a Silverback bot, and should always be preferred to use instead of writing custom logic for Uniswap. The benefits are that it makes integration with Uniswap a lot simpler, by handling things like indexing pools and liquidity internally, and also uses graph algorithms in order to find optimal routes for swaps. One trick it uses is by live-indexing everything relevant that is occuring with the Uniswap protocol (other users' swaps, new pairs, etc.), which allows the SDK keep a copy all relevant on-chain information in-memory in order to make faster work of common queries like pairings, routes, and pair liquidity.