Skip to content

LeoYeAI/agent-master-skills / skills/aurehub-xaut-trade

xaut-trade

Flagged

Buy or sell XAUT (Tether Gold) on Ethereum. Supports market orders (Uniswap V3) and limit orders (UniswapX). Wallet modes: Foundry keystore or WDK. Delegates non-XAUT intents to registered skills (e.g. Polymarket prediction markets, Hyperliquid trading). Triggers: buy XAUT, XAUT trade, swap USDT for XAUT, sell XAUT, swap XAUT for USDT, limit order, limit buy XAUT, limit sell XAUT, check limit order, cancel limit order, XAUT when, create wallet, setup wallet, polymarket, prediction market, bet on, odds on, hyperliquid, perp, perpetual, long, short, open long, open short, close position, leverage.

FileKindSize
README.mdmarkdown15.0 KB
SKILL.mdskill md29.2 KB
SKILL.tests.yamlconfig12.1 KB
_meta.jsonconfig991 B
config.example.yamlconfig1.7 KB
references/balance.mdmarkdown2.6 KB
references/buy.mdmarkdown3.8 KB
references/limit-order-buy-place.mdmarkdown4.6 KB
references/limit-order-cancel.mdmarkdown2.2 KB
references/limit-order-sell-place.mdmarkdown4.8 KB
references/limit-order-status.mdmarkdown1.6 KB
references/live-trading-runbook.mdmarkdown3.9 KB
references/onboarding.mdmarkdown12.9 KB
references/quote.mdmarkdown2.0 KB
references/sell.mdmarkdown5.9 KB
references/skill-delegation.mdmarkdown2.8 KB
references/wallet-modes.mdmarkdown1.3 KB
scripts/__tests__/helpers.test.jsscript2.7 KB
scripts/__tests__/integration.test.jsscript1.2 KB
scripts/__tests__/swap-cli.test.jsscript3.7 KB
scripts/__tests__/wallet-init.test.jsscript10.7 KB
scripts/helpers.jsscript1.2 KB
scripts/lib/__tests__/config.test.jsscript2.9 KB
scripts/lib/__tests__/create-wallet.test.jsscript6.1 KB
scripts/lib/__tests__/erc20.test.jsscript3.3 KB
scripts/lib/__tests__/provider.test.jsscript7.6 KB
scripts/lib/__tests__/signer.test.jsscript7.6 KB
scripts/lib/__tests__/uniswap.test.jsscript3.6 KB
scripts/lib/config.jsscript4.3 KB
scripts/lib/create-wallet.jsscript5.7 KB
scripts/lib/erc20.jsscript3.8 KB
scripts/lib/export-seed.jsscript6.5 KB
scripts/lib/provider.jsscript8.3 KB
scripts/lib/signer.jsscript6.8 KB
scripts/lib/uniswap.jsscript5.3 KB
scripts/limit-order.jsscript13.6 KB
scripts/package-lock.jsonmanifest182.2 KB
scripts/package.jsonmanifest703 B
scripts/setup.shscript29.5 KB
scripts/swap.jsscript15.7 KB

references/live-trading-runbook.md

View on GitHub
# Live Trading Runbook (Chat-first, Mainnet)

Use this runbook when you want a real on-chain trade flow with minimal manual work.

Core principle:
- The Agent drives the workflow end-to-end.
- You only intervene at mandatory checkpoints.

---

## 1) What You Need to Do vs What the Agent Does

Agent (automatic):
- Environment checks (wallet mode, `.env`, password file, RPC reachability via `node swap.js address`)
- Balance check via `node swap.js balance`
- Quote via `node swap.js quote --side <buy|sell> --amount <N>`
- Risk preview and command preparation
- Approve via `node swap.js approve --token <TOKEN> --amount <N>`
- Swap via `node swap.js swap --side <buy|sell> --amount <N> --min-out <M>`
- Post-trade result summary via `node swap.js balance`

User (manual checkpoints only):
1. Sensitive wallet input (interactive key import / password input during setup)
2. Wallet funding (ETH for gas, USDT/XAUT as needed)
3. Confirmation when required by thresholds/policy

---

## 2) Start the Live Flow

In chat, send your intent directly:

```text
buy 10 USDT worth of XAUT
```

or

```text
sell 0.001 XAUT to USDT
```

The Agent will:
1. Run readiness checks
2. If environment is incomplete, switch to agent-guided setup
3. Return a Preview (quote, risk warnings, full command)
4. Apply confirmation policy:
   - small trades: light/optional confirmation
   - medium trades: single confirmation
   - large/high-risk trades: double confirmation

---

## 3) Mandatory Manual Checkpoints

### Checkpoint A: Wallet Sensitive Input

If wallet is missing or locked, the Agent will pause and ask you to complete interactive wallet steps.

Typical examples:
- Setting a password for WDK or Foundry wallet
- Running `node lib/create-wallet.js` (WDK mode)
- `cast wallet import <account> --interactive` (Foundry mode)

After you finish, tell the Agent to continue.

### Checkpoint B: Wallet Funding

Before live execution, ensure your wallet has:
- ETH for gas (recommended `>= 0.005 ETH`)
- USDT for buy flow
- XAUT for sell flow

### Checkpoint C: Final Execution Confirmation

When confirmation is required by policy, explicitly confirm:

```text
confirm approve
confirm swap
```

---

## 4) Expected Conversation Shape

1. You: trade intent
2. Agent: checks + preview
3. You: handle mandatory manual checkpoint(s) if prompted
4. Agent: updated preview / ready state
5. You: `confirm approve` / `confirm swap` when prompted
6. Agent: tx hash + post-trade balances/result

---

## 5) Optional: Limit Orders

For limit orders, add `UNISWAPX_API_KEY` to `~/.aurehub/.env` first.

Then ask in chat to:
- place limit buy/sell
- check order status
- cancel order

---

## 6) Common Failure Cases

1. RPC/network instability (`429/502/timeout`)
- Add a paid node to `ETH_RPC_URL` or put it first in `ETH_RPC_URL_FALLBACK`.

2. Password file mismatch
- Recreate the password file with correct password (`chmod 600`).

3. Insufficient balances
- Top up ETH/USDT/XAUT, then retry.

4. Runtime `PRIVATE_KEY` detected
- Remove `PRIVATE_KEY` from `.env`; runtime uses wallet mode (WDK or Foundry).

---

## 7) Fallback (Manual Script Path)

If agent-guided setup is blocked by local terminal constraints, run setup manually:

```bash
_saved=$(cat ~/.aurehub/.setup_path 2>/dev/null); [ -f "$_saved" ] && SETUP_PATH="$_saved"
[ -z "$SETUP_PATH" ] && { GIT_ROOT=$(git rev-parse --show-toplevel 2>/dev/null); [ -n "$GIT_ROOT" ] && [ -f "$GIT_ROOT/skills/xaut-trade/scripts/setup.sh" ] && SETUP_PATH="$GIT_ROOT/skills/xaut-trade/scripts/setup.sh"; }
[ -z "$SETUP_PATH" ] && SETUP_PATH=$(find "$HOME" -maxdepth 6 -type f -path "*/xaut-trade/scripts/setup.sh" 2>/dev/null | head -1)
if [ -n "$SETUP_PATH" ] && [ -f "$SETUP_PATH" ]; then
  bash "$SETUP_PATH"
else
  echo "setup.sh not found. Run:"
  echo '  find "$HOME" -maxdepth 6 -type f -path "*/xaut-trade/scripts/setup.sh" 2>/dev/null | head -1'
  exit 1
fi
```

Then return to chat and continue your original trade intent.
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 323kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 323kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 323kUpdated Claude CodeCodexVerifiedInstall