diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index 24a04f1..84fb5f9 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -154,6 +154,17 @@ "skills": [ "./skills/nansen-dca-tracker" ] + }, + { + "name": "perp-skills", + "description": "Perpetual futures trading across Hyperliquid, Pacifica, Lighter, and Aster — execute trades, run TWAP/DCA/grid bots, scan funding rate arbitrage, and view multi-exchange portfolio.", + "source": "./", + "strict": false, + "skills": [ + "./skills/perp-trade", + "./skills/perp-arb", + "./skills/perp-portfolio" + ] } ] } diff --git a/skills/corbits-marketplace/SKILL.md b/skills/corbits-marketplace/SKILL.md index 2557eba..f32aaee 100644 --- a/skills/corbits-marketplace/SKILL.md +++ b/skills/corbits-marketplace/SKILL.md @@ -119,14 +119,10 @@ mp token swap \ ```bash mp virtual-account create -mp virtual-account kyc continue -mp virtual-account bank-account register +mp virtual-account kyc submit +mp virtual-account bank-account add mp virtual-account onramp create \ - --name "Corbits Onramp" \ - --fiat usd \ - --stablecoin usdc \ - --wallet \ - --chain ethereum + --amount 500 --currency usd --chain ethereum --wallet ``` ### Deposit Link (Permissionless) diff --git a/skills/moonpay-virtual-account/SKILL.md b/skills/moonpay-virtual-account/SKILL.md index 65e4874..54eb269 100644 --- a/skills/moonpay-virtual-account/SKILL.md +++ b/skills/moonpay-virtual-account/SKILL.md @@ -139,7 +139,7 @@ mp virtual-account bank-account delete --bankAccountId # Create an offramp mp virtual-account offramp create \ --name "My Offramp" \ - --bankAccountId \ + --fiat USD \ --stablecoin USDC \ --chain solana diff --git a/skills/myriad-prediction-markets/SKILL.md b/skills/myriad-prediction-markets/SKILL.md index d8dc542..8e2dd5a 100644 --- a/skills/myriad-prediction-markets/SKILL.md +++ b/skills/myriad-prediction-markets/SKILL.md @@ -210,10 +210,7 @@ mp token balance list --wallet --chain bsc ```bash mp virtual-account offramp create \ - --name "Offramp" \ - --bankAccountId \ - --stablecoin usdc \ - --chain bsc + --amount 200 --chain bsc --wallet ``` ## End-to-End Workflow diff --git a/skills/perp-arb/SKILL.md b/skills/perp-arb/SKILL.md new file mode 100644 index 0000000..1ae49cb --- /dev/null +++ b/skills/perp-arb/SKILL.md @@ -0,0 +1,92 @@ +--- +name: perp-arb +description: > + Use this skill when the user asks to scan for funding rate arbitrage, find perp-perp or spot-perp arb, check funding rates across exchanges, or run a funding rate scout across Hyperliquid, Pacifica, Lighter, or Aster. +tags: [perp, arbitrage, funding-rate, hyperliquid, pacifica, lighter, aster, trading] +--- + +# Perpetual Futures Funding Rate Arbitrage + +Scan for funding rate edge across Hyperliquid, Pacifica, Lighter, and Aster, and execute delta-neutral arbitrage positions via the `perp` CLI. + +## Prerequisites + +- Install perp-cli: `npm install -g perp-cli` +- Run setup wizard: `perp setup` (configures private key + default exchange) +- Funded margin accounts on at least two exchanges (for delta-neutral arb) +- Verify: `perp account balance -e hyperliquid && perp account balance -e pacifica` + +## Commands + +```bash +# Scan funding rates across all exchanges +perp arb scan + +# Scan with live continuous monitoring +perp arb scan --live + +# Execute arb: long on exchange A, short on exchange B +perp arb exec + +# Auto-run arb daemon (finds and enters opportunities automatically) +perp arb auto + +# Check open arb positions and PnL +perp arb status + +# Close an arb position on both legs +perp arb close + +# View arb history and performance +perp arb history + +# Rebalance capital across exchanges for arb +perp arb rebalance + +# Delta-neutral funding rate farming (spot long + perp short) +perp bot delta-neutral + +# Quick-start arb bot +perp bot quick-arb +``` + +## Workflow + +1. **Scan rates** — `perp arb scan` to see current funding spreads across all exchanges +2. **Identify edge** — look for annualized spread > 5% after fees (shown in scan output) +3. **Verify liquidity** — confirm both legs have sufficient depth for your size +4. **Execute** — `perp arb exec ` enters both legs simultaneously +5. **Monitor** — `perp arb status` shows open positions with real PnL and funding earned +6. **Close** — `perp arb close ` exits both legs when spread narrows + +## Examples + +```bash +# Scan all funding rates live +perp arb scan --live + +# Execute BTC arb: long on Lighter, short on Hyperliquid, $5000 size +perp arb exec BTC lighter hyperliquid 5000 + +# Check open arb positions +perp arb status + +# Auto arb daemon +perp arb auto + +# Delta-neutral bot (spot long + perp short for funding yield) +perp bot delta-neutral +``` + +## Error Handling + +| Error | Cause | Fix | +|-------|-------|-----| +| `Insufficient margin on ` | Not enough collateral | `perp funds deposit -e ` | +| `Liquidity too thin` | Order book too shallow for size | Reduce size or use `perp arb exec` with smaller `sizeUsd` | +| `Rate flipped negative` | Funding rate changed direction | Close with `perp arb close ` | + +## Related Skills + +- [perp-trade](../perp-trade/) — execute individual trades for each arb leg +- [perp-portfolio](../perp-portfolio/) — monitor all open positions and net exposure diff --git a/skills/perp-portfolio/SKILL.md b/skills/perp-portfolio/SKILL.md new file mode 100644 index 0000000..2b3c167 --- /dev/null +++ b/skills/perp-portfolio/SKILL.md @@ -0,0 +1,90 @@ +--- +name: perp-portfolio +description: > + Use this skill when the user asks to view their perp portfolio, check positions across exchanges, see their perpetual futures balances, show open perp positions, check unrealized PnL, or get a multi-exchange perp summary across Hyperliquid, Pacifica, Lighter, or Aster. +tags: [perp, portfolio, positions, pnl, hyperliquid, pacifica, lighter, aster] +--- + +# Multi-Exchange Perpetual Futures Portfolio + +View balances, open positions, PnL, and risk metrics across all configured perp exchanges via the `perp` CLI. + +## Prerequisites + +- Install perp-cli: `npm install -g perp-cli` +- Run setup wizard: `perp setup` (configures private key + default exchange) +- Verify: `perp account balance` + +## Commands + +```bash +# Cross-exchange portfolio overview (all exchanges) +perp portfolio + +# Portfolio for specific exchanges only +perp portfolio --exchange hyperliquid,pacifica + +# Account balance on one exchange +perp account balance [-e ] + +# Open positions +perp account positions [-e ] + +# PnL summary (realized + unrealized + funding) +perp account pnl [-e ] + +# Open orders +perp account orders [-e ] + +# Funding payment history +perp account funding-history [-e ] + +# Live status dashboard: balances, positions, top arb opportunities +perp status + +# Live PnL monitoring (real-time updates) +perp trade pnl-track +``` + +## Workflow + +1. **Overview** — run `perp portfolio` for a full cross-exchange summary +2. **Drill into an exchange** — `perp account positions -e hyperliquid` for detailed positions +3. **Check PnL** — `perp account pnl` for realized + unrealized breakdown +4. **Monitor risk** — look for high margin utilization (>70%) and positions near liquidation in the output +5. **Live view** — `perp status` for a unified real-time dashboard + +## Examples + +```bash +# Full portfolio view across all exchanges +perp portfolio + +# Hyperliquid positions only +perp account positions -e hyperliquid + +# PnL breakdown +perp account pnl + +# Funding payment history +perp account funding-history + +# Live unified dashboard +perp status + +# Real-time PnL tracking +perp trade pnl-track +``` + +## Error Handling + +| Error | Cause | Fix | +|-------|-------|-----| +| `No accounts configured` | Setup not run | Run `perp setup` | +| `Connection failed for ` | RPC/API issue | Check internet and retry; exchange may be down | +| `No positions found` | No open trades | Expected — account is flat | + +## Related Skills + +- [perp-trade](../perp-trade/) — open, close, and manage positions +- [perp-arb](../perp-arb/) — scan and execute funding rate arbitrage diff --git a/skills/perp-trade/SKILL.md b/skills/perp-trade/SKILL.md new file mode 100644 index 0000000..d7b5b41 --- /dev/null +++ b/skills/perp-trade/SKILL.md @@ -0,0 +1,114 @@ +--- +name: perp-trade +description: > + Use this skill when the user wants to open, close, or manage a perpetual futures position, set up a TWAP, DCA, grid, or trailing-stop bot, or place a perp order on Hyperliquid, Pacifica, Lighter, or Aster. +tags: [perp, trade, order, twap, dca, grid, bot, hyperliquid, pacifica, lighter, aster] +--- + +# Perpetual Futures Trade Execution + +Execute trades, manage positions, and run automated bots across Hyperliquid, Pacifica, Lighter, and Aster via the `perp` CLI. + +## Prerequisites + +- Install perp-cli: `npm install -g perp-cli` +- Run setup wizard: `perp setup` (configures private key + default exchange) +- Funded margin account on target exchange (deposit USDC via `perp funds deposit`) +- Verify setup: `perp account balance` + +## Commands + +```bash +# Account overview +perp account balance [-e ] +perp account positions [-e ] + +# Pre-flight check before any trade +perp trade check + +# Market order +perp trade market [-e ] [--leverage ] + +# Shorthand +perp trade buy +perp trade sell + +# Limit order +perp trade limit + +# TWAP +perp trade twap + +# Stop / TP-SL +perp trade stop +perp trade tpsl + +# Close position +perp trade close +perp trade close-all + +# Bots +perp bot quick-dca +perp bot grid +perp bot trailing-stop +perp bot quick-grid + +# Monitor live PnL +perp trade pnl-track +``` + +## Workflow + +1. **Check account balance** — `perp account balance -e ` +2. **Run pre-flight check** — `perp trade check ` to validate margin, liquidation price, and slippage before executing +3. **Place order** — use `perp trade market` for immediate fills, `perp trade limit` for price targets, or `perp trade twap` for large orders +4. **Confirm position** — `perp account positions` to verify fill +5. **Set risk controls** — `perp trade tpsl ` for take-profit/stop-loss + +## Examples + +```bash +# Check before buying +perp trade check BTC buy 1000 -e hyperliquid + +# Market buy $1000 BTC on Hyperliquid at 5x leverage +perp trade buy BTC 1000 -e hyperliquid --leverage 5 + +# TWAP sell $10k ETH over 5 minutes on Pacifica +perp trade twap ETH sell 10000 5m -e pacifica + +# Close BTC position +perp trade close BTC -e hyperliquid + +# Start a DCA bot: buy $100 ETH every 60 seconds +perp bot quick-dca ETH buy 100 60 + +# Grid bot on SOL +perp bot quick-grid SOL -e hyperliquid +``` + +## Error Handling + +| Error | Cause | Fix | +|-------|-------|-----| +| `Insufficient margin` | Account balance too low | `perp funds deposit` to add funds | +| `Leverage too high` | Exchange limit exceeded | Lower leverage with `perp trade leverage ` | +| `Symbol not found` | Wrong ticker or exchange | Check `perp market --help` for available markets | + +## Related Skills + +- [perp-portfolio](../perp-portfolio/) — view positions and PnL across all exchanges +- [perp-arb](../perp-arb/) — scan and execute funding rate arbitrage +- [moonpay-check-wallet](../moonpay-check-wallet/) — check wallet balances before funding + +## Security & Risk + +**Leverage warning:** Leveraged positions can result in 100% loss of margin if the price moves against you. Always set a stop-loss before entering leveraged trades: +```bash +perp trade tpsl # set take-profit and stop-loss levels +``` +Start with 1x leverage (`--leverage 1`) and increase only once familiar with the platform. + +**Liquidation:** If margin utilization exceeds the exchange threshold (~80-90%), your position will be force-closed. Monitor with `perp account positions` and `perp status`. + +**Private key storage:** `perp setup` stores your private key locally (encrypted). Location varies by OS — run `perp setup --help` to see the config path. Never share your key or commit it to version control. To rotate: run `perp setup` again and overwrite. diff --git a/skills/shipp-sports-data/SKILL.md b/skills/shipp-sports-data/SKILL.md index b7d4c9e..f2637fd 100644 --- a/skills/shipp-sports-data/SKILL.md +++ b/skills/shipp-sports-data/SKILL.md @@ -120,13 +120,10 @@ mp message sign --wallet shipp-sports-agent --chain polygon --message "I own thi # Withdraw winnings to bank mp virtual-account offramp create \ - --name "Offramp" \ - --bankAccountId \ - --stablecoin usdc \ - --chain polygon + --amount 500 --chain polygon --wallet # Hardware wallet (high security) -mp wallet hardware add --name "shipp-sports-ledger" +mp wallet add-ledger --name "shipp-sports-ledger" ``` ## Funding Options diff --git a/skills/thoughtproof-reasoning-check/SKILL.md b/skills/thoughtproof-reasoning-check/SKILL.md index 910b694..bf72d42 100644 --- a/skills/thoughtproof-reasoning-check/SKILL.md +++ b/skills/thoughtproof-reasoning-check/SKILL.md @@ -1,6 +1,6 @@ --- name: thoughtproof-reasoning-check -description: Verify whether an AI agent's decision is well-reasoned before executing. Adversarial multi-model critique (Claude, Grok, DeepSeek) returns ALLOW, BLOCK, or UNCERTAIN with confidence score. Use before any high-value swap, trade, or autonomous action. +description: Verify whether an AI agent's decision is well-reasoned before executing. Adversarial multi-model critique (Claude, Grok, DeepSeek) returns ALLOW or HOLD with confidence score. Use before any high-value swap, trade, or autonomous action. tags: [verification, reasoning, agents, defi, security] --- @@ -8,7 +8,7 @@ tags: [verification, reasoning, agents, defi, security] ## Goal -Before executing a trade or autonomous action, verify that the agent's reasoning is sound. ThoughtProof runs adversarial multi-model critique and returns a signed verdict: ALLOW, BLOCK, or UNCERTAIN. +Before executing a trade or autonomous action, verify that the agent's reasoning is sound. ThoughtProof runs adversarial multi-model critique and returns a signed verdict: ALLOW (reasoning is sound) or HOLD (material defects found). ## Prerequisites @@ -41,58 +41,27 @@ First call returns 402 with x402 payment details (amount, recipient, asset on Ba | Verdict | Meaning | Action | |---------|---------|--------| -| `ALLOW` | Reasoning passed verification | Proceed | -| `BLOCK` | Material reasoning defects or unacceptable risk | Do not execute | -| `UNCERTAIN` | Safe escalation state — insufficient clean evidence to justify ALLOW or BLOCK | Gather more context or require review | +| `ALLOW` | Reasoning is sound | Execute the trade | +| `HOLD` | Material defects found | Do not execute, review reasoning | +| `UNCERTAIN` | Insufficient evidence | Gather more context | +| `DISSENT` | Models strongly disagree | Require human review | -## Pricing +## Pricing (stake-proportional) -ThoughtProof pricing is stake-based. - -| Stake Level | Standard | Lite | Use case | -|-------------|----------|------|----------| -| `low` | $0.01 | $0.005 | Routine low-value actions | -| `medium` | $0.02 | $0.01 | Standard trades and service payments | -| `high` | $0.05 | — | Large or sensitive actions | -| `critical` | $0.10 | — | High-value or highly risky actions | - -Notes: -- `lite` is only available for `low` and `medium` stake. -- `high` and `critical` always execute on the standard tier. -- Billing follows the executed tier, not the requested tier. +| Stake Level | Cost | Use case | +|-------------|------|----------| +| `low` | $0.008-$0.02 | Routine swaps under $2K | +| `medium` | $0.02-$0.05 | Standard trades $2K-$10K | +| `high` | $0.05-$0.15 | Large trades $10K-$25K | +| `critical` | $0.15-$1.00 | High-value trades over $25K | ## Example workflow -### MoonPay + ThoughtProof: payment layer + verification layer - -MoonPay handles the payment execution. -ThoughtProof verifies whether the decision to pay is well-reasoned before settlement. - -Example: - -1. User says: "Swap $5K USDC for ETH because CT is bullish." -2. Agent prepares the MoonPay swap request. -3. Before calling `moonpay-swap-tokens`, the agent sends the reasoning to ThoughtProof. -4. ThoughtProof returns: - - `ALLOW` → proceed with swap - - `BLOCK` → stop, surface objections - - `UNCERTAIN` → escalate, ask for clarification or review -5. If verification passes, the MoonPay skill executes the swap. - -**Example failure:** -- "Buy $50K of a token because influencers are bullish" -- ThoughtProof → `BLOCK` -- MoonPay execution never happens - -**Example pass:** -- "Rebalance portfolio back to target allocation with defined slippage and stop-loss constraints" -- ThoughtProof → `ALLOW` -- MoonPay executes - -This gives the agent stack two layers: -- **MoonPay** answers: *can* the transaction execute? -- **ThoughtProof** answers: *should* the transaction execute? +1. User says: "Swap $5K USDC for ETH" +2. Check reasoning via curl to ThoughtProof API with the trade thesis +3. If `HOLD` or `DISSENT` -- warn user, show objections, do not proceed +4. If `ALLOW` with confidence > 0.60 -- execute the swap ## Related skills -- **moonpay-swap-tokens** — Execute the swap after verification passes +- **moonpay-swap-tokens** -- Execute the swap after verification passes