1826/woofi-swap-optimizer/SKILL.md
Real-time WOOFi sPMM quote scanner + multi-aggregator comparison that ALWAYS tries WOOFi first for ultra-low slippage. Returns clean recommendation + simulation. Powered by WOO ecosystem APIs.
npx skillsauth add starchild-ai-agent/community-skills @1826/woofi-swap-optimizerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Real-time WOOFi sPMM quote scanner + multi-aggregator comparison that ALWAYS tries WOOFi first for ultra-low slippage. Finds the absolute best swap route factoring gas, fees, and cross-chain options.
| Parameter | Description | Default |
|---|---|---|
| from_token | Symbol or contract address | required |
| to_token | Symbol or contract address | required |
| amount | Human-readable or raw | required |
| chain | arbitrum, base, ethereum, bsc, polygon, optimism | user's connected chain |
| max_slippage | User-specified tolerance | 1.0% |
Call wallet_balance(chain, asset=from_token).
WOOFi sPMM (PRIMARY — always call first):
GET https://api.woofi.com/v3/{chain_id}/quote
?fromToken={from_addr}&toToken={to_addr}&fromAmount={raw_amount}
Chain IDs: arbitrum=42161, base=8453, ethereum=1, bsc=56, polygon=137, optimism=10
Fee check: GET https://api.woofi.com/v3/{chain_id}/fee?fromToken=...&toToken=...
Comparison aggregators (parallel calls):
| Aggregator | Endpoint |
|---|---|
| KyberSwap | https://aggregator-api.kyberswap.com/{chain}/api/v1/routes |
| Paraswap | https://apiv5.paraswap.io/prices?srcToken=... |
| 0x Protocol | https://api.0x.org/swap/v1/quote |
| 1inch | https://api.1inch.io/v5.0/{chain_id}/quote |
For each route: net_usd = (out_amount × token_price_usd) - gas_cost_usd - protocol_fee_usd
Gas: fetch current base fee → estimate units (WOOFi ~200k, KyberSwap ~600k, Paraswap ~650k, 0x ~450k) → gas_usd = units × base_fee_gwei × 1e-9 × eth_price
WOOFi wins unless another route gives ≥ 0.3% better net USD AND lower or equal total cost.
If WOOFi unavailable → state: "⚠️ WOOFi temporarily unavailable – using best alternative. Consider retrying on WOOFi for this pair."
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔄 SWAP OPTIMIZATION REPORT
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📥 Swap: [amount] [from] → [to] | 🔗 Chain: [chain]
⏱ Analyzed: [UTC timestamp] 💲 [to_token] spot: $[price]
🏆 BEST ROUTE: [name] | Confidence: [bar] [%]
─────────────────────────────────────────────
🟢 WOOFi ADVANTAGE
─────────────────────────────────────────────
[If WOOFi wins]: WOOFi sPMM delivers [X]% less slippage.
Zero price impact on market-maker inventory model.
Savings vs next-best: $[amount]
[If WOOFi unavailable]:
⚠️ WOOFi temporarily unavailable (503). Best alternative used.
─────────────────────────────────────────────
📊 ROUTE COMPARISON
─────────────────────────────────────────────
Route │ Out │ Gas USD │ Slippage │ Net USD │ vs Best
─────────────┼────────────┼─────────┼──────────┼─────────┼─────────
[winner ✅] │ [amount] │ $[x] │ [x]% │ $[x] │ BEST
[others] │ ... │ ... │ ... │ ... │ −$[x]
─────────────────────────────────────────────
💡 PRICE IMPACT SUMMARY
─────────────────────────────────────────────
Market price: 1 [from] = [rate] [to] ($[price]/[to])
Best route rate: 1 [from] = [rate] [to] ($[implied]/[to])
[Explain positive/negative slippage clearly]
─────────────────────────────────────────────
⚙️ EXECUTION DETAILS ([best route])
─────────────────────────────────────────────
Protocol fee: $[fee] | Gas: ~[units] @ [gwei] gwei = $[cost]
Total cost: $[total] | Net received: [amount] [token] ≈ $[usd]
⚠️ WARNINGS: [low liquidity / slippage / unverified token if any]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Always end with:
Ready to execute this swap on [best route]? Say YES + any adjustments and I'll prepare the transaction.
| Rule | Detail | |---|---| | 🔒 No auto-execution | NEVER send tx without explicit "YES" | | ⛽ Full disclosure | Always show gas + fee breakdown before confirmation | | 🚨 Slippage guard | >1.5% effective slippage → warn loudly, suggest splitting | | 💧 Liquidity guard | Pool liquidity <$50k → warn, suggest smaller size | | 🪙 Token flag | Unverified or <30d old token → flag explicitly | | 📓 Journal | Log every run for the trading journal skill |
User: Optimize swap of 100 USDC to ETH on Base
Output:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔄 SWAP OPTIMIZATION REPORT
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📥 Swap: 100 USDC → ETH | 🔗 Chain: Base
⏱ 2026-03-19 07:24 UTC | 💲 ETH: $2,166.18
🏆 BEST ROUTE: WOOFi sPMM | Confidence: ██████████ 95%
🟢 WOOFi ADVANTAGE
0.00% price impact (sPMM inventory model, no AMM curve degradation)
Savings vs next-best (KyberSwap): +$0.22
📊 ROUTE COMPARISON
Route │ ETH Out │ Gas USD │ Slippage │ Net USD │ vs Best
──────────────┼────────────┼─────────┼──────────┼─────────┼─────────
✅ WOOFi sPMM │ 0.046425 │ $0.0031 │ 0.00% │ $100.83 │ BEST
KyberSwap │ 0.046377 │ $0.0064 │ −0.46% │ $100.61 │ −$0.22
Paraswap │ 0.046353 │ $0.0031 │ 0.00% │ $100.41 │ −$0.42
0x Protocol│ 0.046310 │ $0.0028 │ +0.09% │ $100.28 │ −$0.55
💡 Market: 1 USDC = 0.00046164 ETH | WOOFi: 0.00046425 ETH
✅ Positive slippage: WOOFi fills against reserves at better than market.
⚙️ Protocol fee: $0.10 | Gas: ~200k @ 0.0054 gwei = $0.0031
Net received: 0.046425 ETH ≈ $100.83
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Ready to execute on WOOFi sPMM? Say YES + any adjustments!
| Version | Date | Changes | |---|---|---| | 1.1.0 | 2026-03-19 | WOOFi-first bias, retry logic on 503, WOOFi Advantage box, ≥0.3% ranking threshold, graceful fallback messaging, StarchildContest tag | | 1.0.0 | 2026-03-19 | Initial release |
tools
TQX (tqx.trade) HK/US stock quant workflow via tqx-cli: cross-sectional factor analysis, event-driven strategy backtests on the panda_backtest engine, and agent-driven automated paper trading. Use when the user wants to run factor IC/IR analysis, backtest a Python trading strategy on Hong Kong or US stocks, or set up agent-automated trading (e.g. "backtest a moving-average strategy on AAPL", "analyze a momentum factor on HK stocks", "let the agent trade my paper account").
tools
中学物理实验教学参赛方案套件。包含四个完整实验(单摆测g、声悬浮测声速、向心力定量演示仪、电磁阻尼定量研究),每套含固件源码、3D打印图纸、教学PPT、教学文稿、采购清单、调试手册、视频分镜脚本、模拟器。Use when a teacher/student needs a complete, classroom-ready physics experiment package for competition or teaching.
development
End-to-end blog management for AI agents. Write, import, build, preview, and publish articles using the blog template. Covers draft workflow, article import, SEO, OG images, and deployment.
development
ESP8266/ESP32 + 磁簧开关/霍尔传感器 单摆测重力加速度实验套件。 硬件搭建→固件烧录→数据采集→Web仪表盘→g值计算→教学文档,一站式完成。 Use when the user wants to build a pendulum g-measurement experiment, measure gravity with a micro-controller, or needs a complete physics experiment package with hardware + firmware + dashboard + teaching materials.