Agent skill

Fees Optimizations

by Superior-Trade in Superior-Trade/superior-skills

A skill your agent uses when the user asks about fees, fee optimization, slippage, maker vs taker, post-only or ALO orders, fee tiers, builder code fees, effective spread, order pricing, lowering…

MITAuto-check passedBusiness, Finance & HR

Install Fees Optimizations

skills CLI
$ npx skills add Superior-Trade/superior-skills --skill fees-optimizations -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Superior-Trade/superior-skills fees-optimizations --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Superior-Trade/superior-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/fees-optimizations .claude/skills/fees-optimizations && rm -rf skills-src

Use ~/.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/

Facts

Skill name
fees-optimizations
GitHub stars
214
Token cost
~2.9k tokens
SKILL.md length
1,222 words
Files
1
Skills in repo
31
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when the user asks about fees, fee optimization, slippage, maker vs taker, post-only or ALO orders, fee tiers, builder code fees, effective spread, order pricing, lowering…

  • Works in 3 steps: Hyperliquid exchange fees (the floor) → Builder code fee (Superior's cut) → Slippage (the variable cost)
  • The user asks about fees
  • SKILL.md covers When to use, What you're actually paying, The four knobs Freqtrade exposes and Recommended starting block…, plus 5 more sections
  • Reaches hyperliquid.gitbook.io

What it does

Fees Optimizations is an agent skill from Superior-Trade/superior-skills. Use when the user asks about fees, fee optimization, slippage, maker vs taker, post-only or ALO orders, fee tiers, builder code fees, effective spread, order pricing, lowering trading costs, or why a live Hyperliquid Freqtrade strategy underperforms its backtest. Also use proactively for high-turnover designs (5m or faster, ROI under 0.5%), where fees usually decide the outcome.

Its SKILL.md is about 2.9k 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 Trading and backtesting. It works with Hyperliquid. The repository describes itself as: Open agent skills and tool schemas for Superior Trade — build, backtest, and deploy trading strategies on Hyperliquid. The licence is MIT.

When your agent uses it

  • The user asks about fees
  • Fee optimization
  • Builder code fees
  • Effective spread

Example prompts

  • “/fees-optimizations”

Workflow steps

3 steps, taken from the step headings in SKILL.md.

  1. Hyperliquid exchange fees (the floor)
  2. Builder code fee (Superior's cut)
  3. Slippage (the variable cost)

What it can do on your machine

Read from SKILL.md and the folder at commit 9d41db5. It shows what the files ask for, not the result of running them.

  • Tool permissions

    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.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are json).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • hyperliquid.gitbook.io

    Also links to:

    • freqtrade.io

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Fees Optimizations loads about 2.9k tokens when it runs. Until then it costs about 100 tokens; SKILL.md has 1,222 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~100
When it runs · the whole SKILL.md, loaded when a task matches
~2.9k

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.

Safety

Auto-check passed

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.

SKILL.md

The full file from Superior-Trade/superior-skills at commit 9d41db5, republished under its MIT licence (© Superior-Trade). 1,222 words, ~2,905 tokens.

Download SKILL.mdSave it as .claude/skills/fees-optimizations/SKILL.md (or your agent's skills folder).
name
fees-optimizations
description
Use when the user asks about fees, fee optimization, slippage, maker vs taker, post-only or ALO orders, fee tiers, builder code fees, effective spread, order pricing, lowering trading costs, or why a live Hyperliquid Freqtrade strategy underperforms its backtest. Also use proactively for high-turnover designs (5m or faster, ROI under 0.5%), where fees usually decide the outcome.
metadata.version
0.1.0
metadata.updated
2026-05-07

Freqtrade × Hyperliquid: Fee Optimization

When to use

  • A user asks why their backtest PnL doesn't match live PnL.
  • A user designs a tight-target scalp / market-making / grid strategy and you want to flag fee-as-a-fraction-of-edge concerns before they deploy.
  • A user explicitly asks about maker vs taker, post-only, fee tiers, builder code, or slippage.
  • Any time you're about to suggest an order_types/entry_pricing/exit_pricing block, anchor it to this skill's recommendations.

What you're actually paying

Fees on a Superior Trade Hyperliquid deployment have three layers, each tunable:

1. Hyperliquid exchange fees (the floor)

Hyperliquid's perp fees as of writing (verify against https://hyperliquid.gitbook.io/hyperliquid-docs/trading/fees for current numbers):

TierMakerTaker
Default0.010% (1 bp)0.045% (4.5 bp)
Tier 2 ($5M 14d vol)0.005%0.040%
Tier 3+scales toward 0% maker / 0.030% taker

Spot is typically slightly lower; HLP/staking discounts can shave another 0.001-0.005%.

The big takeaway: maker is ~4.5× cheaper than taker. A round-trip taker trade pays ~9 bp; a round-trip maker trade pays ~2 bp. On a 0.6% scalp target, taker fees consume 15% of gross PnL before slippage.

2. Builder code fee (Superior's cut)

Every order on Superior-managed Hyperliquid deployments goes through a builder code, which adds a separate fee that goes to Superior. Default is 5 bp on volume traded, taker or maker. Verify the actual rate for the user's account in the Superior dashboard.

This fee is always paid regardless of order type. It can't be optimized away with maker/post-only — it scales with notional volume traded. The only knob is reducing turnover (fewer trades, larger size, longer holds).

3. Slippage (the variable cost)

Slippage = the difference between the price your strategy assumed and the price you actually filled at. On Hyperliquid:

  • Liquid majors (BTC, ETH, SOL): typically 0–2 bp on $10K notional with tight spread.
  • Mid-cap perps: 5-20 bp on $10K notional.
  • Thin alts / new listings: can be 50+ bp on a single market order.

Slippage is always taker-flavored for market orders and near-zero for filled limit orders. Backtest engine uses last-trade price assumption, which understates real-world slippage on illiquid pairs.

The four knobs Freqtrade exposes

Knob 1: order_types — limit vs market
json
{
  "order_types": {
    "entry": "limit",
    "exit": "limit",
    "stoploss": "market",
    "stoploss_on_exchange": false
  }
}
SettingEffectWhen to use
entry: "limit"Posts a limit at the bid (long) / ask (short). Maker if it sits, taker if it crosses.Default. Pairs with entry_pricing.price_side: "same" to maximize maker fills.
entry: "market"Crosses immediately at best opposing quote. Always taker.Only when entry timing dominates fee cost (e.g. funding-rate exit window closing).
stoploss: "market"Stops fire as market orders.Always. A limit stop in a fast move never fills.
stoploss: "limit"Stops fire as limit at stop price.Never in production — gets bag-held in real moves.
Knob 2: entry_pricing / exit_pricing — where on the book
json
{
  "entry_pricing": {
    "price_side": "same",
    "use_order_book": true,
    "order_book_top": 1,
    "price_last_balance": 0.0,
    "check_depth_of_market": { "enabled": false }
  },
  "exit_pricing": {
    "price_side": "same",
    "use_order_book": true,
    "order_book_top": 1
  }
}
FieldMaker-friendlyTaker-friendly
price_side"same" (long buys at bid, short sells at ask)"other" (cross the spread)
use_order_booktrue + order_book_top: 1 (joins best level)false (uses last trade — random)
price_last_balance0.0 (pure book level)1.0 (interpolates toward last trade)

Default for cost-sensitive strategies: price_side: "same", use_order_book: true, order_book_top: 1, price_last_balance: 0.0. This posts at the best bid (long) / best ask (short), maker-only unless the market crosses you.

Knob 3: unfilledtimeout — how patient is the maker?
json
{
  "unfilledtimeout": {
    "entry": 10,
    "exit": 10,
    "exit_timeout_count": 0,
    "unit": "minutes"
  }
}

A limit order sitting on the book is great until the market walks away. unfilledtimeout is when Freqtrade gives up and re-prices (or cancels). For a 5m strategy, entry: 5 minutes is sane — give the limit one bar to fill, then chase. For a daily DCA, entry: 60+ is fine.

exit_timeout_count: 3 means: after 3 timeout cycles on the exit, fall back to a market order. Good for ensuring the exit eventually happens.

Knob 4: stake_amount — fewer, bigger trades

The builder code fee scales with notional volume. Two trades at $1000 each pay the same builder fee as four trades at $500 each. If your strategy works at higher position size, prefer fewer larger trades to reduce per-trade fixed cost.

This isn't a Freqtrade knob per se, but an engineering choice: lower-frequency strategies amortize per-trade fees better.

For any strategy where fees matter (scalping, grid, frequent entries), start here:

json
{
  "order_types": {
    "entry": "limit",
    "exit": "limit",
    "stoploss": "market",
    "stoploss_on_exchange": false,
    "trailing_stop_loss": "market"
  },
  "entry_pricing": {
    "price_side": "same",
    "use_order_book": true,
    "order_book_top": 1,
    "price_last_balance": 0.0
  },
  "exit_pricing": {
    "price_side": "same",
    "use_order_book": true,
    "order_book_top": 1,
    "price_last_balance": 0.0
  },
  "unfilledtimeout": {
    "entry": 10,
    "exit": 10,
    "exit_timeout_count": 3,
    "unit": "minutes"
  }
}

For a "fill at any cost" deployment (e.g. funding harvest where missing the entry costs more than the spread), use price_side: "other" and entry: "market".

Show full SKILL.md (522 more words)Show less

Fee budget rule of thumb

Before recommending any tight-target strategy, compute the edge-to-fee ratio:

edge_to_fee = (avg_per_trade_pnl_bp) / (round_trip_fee_bp + slippage_bp)

Where:

  • round_trip_fee_bp ≈ 9 bp (taker, both sides) or 2 bp (maker, both sides) on top of HL native fees
  • Plus builder code fee × 2 (entry + exit) — typically 10 bp round trip
  • Plus slippage estimate (1 bp majors, 5-20 bp mid-cap)

So realistic round-trip cost on majors ≈ 12-15 bp (taker) or 5-8 bp (maker).

Avg per-trade PnLRound-trip costEdge-to-feeVerdict
60 bp (0.6% target)13 bp taker4.6×OK if ≥ 50% hit rate
30 bp13 bp taker2.3×Marginal — needs >55% hit rate
15 bp (tight scalp)13 bp taker1.15×Too thin — fees eat edge unless maker-only
15 bp6 bp maker2.5×Acceptable if you can stay maker-only

The Scalp template's 0.6% target / 0.4% stop with default taker pricing has edge_to_fee ≈ 4.6× on win, but the 33% win rate from the reference backtest means it's a net loser. Forcing maker-only would help significantly.

Common pitfalls

  1. Defaulting to entry: "market" because limits "might not fill". A maker limit that fills 70% of the time at 1 bp beats a market that fills 100% of the time at 5 bp on most strategies. Pair limit entries with a sane unfilledtimeout and accept some signals will be skipped.
  2. Backtest assumes price_side: "same" will always fill. The Freqtrade backtester treats limit orders as filled at the bar's price — it does NOT simulate queue priority or partial fills. Live behavior on illiquid pairs is worse. Always slippage-stress your backtest by re-running with entry: "market" to see worst-case PnL.
  3. Forgetting stoploss_on_exchange: false is the default and correct. Setting true puts the stop on the exchange (avoids gap risk) BUT only fires on next candle close on Freqtrade's polling cadence. The agent wallet model on Superior already handles this; leave it false.
  4. Stacking trailing_stop with exit_pricing.price_side: "same". The trail emits a sell signal; combined with same-side maker pricing, the limit sits on the bid waiting for a buyer that may never come. For trailing exits, force exit_pricing.price_side: "other" OR rely on stoploss: "market".
  5. Ignoring builder code fee in projections. A "0% fee crypto exchange" Twitter post is useless if Superior's builder code is 5 bp. The 5 bp is on the user's gross volume, not net PnL.

When you don't optimize fees

For low-turnover strategies (DCA weekly, funding harvest with avg holding > 8h), fee optimization is secondary to correctness. A 10 bp round-trip cost amortized over a week-long hold is a 0.014% APR drag — invisible. Spend the optimization budget on entry quality instead.

Source-of-truth checks

When the user reports unexpected fee outcomes, verify in this order:

  1. Hyperliquid fee tier: https://app.hyperliquid.xyz/portfolio shows current 14-day volume tier.
  2. Builder code rate: Superior dashboard, deployment detail page, fees section.
  3. Slippage on filled orders: Compare order_filled_avg_price to bar close in the Freqtrade trade log. Persistent > 5 bp slippage on majors means the order_book pricing is wrong.
  4. Maker vs taker ratio: Hyperliquid trade history shows maker: true/false per fill. Aim for > 70% maker in production for cost-sensitive strategies.

Sources

© Superior-Trade, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/fees-optimizations of Superior-Trade/superior-skills.

Open the folder on GitHubat commit 9d41db5

Compare with similar skills

Fees Optimizations 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.

Fees Optimizations compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Fees Optimizations this skillSuperior-Trade/superior-skills214—~2.9kAutomated safety check: PassMIT
Fintoolsecond-state/fintool3161 repos~5.9kAutomated safety check: PassNone
Moss Trade Bot Factorymoss-site/moss-trade-bot-skills387—~2.2kAutomated safety check: PassMIT-0
Opportunity RadarNunchi-trade/agent-cli521—~1.2kAutomated safety check: PassMIT
Nansen Tradingnansen-ai/nansen-cli139—~3.3kAutomated safety check: NotesMIT
Hyperliquidalsk1992/CloddsBot2.9k—~1.4kAutomated safety check: PassMIT

Similar skills

  • Fintool

    second-state/fintool

    Financial trading CLIs — spot and perp trading on Hyperliquid, Binance, Coinbase, OKX.

    316 GitHub starsUsed in 1 repo~5.9k tokens
    Business, Finance & HRAuto-check passed
  • Moss Trade Bot Factory

    moss-site/moss-trade-bot-skills

    用户用自然语言描述币种、回测时间区间和策略风格时,自动创建加密货币交易 Bot,读取内置 Hyperliquid CSV 覆盖并运行本地回测/进化;若币种、时间区间或策略风格缺失,则主动询问缺失项并展示 CSV 解析出的可用回测区间。也可在回测后上传平台 verify 或创建模拟实盘 Bot。适用于创建bot、交易策略、回测、backtest、evolve、upload verify、live…

    387 GitHub stars~2.2k tokensUpdated 29 days ago
    Business, Finance & HRAuto-check passed
  • Opportunity Radar

    Nunchi-trade/agent-cli

    Screens all Hyperliquid perps and surfaces top trading setups

    521 GitHub stars~1.2k tokensUpdated 3 mo ago
    Business, Finance & HRAuto-check passed
  • Nansen Trading

    nansen-ai/nansen-cli

    Execute DEX swaps on Solana or Base (including cross-chain bridges) and Hyperliquid perpetual trades.

    139 GitHub stars~3.3k tokensUpdated today
    Business, Finance & HRAuto-check: notes
  • Hyperliquid

    alsk1992/CloddsBot

    Hyperliquid L1 perps DEX (69% market share). An agent skill from alsk1992/CloddsBot.

    2.9k GitHub stars~1.4k tokensUpdated 5 days ago
    Business, Finance & HRAuto-check passed
  • Trading Futures

    alsk1992/CloddsBot

    Trade perpetual futures on Binance, Bybit, Hyperliquid, MEXC with up to 200x leverage

    2.9k GitHub stars~5.6k tokensUpdated 5 days ago
    Business, Finance & HRAuto-check passed

More from Superior-Trade/superior-skills

All 31 skills in this repo
  • Deposit Qr

    Superior-Trade/superior-skills

    A skill your agent uses when a user needs a QR code or wallet payment URI to fund a Superior-managed EVM wallet on a specific chain before using Lighter, Polymarket, Hyperliquid, or other Superior…

    214 GitHub starsUsed in 1 repo~1.1k tokens
    Auto-check passed
  • Superior Trade Auth

    Superior-Trade/superior-skills

    A skill your agent uses when an agent needs to register a Superior Trade account, verify an email OTP, configure x-api-key authentication, or recover from missing or invalid credentials before using…

    214 GitHub stars~950 tokensUpdated 28 days ago
    Auto-check passed
  • Aerodrome

    Superior-Trade/superior-skills

    A skill your agent uses when creating, validating, backtesting, deploying, sizing, or troubleshooting Aerodrome/Base spot trading strategies through the Superior Trade API, especially Freqtrade…

    214 GitHub starsUsed in 1 repo~2.3k tokens
    Auto-check passed
  • External Deposit

    Superior-Trade/superior-skills

    A skill your agent uses when a user wants to fund or bridge from an external wallet through a third-party UI such as Relay, especially when asking for MetaMask Mobile QR codes, bridge links…

    214 GitHub stars~1.7k tokensUpdated 28 days ago
    Auto-check passed
  • Polymarket

    Superior-Trade/superior-skills

    A skill your agent uses when the user wants to trade, research, or backtest Polymarket prediction markets through Superior Trade — finding markets by slug or event URL, placing a single immediate…

    214 GitHub starsUsed in 1 repo~4.2k tokens
    Auto-check passed
  • Backtesting

    Superior-Trade/superior-skills

    A skill your agent uses when running, interpreting, or designing backtests on Superior Trade — anything about backtest windows, trade-count thresholds, exit-reason mix, parameter sweeps…

    214 GitHub starsUsed in 1 repo~2.9k tokens
    Auto-check passed

Works with

Questions about Fees Optimizations

What does Fees Optimizations do?

A skill your agent uses when the user asks about fees, fee optimization, slippage, maker vs taker, post-only or ALO orders, fee tiers, builder code fees, effective spread, order pricing, lowering…. Fees Optimizations is an agent skill from Superior-Trade/superior-skills. Use when the user asks about fees, fee optimization, slippage, maker vs taker, post-only or ALO orders, fee tiers, builder code fees, effective spread, order pricing, lowering trading costs, or why a live Hyperliquid Freqtrade strategy underperforms its backtest.

When should I use Fees Optimizations?

Fees Optimizations fits situations like: the user asks about fees; fee optimization; builder code fees; effective spread.

How do I install Fees Optimizations in Claude Code?

Run `npx skills add Superior-Trade/superior-skills --skill fees-optimizations -a claude-code`. Or copy the skill folder (skills/fees-optimizations in Superior-Trade/superior-skills) into .claude/skills/fees-optimizations in your project. Claude Code loads it when a task matches its description.

How do I install Fees Optimizations in Codex?

Run `npx skills add Superior-Trade/superior-skills --skill fees-optimizations -a codex`. Or copy the skill folder (skills/fees-optimizations in Superior-Trade/superior-skills) into .agents/skills/fees-optimizations in your project. Codex loads it when a task matches its description.

Can I use Fees Optimizations in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Superior-Trade/superior-skills --skill fees-optimizations -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/fees-optimizations, .gemini/skills/fees-optimizations, .github/skills/fees-optimizations and .opencode/skills/fees-optimizations in your project.

What does Fees Optimizations need to run?

SKILL.md names no scripts, command-line tools or credentials: Fees Optimizations is instructions for the agent only.

Does Fees Optimizations access the network?

SKILL.md names 2 domains. In commands or code: hyperliquid.gitbook.io; the agent is likely to contact it when it follows the instructions. As links in the text: freqtrade.io. This is read from the text; nothing was executed.

Is Fees Optimizations safe to install?

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.

What licence does Fees Optimizations use?

Fees Optimizations is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Fees Optimizations use?

About 2.9k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Fees Optimizations?

Skills that share tags, products or a category with Fees Optimizations: Fintool (second-state/fintool, 316 stars), Moss Trade Bot Factory (moss-site/moss-trade-bot-skills, 387 stars), Opportunity Radar (Nunchi-trade/agent-cli, 521 stars) and Nansen Trading (nansen-ai/nansen-cli, 139 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Fees Optimizations?

Superior-Trade (a GitHub organization) maintains it in Superior-Trade/superior-skills, which has 214 GitHub stars. The repository holds 31 skills in this directory. The repository was last updated on September 10, 2026.

Source: Superior-Trade/superior-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.