Notebook To Strategy
tradingstrategy-ai/trade-executor
Transfer code from a backtesting Jupyter notebook to a Trade Executor strategy module
Swap tokens on Uniswap V2/V3/V4 using Nethereum (.NET/C). An agent skill from Nethereum/Nethereum.
$ npx skills add Nethereum/Nethereum --skill uniswap-swap -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install Nethereum/Nethereum uniswap-swap --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/Nethereum/Nethereum.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/nethereum-skills/skills/uniswap-swap .claude/skills/uniswap-swap && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "uniswap-swap" agent skill from https://github.com/Nethereum/Nethereum/tree/master/plugins/nethereum-skills/skills/uniswap-swap into .claude/skills/uniswap-swap/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "uniswap-swap", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/Nethereum/Nethereum/tree/master/plugins/nethereum-skills/skills/uniswap-swapType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add Nethereum/Nethereum --skill uniswap-swap -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install Nethereum/Nethereum uniswap-swap --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Nethereum/Nethereum.git skills-src && mkdir -p .agents/skills && cp -r skills-src/plugins/nethereum-skills/skills/uniswap-swap .agents/skills/uniswap-swap && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "uniswap-swap" agent skill from https://github.com/Nethereum/Nethereum/tree/master/plugins/nethereum-skills/skills/uniswap-swap into .agents/skills/uniswap-swap/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "uniswap-swap", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add Nethereum/Nethereum --skill uniswap-swap -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install Nethereum/Nethereum uniswap-swap --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Nethereum/Nethereum.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/plugins/nethereum-skills/skills/uniswap-swap .cursor/skills/uniswap-swap && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "uniswap-swap" agent skill from https://github.com/Nethereum/Nethereum/tree/master/plugins/nethereum-skills/skills/uniswap-swap into .cursor/skills/uniswap-swap/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "uniswap-swap", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/Nethereum/Nethereum.git --path plugins/nethereum-skills/skills/uniswap-swap--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add Nethereum/Nethereum --skill uniswap-swap -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install Nethereum/Nethereum uniswap-swap --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Nethereum/Nethereum.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/plugins/nethereum-skills/skills/uniswap-swap .gemini/skills/uniswap-swap && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "uniswap-swap" agent skill from https://github.com/Nethereum/Nethereum/tree/master/plugins/nethereum-skills/skills/uniswap-swap into .gemini/skills/uniswap-swap/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "uniswap-swap", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install Nethereum/Nethereum uniswap-swapInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add Nethereum/Nethereum --skill uniswap-swap -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/Nethereum/Nethereum.git skills-src && mkdir -p .github/skills && cp -r skills-src/plugins/nethereum-skills/skills/uniswap-swap .github/skills/uniswap-swap && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "uniswap-swap" agent skill from https://github.com/Nethereum/Nethereum/tree/master/plugins/nethereum-skills/skills/uniswap-swap into .github/skills/uniswap-swap/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "uniswap-swap", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add Nethereum/Nethereum --skill uniswap-swap -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install Nethereum/Nethereum uniswap-swap --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Nethereum/Nethereum.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/plugins/nethereum-skills/skills/uniswap-swap .opencode/skills/uniswap-swap && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "uniswap-swap" agent skill from https://github.com/Nethereum/Nethereum/tree/master/plugins/nethereum-skills/skills/uniswap-swap into .opencode/skills/uniswap-swap/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "uniswap-swap", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
uniswap-swapSwap tokens on Uniswap V2/V3/V4 using Nethereum (.NET/C). An agent skill from Nethereum/Nethereum.
Uniswap Swap is an agent skill from Nethereum/Nethereum. Swap tokens on Uniswap V2/V3/V4 using Nethereum (.NET/C). Use this skill whenever the user asks about token swaps, DEX trading, Uniswap integration, quoting prices, slippage protection, price impact, Universal Router, Permit2, or any DeFi swap operation with C or .NET.
Its SKILL.md is about 2.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Business, Finance & HR, covering Crypto and DeFi analysis and Trading and backtesting. It works with Uniswap, C# and .NET. The repository describes itself as: Ethereum .Net cross platform integration library. The licence is MIT.
Read from SKILL.md and the folder at commit 229f278. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
dotnetFrom the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
docs.nethereum.comFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Uniswap Swap loads about 2.1k tokens when it runs. Until then it costs about 71 tokens; SKILL.md has 320 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from Nethereum/Nethereum at commit 229f278, republished under its MIT licence (© Nethereum). 320 words, ~2,073 tokens.
.claude/skills/uniswap-swap/SKILL.md (or your agent's skills folder).Nethereum provides a complete Uniswap integration covering V2, V3, and V4. The web3.UniswapV4() extension gives you access to quoting, routing, pool discovery, and swap execution — all through typed C# services. This is the standard way to execute on-chain token swaps from .NET.
NuGet: Nethereum.Uniswap
dotnet add package Nethereum.UniswapThe UniswapV4() extension on Web3 exposes the full service hierarchy. It defaults to Mainnet addresses but accepts any network's addresses:
var web3 = new Web3(new Account(privateKey), rpcUrl);
var uniswap = web3.UniswapV4();
// Or for a specific network:
var uniswap = web3.UniswapV4(UniswapV4Addresses.BaseSepolia);The uniswap object provides: Pools (state, cache, discovery), Pricing (quoter, price calculator, slippage, price impact), Positions (liquidity management), UniversalRouter (swap execution), and Math (tick math).
Before swapping, simulate the trade with the quoter — this is a read-only call, no gas cost:
var pathKeys = V4PathEncoder.EncodeMultihopExactInPath(new List<PoolKey> { pool }, eth);
var amountIn = Web3.Convert.ToWei(0.001);
var quoteParams = new QuoteExactParams
{
Path = pathKeys,
ExactAmount = amountIn,
ExactCurrency = eth
};
var quote = await uniswap.Pricing.Quoter.QuoteExactInputQueryAsync(quoteParams);
var quoteAmount = Web3.Convert.FromWei(quote.AmountOut, 6); // USDC = 6 decimalsThe V4PathEncoder encodes the swap route. For single-hop, pass one pool key. For multi-hop (e.g., ETH→DAI→USDC), pass multiple pool keys.
Swaps go through the Universal Router. The pattern is: build actions (swap + settle input + take output), then execute:
var v4ActionBuilder = uniswap.GetUniversalRouterV4ActionsBuilder();
v4ActionBuilder.AddCommand(new SwapExactIn
{
CurrencyIn = eth,
AmountIn = amountIn,
AmountOutMinimum = quote.AmountOut * 95 / 100, // 5% slippage
Path = pathKeys.MapToActionV4()
});
v4ActionBuilder.AddCommand(new SettleAll { Currency = eth, Amount = amountIn });
v4ActionBuilder.AddCommand(new TakeAll { Currency = usdc, MinAmount = 0 });
var routerBuilder = new UniversalRouterBuilder();
routerBuilder.AddCommand(v4ActionBuilder.GetV4SwapCommand());
var executeFunction = routerBuilder.GetExecuteFunction(amountIn);
var receipt = await uniswap.UniversalRouter.ExecuteRequestAndWaitForReceiptAsync(executeFunction);The three actions form the standard swap pattern: swap exchanges tokens in the pool, settle pays the input, take collects the output. AmountOutMinimum is your slippage protection.
Nethereum provides calculators for both:
var slippage = uniswap.Pricing.SlippageCalculator;
// For exact-input swaps: minimum acceptable output
var tolerance = new BigDecimal(0.5m); // 0.5%
var minAmountOut = slippage.CalculateMinimumAmountOut(expectedAmountOut, tolerance);
// For exact-output swaps: maximum you're willing to pay
var maxAmountIn = slippage.CalculateMaximumAmountIn(expectedAmountIn, tolerance);
// Price impact classification
var impactCalc = uniswap.Pricing.PriceImpactCalculator;
var impact = impactCalc.CalculatePriceImpact(input, output, midPrice);
var level = impactCalc.ClassifyPriceImpact(impact);
// Returns: Low (<1%), Medium (1-3%), High (3-5%), Critical (>5%)
var warning = impactCalc.GetPriceImpactWarning(level);Calculate human-readable prices from the pool's raw sqrtPriceX96 value:
// Get price of token0 in terms of token1 (adjusted for decimals)
var priceToken0InToken1 = uniswap.Pricing.PriceCalculator.CalculatePriceFromSqrtPriceX96(
sqrtPriceX96, decimals0: 18, decimals1: 6);
// Inverse gives token1 price in terms of token0
var priceToken1InToken0 = priceToken0InToken1 == 0 ? 0 : 1 / priceToken0InToken1;Tick math conversions for working with price ranges:
var sqrtPriceX96 = uniswap.Math.Tick.GetSqrtRatioAtTick(tick);
var tick = uniswap.Math.Tick.GetTickAtSqrtRatio(sqrtPriceX96);Find available pools for a token pair using on-chain Initialize events:
var poolCache = uniswap.Pools.Cache;
var pools = await poolCache.FindPoolsForTokenAsync(token: usdc, fromBlockNumber: start, toBlockNumber: end);Or fetch a specific pool directly:
var pool = await poolCache.GetOrFetchPoolAsync(currency0: eth, currency1: usdc, fee: 500, tickSpacing: 10);For large trades or exotic pairs, route through intermediate tokens for better prices:
var pathFinder = uniswap.Pricing.QuotePricePathFinder;
var cachedPools = await poolCache.GetAllCachedPoolsAsync();
// Direct path only
var bestDirect = await pathFinder.FindBestDirectPathAsync(
tokenIn: eth, tokenOut: usdc,
amountIn: Web3.Convert.ToWei(1),
candidatePools: cachedPools);
// Multi-hop through intermediate tokens
var bestPath = await pathFinder.FindBestPathAsync(
tokenIn: usdc, tokenOut: weth,
amountIn: Web3.Convert.ToWei(1000, UnitConversion.EthUnit.Mwei),
intermediateTokens: new[] { dai, eth },
candidatePools: cachedPools);Before swapping ERC-20 tokens (not native ETH), ensure the router has approval:
await uniswap.Accounts.Approvals.CheckAndApproveIfNeededAsync(
tokenAddress, owner, spender, requiredAmount);
// Or check and approve separately
var status = await uniswap.Accounts.Approvals.CheckApprovalAsync(
tokenAddress, owner, spender, requiredAmount);
if (!status.IsApproved)
{
await uniswap.Accounts.Approvals.ApproveAsync(
tokenAddress, spender, AccountApprovalService.GetMaxApprovalAmount());
}Before executing a swap, verify the sender has enough tokens:
var balanceResult = await uniswap.Accounts.Balances.ValidateBalanceAsync(
tokenAddress, owner, requiredAmount);
if (!balanceResult.HasSufficientBalance)
Console.WriteLine($"Need {balanceResult.Deficit} more tokens");For Uniswap V3, swaps use the same Universal Router but with Permit2 for gasless approvals. The flow: approve Permit2 once, then sign off-chain permits per swap:
// One-time: approve Permit2 to spend your WETH
var weth9Service = web3.Eth.ERC20.GetContractService(weth9);
await weth9Service.ApproveRequestAndWaitForReceiptAsync(permit2Address, IntType.MAX_INT256_VALUE);
// Per-swap: sign a Permit2 authorization
var permit = new PermitSingle
{
Spender = universalRouterAddress,
SigDeadline = 2000000000,
Details = new PermitDetails
{
Amount = amountIn * 100000,
Expiration = 0,
Nonce = 0,
Token = weth9
}
};
var permitService = new Permit2Service(web3, permit2Address);
var signedPermit = await permitService.GetSinglePermitWithSignatureAsync(
permit, new EthECKey(privateKey));
// Build the swap via Universal Router
var planner = new UniversalRouterBuilder();
planner.AddCommand(new Permit2PermitCommand
{
Permit = signedPermit.PermitRequest,
Signature = signedPermit.GetSignatureBytes()
});
planner.AddCommand(new V3SwapExactInCommand
{
AmountIn = amountIn,
AmountOutMinimum = quote.AmountOut - 10000,
Path = path,
Recipient = account.Address,
FundsFromPermit2OrUniversalRouter = true
});
var receipt = await universalRouterService.ExecuteRequestAndWaitForReceiptAsync(
planner.GetExecuteFunction(amountIn));Uniswap reverts with custom errors that the router service can decode:
catch (SmartContractCustomErrorRevertException e)
{
var error = universalRouterService.FindCustomErrorException(e);
if (error != null) Console.WriteLine($"Uniswap error: {error.Message}");
}For full documentation, see: https://docs.nethereum.com/docs/defi/guide-uniswap-swap
© Nethereum, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in plugins/nethereum-skills/skills/uniswap-swap of Nethereum/Nethereum.
Open the folder on GitHubat commit 229f278
Uniswap Swap next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Uniswap Swap this skillNethereum/Nethereum | 2.3k | — | ~2.1k | Automated safety check: Pass | MIT | |
| Notebook To Strategytradingstrategy-ai/trade-executor | 160 | — | ~1.1k | Automated safety check: Pass | Custom licence | |
| Stock Indicators Dotnetfacioquo/stock-indicators-dotnet | 1.2k | — | ~852 | Automated safety check: Pass | Apache-2.0 | |
| Aomi Transactjeremylongshore/tons-of-skills-marketplace | 2.8k | — | ~2.3k | Automated safety check: Pass | MIT | |
| Polyclawchainstacklabs/polyclaw | 359 | 1 repos | ~2k | Automated safety check: Pass | Apache-2.0 | |
| Okx Cex Marketdex-original/okx-agent-trade-kit | 110 | 1 repos | ~2.7k | Automated safety check: Pass | MIT |
tradingstrategy-ai/trade-executor
Transfer code from a backtesting Jupyter notebook to a Trade Executor strategy module
facioquo/stock-indicators-dotnet
Calculate technical analysis indicators (EMA, RSI, MACD, ADX, Bollinger Bands, and dozens more) from OHLCV price bars, in batch or live from a market feed, in C with the FacioQuo.Stock.Indicators v3…
jeremylongshore/tons-of-skills-marketplace
Build natural-language crypto agents, web3 assistants, and trading bots that read and write EVM chain state.
chainstacklabs/polyclaw
Trade on Polymarket via split + CLOB execution. An agent skill from chainstacklabs/polyclaw.
dex-original/okx-agent-trade-kit
A skill your agent uses when the user asks for: price of any asset, ticker, order book, candles, OHLCV, funding rate, open interest, OI change scanner, market screener (top movers, high-volume…
bitget-wallet-ai-lab/bitget-wallet-skill
Interact with Bitget Wallet API for crypto market data, token info, swap quotes, RWA (real-world asset) stock trading, and security audits.
Nethereum/Nethereum
Help users batch multiple calls into a single UserOperation and sponsor gas with paymasters using Nethereum Account Abstraction.
Nethereum/Nethereum
Help users run an ERC-4337 bundler using Nethereum — set up in-process or standalone bundlers with mempool, validation, reputation, and JSON-RPC server.
Nethereum/Nethereum
Encode and decode Ethereum ABI data with Nethereum. An agent skill from Nethereum/Nethereum.
Nethereum/Nethereum
Fetch contract ABIs from Sourcify, Etherscan, and 4Byte Directory using the composite ABIInfoStorage pattern (.NET/C).
Nethereum/Nethereum
Help users implement ERC-4337 Account Abstraction with Nethereum — send UserOperations, use smart accounts, route contract calls through a bundler, enable gasless transactions, or work with AA in…
Nethereum/Nethereum
Validate and format Ethereum addresses with Nethereum. An agent skill from Nethereum/Nethereum.
Categories
Swap tokens on Uniswap V2/V3/V4 using Nethereum (.NET/C). An agent skill from Nethereum/Nethereum. Uniswap Swap is an agent skill from Nethereum/Nethereum.NET/C).
Uniswap Swap fits situations like: the user asks about token swaps; uniswap integration; slippage protection; universal Router.
Run `npx skills add Nethereum/Nethereum --skill uniswap-swap -a claude-code`. Or copy the skill folder (plugins/nethereum-skills/skills/uniswap-swap in Nethereum/Nethereum) into .claude/skills/uniswap-swap in your project. Claude Code loads it when a task matches its description.
Run `npx skills add Nethereum/Nethereum --skill uniswap-swap -a codex`. Or copy the skill folder (plugins/nethereum-skills/skills/uniswap-swap in Nethereum/Nethereum) into .agents/skills/uniswap-swap in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Nethereum/Nethereum --skill uniswap-swap -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/uniswap-swap, .gemini/skills/uniswap-swap, .github/skills/uniswap-swap and .opencode/skills/uniswap-swap in your project.
Going by SKILL.md and its folder, Uniswap Swap needs the command-line tools its instructions call (dotnet).
SKILL.md names 1 domain. As links in the text: docs.nethereum.com. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Uniswap Swap is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.1k tokens (SKILL.md is roughly 8.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Uniswap Swap: Notebook To Strategy (tradingstrategy-ai/trade-executor, 160 stars), Stock Indicators Dotnet (facioquo/stock-indicators-dotnet, 1.2k stars), Aomi Transact (jeremylongshore/tons-of-skills-marketplace, 2.8k stars) and Polyclaw (chainstacklabs/polyclaw, 359 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
Nethereum (a GitHub organization) maintains it in Nethereum/Nethereum, which has 2,260 GitHub stars. The repository holds 71 skills in this directory. The repository was last updated on October 5, 2026.
Source: Nethereum/Nethereum on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.