Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Trade and interact with Uniswap in Python using Ape and the uniswap-sdk package.
.claude/skills/aiskillstore-uniswap/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-04 | ✗→✓ | ▲ Improved | 0% | 0% |
| case-05 | ✗→✓ | ▲ Improved | 51% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 38% | 0% |
| case-12 | ✗→✓ | ▲ Improved | -1% | 0% |
| case-14 | ✗→✓ | ▲ Improved | 19% | 0% |
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.
CRITICAL: Before writing any code with this SDK, you MUST:
web_fetch to retrieve the latest documentation from https://github.com/ApeWorX/uniswap-sdk/blob/main/README.mdweb_fetch to retrieve the latest Ape documentation from https://docs.apeworx.io/ape/stableweb_fetch to retrieve the latest ape-tokens documentation from https://github.com/ApeWorX/ape-tokens/blob/main/README.mdape-tokens: https://github.com/ApeWorX/ape-tokens/blob/main/README.md#quick-usageDO NOT rely on general knowledge about Ape - always fetch the current documentation first to ensure accuracy.
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).
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.
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.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 25,712 | 30,412 | +18% | 1 | 1 | 0% | 5,118 | 1,214 | -76% | 0 | 0 | — |
case-02 | fail→fail | 27,393 | 11,403 | -58% | 1 | 1 | 0% | 4,187 | 1,173 | -72% | 0 | 0 | — |
case-03 | fail→fail | 23,189 | 12,977 | -44% | 1 | 1 | 0% | 4,163 | 1,367 | -67% | 0 | 0 | — |
case-04 | fail→pass | 11,634 | 11,396 | -2% | 1 | 1 | 0% | 1,969 | 1,976 | +0% | 0 | 0 | — |
case-05 | fail→pass | 6,137 | 9,040 | +47% | 1 | 1 | 0% | 1,000 | 1,505 | +51% | 0 | 0 | — |
case-06 | fail→pass | 7,253 | 9,116 | +26% | 1 | 1 | 0% | 1,101 | 1,514 | +38% | 0 | 0 | — |
case-07 | fail→fail | 33,301 | 11,232 | -66% | 1 | 1 | 0% | 4,603 | 1,181 | -74% | 0 | 0 | — |
case-08 | fail→fail | 12,353 | 10,822 | -12% | 1 | 1 | 0% | 1,980 | 1,162 | -41% | 0 | 0 | — |
case-09 | pass→fail | 17,818 | 18,009 | +1% | 1 | 1 | 0% | 2,866 | 1,289 | -55% | 0 | 0 | — |
case-10 | pass→pass | 11,231 | 15,986 | +42% | 1 | 1 | 0% | 2,015 | 2,100 | +4% | 0 | 0 | — |
case-11 | pass→fail | 23,717 | 12,090 | -49% | 1 | 1 | 0% | 3,249 | 1,293 | -60% | 0 | 0 | — |
case-21 | pass→fail | 14,836 | 12,693 | -14% | 1 | 1 | 0% | 1,722 | 1,075 | -38% | 0 | 0 | — |
case-12 | fail→pass | 10,107 | 4,670 | -54% | 1 | 1 | 0% | 1,708 | 1,687 | -1% | 0 | 0 | — |
case-13 | pass→fail | 24,202 | 17,340 | -28% | 1 | 1 | 0% | 2,927 | 1,220 | -58% | 0 | 0 | — |
case-14 | fail→pass | 11,971 | 4,307 | -64% | 1 | 1 | 0% | 1,332 | 1,580 | +19% | 0 | 0 | — |
case-15 | fail→fail | 12,549 | 12,356 | -2% | 1 | 1 | 0% | 1,891 | 1,315 | -30% | 0 | 0 | — |
case-16 | pass→fail | 19,654 | 12,775 | -35% | 1 | 1 | 0% | 2,232 | 1,200 | -46% | 0 | 0 | — |
case-17 | pass→pass | 16,757 | 18,405 | +10% | 1 | 1 | 0% | 1,952 | 1,516 | -22% | 0 | 0 | — |
case-18 | fail→pass | 22,713 | 8,689 | -62% | 1 | 1 | 0% | 2,796 | 1,377 | -51% | 0 | 0 | — |
case-19 | pass→pass | 7,812 | 8,453 | +8% | 1 | 1 | 0% | 422 | 1,414 | +235% | 0 | 0 | — |
case-20 | pass→pass | 6,812 | 4,501 | -34% | 1 | 1 | 0% | 1,109 | 1,549 | +40% | 0 | 0 | — |
case-22 | pass→pass | 31,557 | 21,879 | -31% | 1 | 1 | 0% | 3,020 | 3,226 | +7% | 0 | 0 | — |
case-23 | pass→fail | 19,163 | 10,627 | -45% | 1 | 1 | 0% | 2,254 | 1,072 | -52% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 23 cases were attempted, and 11 counted toward the lift figure. The other 12 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of 0 percentage points is the difference between those two pass rates over the 11 comparable cases. 8 cases got worse with the skill loaded, and they are included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.