vault-swap-demo

Preview vault token swaps on X Layer and execute when ready.

Updated Apr 6, 2026
One-click install
npx skills add https://github.com/dubzn/operator-xlayer --skill vault-swap-demo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vault-swap-demo
Source: https://github.com/dubzn/operator-xlayer/tree/main/.agents/skills/vault-swap-demo
Command: npx skills add https://github.com/dubzn/operator-xlayer --skill vault-swap-demo

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Users need a reliable way to preview a token swap from a vault and only execute it when the preview indicates the vault is ready, avoiding unsafe transactions during a live demo on X Layer.

Core Features & Use Cases

  • Demo Script Execution: Runs the provided npm run demo:swap command with appropriate flags.
  • Safety Guardrails: Automatically checks preview results and blocks execution if the vault is not ready.
  • Result Reporting: Returns jobId, txHash, and payment details when execution succeeds, or lists blockers from riskFlags and warnings when it does not.
  • Use Case: An operator receives a request like “Usa el vault 0x..., haz un swap de 1 USDT a USDC, primero preview y ejecuta si está listo,” and the skill performs the full safe workflow.

Quick Start

Run a preview of the swap from vault 0xABC for 1 USDT to USDC and execute it if ready.

Frequently Asked Questions about vault-swap-demo

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I safely preview a token swap from a vault before executing it?

To safely preview a token swap from a vault, run the demo script using the vault address, token symbols, and amount. The preview checks vault readiness and blocks execution if risk flags or warnings exist.

What inputs do I need to execute a demo vault swap on X Layer?

Executing a demo vault swap on X Layer requires the vault address, source and target token symbols or addresses, the swap amount, and the '--execute-if-ready' flag to trigger the backend transaction.

How does the vault swap demo handle execution when the vault is not ready?

When the vault swap preview detects the vault is not ready, execution is automatically blocked. The system reports the specific blockers by listing all detected riskFlags and warnings instead of processing the swap.

What transaction details are returned after a successful vault swap execution?

After a successful vault swap execution, the system returns the jobId, txHash, and associated payment details. This confirms the backend transaction completed and provides the exact execution records.

Can I run a demo vault swap without using the execute flag?

Yes, you can run a demo vault swap without the execute flag to perform a preview-only check. This validates vault readiness and token parameters without submitting the actual backend transaction on X Layer.

Why does my vault swap preview pass but the execution still fails?

If a vault swap execution fails despite a passing preview, check for late-breaking riskFlags or backend execution issues. The safety guardrails require the '--execute-if-ready' flag and a completely valid preview to process.