Senpi Why
Senpi-ai/senpi-skills
Answer "what makes Senpi different?" / "why Senpi?" / "Senpi vs other trading apps, bots or AI chatbots?" — the positioning answer, led by value, not a feature dump.
A skill your agent uses when the user asks for spot-perp basis trade, basis arbitrage, cash-and-carry, perp discount, or any setup that reads the spot–perp basis as a positioning signal.
$ npx skills add Superior-Trade/superior-skills --skill basis-arb -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install Superior-Trade/superior-skills basis-arb --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/Superior-Trade/superior-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/basis-arb .claude/skills/basis-arb && 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 "basis-arb" agent skill from https://github.com/Superior-Trade/superior-skills/tree/main/skills/basis-arb into .claude/skills/basis-arb/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "basis-arb", 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/Superior-Trade/superior-skills/tree/main/skills/basis-arbType 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 Superior-Trade/superior-skills --skill basis-arb -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install Superior-Trade/superior-skills basis-arb --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Superior-Trade/superior-skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/basis-arb .agents/skills/basis-arb && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "basis-arb" agent skill from https://github.com/Superior-Trade/superior-skills/tree/main/skills/basis-arb into .agents/skills/basis-arb/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "basis-arb", 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 Superior-Trade/superior-skills --skill basis-arb -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install Superior-Trade/superior-skills basis-arb --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Superior-Trade/superior-skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/basis-arb .cursor/skills/basis-arb && 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 "basis-arb" agent skill from https://github.com/Superior-Trade/superior-skills/tree/main/skills/basis-arb into .cursor/skills/basis-arb/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "basis-arb", 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/Superior-Trade/superior-skills.git --path skills/basis-arb--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 Superior-Trade/superior-skills --skill basis-arb -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install Superior-Trade/superior-skills basis-arb --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Superior-Trade/superior-skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/basis-arb .gemini/skills/basis-arb && 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 "basis-arb" agent skill from https://github.com/Superior-Trade/superior-skills/tree/main/skills/basis-arb into .gemini/skills/basis-arb/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "basis-arb", 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 Superior-Trade/superior-skills basis-arbInstalls 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 Superior-Trade/superior-skills --skill basis-arb -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/Superior-Trade/superior-skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/basis-arb .github/skills/basis-arb && 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 "basis-arb" agent skill from https://github.com/Superior-Trade/superior-skills/tree/main/skills/basis-arb into .github/skills/basis-arb/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "basis-arb", 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 Superior-Trade/superior-skills --skill basis-arb -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install Superior-Trade/superior-skills basis-arb --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Superior-Trade/superior-skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/basis-arb .opencode/skills/basis-arb && 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 "basis-arb" agent skill from https://github.com/Superior-Trade/superior-skills/tree/main/skills/basis-arb into .opencode/skills/basis-arb/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "basis-arb", 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.
basis-arbA skill your agent uses when the user asks for spot-perp basis trade, basis arbitrage, cash-and-carry, perp discount, or any setup that reads the spot–perp basis as a positioning signal.
Basis Arb is an agent skill from Superior-Trade/superior-skills. Use when the user asks for spot-perp basis trade, basis arbitrage, cash-and-carry, perp discount, or any setup that reads the spot–perp basis as a positioning signal. Long-perp leg only — pure two-leg basis arb requires a paired spot short (or long) which Freqtrade can't run cleanly. The strategy below captures the directional read, not the hedged carry.
Its SKILL.md is about 2.8k 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 and Positioning and messaging. 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.
2 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 9d41db5. 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.
No scripts in the folder and no shell commands in SKILL.md (its code samples are python and json).
From the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
github.comfreqtrade.ioFrom 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.
Basis Arb loads about 2.8k tokens when it runs. Until then it costs about 92 tokens; SKILL.md has 713 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 Superior-Trade/superior-skills at commit 9d41db5, republished under its MIT licence (© Superior-Trade). 713 words, ~2,797 tokens.
.claude/skills/basis-arb/SKILL.md (or your agent's skills folder).True basis arbitrage is a two-leg trade:
You earn the basis as the legs converge. Freqtrade is a single-leg engine — it can't run paired hedged trades on the same ticker. The strategy below captures the directional signal that "basis flipping negative + funding negative = bullish positioning shift" and goes long the perp accordingly. It's a momentum read on positioning, not a hedged arb.
If you want the actual hedged version, run an external system (or a custom Hyperliquid-only multi-leg runtime). Don't deploy this template thinking it's market-neutral.
| Window | BTC/USDC:USDC 1h, 2026-01-01 → 2026-05-01 |
|---|---|
| Trades | 0 (no spot leg available in the engine) |
| Backtest ID | 01kr42hegps9w20njsty2cqb41 |
The Superior Trade backtest engine doesn't currently expose Hyperliquid spot OHLCV alongside perp pairs via Freqtrade's informative_pairs mechanism, so the spot_close column is never populated and the entry filter never fires. The strategy code is structurally sound — it runs cleanly to completion with 0 trades — but this template can't be validated end-to-end on the current backtest engine. Two paths:
basisHistory or a simple notebook).informative_pairs spot fetch with a CoinGlass /api/futures/basis/history call from a side-channel cache. Out of scope for this template; would be a Phase 2 backend change.The strategy is shipped as a directional blueprint, not a live-validated runtime. Treat it as a teachable template for how to wire spot-perp basis into a Freqtrade strategy, rather than an off-the-shelf deployment.
A user asks for:
This template assumes Hyperliquid has both the spot and perp pair for the asset (BTC, ETH, SOL — the few HL has spot books for). For perp-only assets, this strategy can't compute basis and won't fire.
Two dp.get_pair_dataframe calls:
strategy-funding-rate-arbitrage)informative_pairs() so we can compute basisBasis = (perp_mark - spot_mid) / spot_mid. Annualised by funding period.
from freqtrade.strategy import IStrategy, informative
from datetime import datetime
import pandas as pd
import talib.abstract as ta
def perp_to_spot(pair: str) -> str:
"""`BTC/USDC:USDC` → `BTC/USDC`. HL spot lives at the un-suffixed pair."""
return pair.split(":")[0] if ":" in pair else pair
class BasisFlippingStrategy(IStrategy):
minimal_roi = {"0": 100.0}
stoploss = -0.04
trailing_stop = False
timeframe = "1h"
process_only_new_candles = True
startup_candle_count = 30
can_short = False
def informative_pairs(self):
# Tell Freqtrade we need spot-side OHLCV for every perp in the
# whitelist. The base pair list is set by the user; we mirror
# each entry to its spot equivalent.
pairs = self.dp.current_whitelist()
return [(perp_to_spot(p), self.timeframe) for p in pairs if ":" in p]
def populate_indicators(self, dataframe: pd.DataFrame, metadata: dict) -> pd.DataFrame:
perp_pair = metadata["pair"]
spot_pair = perp_to_spot(perp_pair)
# Funding rate via the dedicated candle type.
try:
funding = self.dp.get_pair_dataframe(
pair=perp_pair,
timeframe="1h",
candle_type="funding_rate",
)
except Exception:
funding = pd.DataFrame()
if not funding.empty and "open" in funding.columns:
f = funding[["date", "open"]].rename(columns={"open": "funding_rate"}).copy()
dataframe = dataframe.merge(f, on="date", how="left")
dataframe["funding_rate"] = dataframe["funding_rate"].ffill().fillna(0.0)
dataframe["funding_apr"] = dataframe["funding_rate"] * 24 * 365
else:
dataframe["funding_rate"] = 0.0
dataframe["funding_apr"] = 0.0
# Spot OHLCV — declared via `informative_pairs`.
try:
spot = self.dp.get_pair_dataframe(pair=spot_pair, timeframe=self.timeframe)
except Exception:
spot = pd.DataFrame()
# Initialise required columns up front so the entry guard can
# read them even when the spot leg isn't available on this
# dataset. Hyperliquid's backtest cache doesn't always expose
# the matching spot pair via informative_pairs — without these
# default columns the strategy crashes with KeyError on the
# first candle.
dataframe["spot_close"] = float("nan")
dataframe["basis"] = 0.0
dataframe["basis_apr"] = 0.0
if not spot.empty and "close" in spot.columns:
s = spot[["date", "close"]].rename(columns={"close": "spot_close"}).copy()
dataframe = dataframe.drop(columns=["spot_close"])
dataframe = dataframe.merge(s, on="date", how="left")
dataframe["spot_close"] = dataframe["spot_close"].ffill()
# Instantaneous basis (perp - spot) / spot. Annualise as
# basis_apr ≈ basis * (8h_settlement_periods/year) ≈ basis * 1095
# (3 settlements/day × 365). HL's actual basis convergence
# path is messier but this is the standard back-of-envelope.
dataframe["basis"] = (
dataframe["close"] - dataframe["spot_close"]
) / dataframe["spot_close"]
dataframe["basis_apr"] = dataframe["basis"] * 1095
dataframe["atr_24"] = ta.ATR(dataframe, timeperiod=24)
return dataframe
def populate_entry_trend(self, dataframe: pd.DataFrame, metadata: dict) -> pd.DataFrame:
# Long perp when:
# 1. Basis flipped negative (perp at discount to spot)
# 2. Funding is also negative (shorts paying — same crowd)
# 3. Spot isn't crashing (close > 24h SMA proxy)
# Only fire when the spot leg is actually available — without
# spot data the basis is meaningless and we'd be entering on a
# zero-filled signal.
sma_spot = dataframe["spot_close"].rolling(24).mean()
spot_available = dataframe["spot_close"].notna()
dataframe.loc[
spot_available
& (dataframe["basis_apr"] < -0.05)
& (dataframe["funding_apr"] < 0.0)
& (dataframe["spot_close"] > sma_spot)
& (dataframe["volume"] > 0),
"enter_long",
] = 1
return dataframe
def populate_exit_trend(self, dataframe: pd.DataFrame, metadata: dict) -> pd.DataFrame:
# Exit when basis converges back to neutral (≥ 0) — the structural
# pressure has been worked off.
dataframe.loc[(dataframe["basis_apr"] >= 0.0), "exit_long"] = 1
return dataframe
def custom_exit(self, pair: str, trade, current_time: datetime,
current_rate: float, current_profit: float, **kwargs):
# Basis convergence is slow but persistent. 48h is the patience floor.
elapsed_h = (current_time - trade.open_date_utc).total_seconds() / 3600.0
if elapsed_h >= 48:
return "timeout_48h"
return None{
"exchange": { "name": "hyperliquid", "pair_whitelist": ["BTC/USDC:USDC"] },
"stake_currency": "USDC",
"stake_amount": 100,
"timeframe": "1h",
"max_open_trades": 1,
"stoploss": -0.04,
"minimal_roi": { "0": 100.0 },
"trading_mode": "futures",
"margin_mode": "cross",
"entry_pricing": { "price_side": "same" },
"exit_pricing": { "price_side": "same" },
"pairlists": [{ "method": "StaticPairList" }]
}Pair must have a corresponding HL spot pair. Today that's effectively BTC, ETH, SOL, HYPE — the few assets with both perp and spot books on Hyperliquid. Other perps will return zero basis and never fire.
| Knob | Effect |
|---|---|
basis_apr < -0.05 | Stricter (-0.10) → only deeper discounts. Looser (-0.02) → more entries, weaker signal. |
funding_apr < 0.0 | The "shorts paying" confirmation. Drop this to fire on basis alone (faster, noisier). |
spot_close > sma_24 | The "spot isn't crashing" filter. Without it, the strategy buys into spot drawdowns where the basis is negative because everything's down. |
timeout_48h | Basis trades take days, not hours. Don't tighten below 24h. |
can_short = True and an isolated-margin perp config.informative_pairs declared the spot leg.-0.04 is the floor; tighter and ATR noise stops you out before the trade works.informative_pairs — https://www.freqtrade.io/en/stable/strategy-customization/#additional-data-informative_pairsfunding-rate-arbitrage skill© 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
Just SKILL.md in skills/basis-arb of Superior-Trade/superior-skills.
Open the folder on GitHubat commit 9d41db5
Basis Arb 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 |
|---|---|---|---|---|---|---|
| Basis Arb this skillSuperior-Trade/superior-skills | 215 | — | ~2.8k | Automated safety check: Pass | MIT | |
| Senpi WhySenpi-ai/senpi-skills | 134 | — | ~2.5k | Automated safety check: Pass | Apache-2.0 | |
| Macro Regime Detectortradermonty/claude-trading-skills | 3k | 1 repos | ~1.2k | Automated safety check: Pass | MIT | |
| Moonpay Discover Tokensmoonpay/skills | 113 | — | ~624 | Automated safety check: Pass | MIT | |
| Breadth Chart Analystnicepkg/ai-workflow | 285 | 1 repos | ~6k | Automated safety check: Pass | MIT | |
| Jae Literature Positioningfranklee16/academic-research-skills | 223 | 1 repos | ~993 | Automated safety check: Pass | None |
Senpi-ai/senpi-skills
Answer "what makes Senpi different?" / "why Senpi?" / "Senpi vs other trading apps, bots or AI chatbots?" — the positioning answer, led by value, not a feature dump.
tradermonty/claude-trading-skills
Detect structural macro regime transitions (1-2 year horizon) using cross-asset ratio analysis.
moonpay/skills
Search for tokens, check prices, get trading briefs, and evaluate risk.
nicepkg/ai-workflow
This skill should be used when analyzing market breadth charts, specifically the S&P 500 Breadth Index (200-Day MA based) and the US Stock Market Uptrend Stock Ratio charts.
franklee16/academic-research-skills
A skill your agent uses when positioning a Journal of Accounting and Economics (JAE) manuscript within the positive-accounting and economics literatures — joining the right conversation…
franklee16/academic-research-skills
A skill your agent uses when positioning a Journal of Accounting Research (JAR) manuscript within the accounting literature — stating the conversation you join, the marginal contribution over prior…
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…
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…
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…
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…
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…
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…
Categories
A skill your agent uses when the user asks for spot-perp basis trade, basis arbitrage, cash-and-carry, perp discount, or any setup that reads the spot–perp basis as a positioning signal. Basis Arb is an agent skill from Superior-Trade/superior-skills. Use when the user asks for spot-perp basis trade, basis arbitrage, cash-and-carry, perp discount, or any setup that reads the spot–perp basis as a positioning signal.
Basis Arb fits situations like: the user asks for spot-perp basis trade; basis arbitrage; any setup that reads the spot–perp basis as a positioning signal.
Run `npx skills add Superior-Trade/superior-skills --skill basis-arb -a claude-code`. Or copy the skill folder (skills/basis-arb in Superior-Trade/superior-skills) into .claude/skills/basis-arb in your project. Claude Code loads it when a task matches its description.
Run `npx skills add Superior-Trade/superior-skills --skill basis-arb -a codex`. Or copy the skill folder (skills/basis-arb in Superior-Trade/superior-skills) into .agents/skills/basis-arb 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 Superior-Trade/superior-skills --skill basis-arb -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/basis-arb, .gemini/skills/basis-arb, .github/skills/basis-arb and .opencode/skills/basis-arb in your project.
SKILL.md names no scripts, command-line tools or credentials: Basis Arb is instructions for the agent only. Our summary lists: Python 3.
SKILL.md names 2 domains. As links in the text: github.com and freqtrade.io. 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.
Basis Arb 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.8k tokens (SKILL.md is roughly 11k 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 Basis Arb: Senpi Why (Senpi-ai/senpi-skills, 134 stars), Macro Regime Detector (tradermonty/claude-trading-skills, 3k stars), Moonpay Discover Tokens (moonpay/skills, 113 stars) and Breadth Chart Analyst (nicepkg/ai-workflow, 285 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
Superior-Trade (a GitHub organization) maintains it in Superior-Trade/superior-skills, which has 215 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.