Install
openclaw skills install xlayer-execution-guardRun an executable X Layer pre-execution guard for autonomous agents: OnchainOS DEX route judgment, honeypot and price-impact checks, proof-mode evidence, and optional Agentic Wallet execution via onchainos. Use when OpenClaw/Codex needs to test, block, resize, or execute an X Layer swap intent with judge-ready proof.
openclaw skills install xlayer-execution-guardUse this skill to turn an agent swap intent into a guarded execution decision and proof artifact.
The installed skill includes its own Python runtime in runtime/ and two scripts in scripts/:
scripts/run_execution_guard.py runs the guard CLI.scripts/check_agentic_wallet.py checks whether onchainos and Agentic Wallet are reachable.--no-execute or --execution-mode proof while evaluating a request.--live or --execution-mode agentic-wallet after explicit user approval for a real wallet action.proof mode as simulated execution evidence. Only agentic-wallet mode can return a real transaction hash.196 unless the user explicitly chooses another chain.Set the skill directory first. In OpenClaw it is usually:
SKILL_DIR="$HOME/.openclaw/skills/xlayer-execution-guard"
If installed into a local workdir with ClawHub, use:
SKILL_DIR="$PWD/skills/xlayer-execution-guard"
Install the only runtime dependency if needed:
python3 -m pip install --user -r "$SKILL_DIR/requirements.txt"
Check the Agentic Wallet environment:
python3 "$SKILL_DIR/scripts/check_agentic_wallet.py"
Run a safe pre-execution judgment:
PYTHONPATH="$SKILL_DIR/runtime" python3 "$SKILL_DIR/scripts/run_execution_guard.py" \
--agent strategy-office \
--intent-id strategy-office-round-001 \
--from USDC \
--to USDT \
--amount 10 \
--amount-mode readable \
--slippage 0.5 \
--max-impact 1.20 \
--no-execute \
--output guard-proof.json
Run proof-mode closed-loop evidence without touching the wallet:
PYTHONPATH="$SKILL_DIR/runtime" python3 "$SKILL_DIR/scripts/run_execution_guard.py" \
--agent strategy-office \
--intent-id strategy-office-proof-001 \
--from USDC \
--to USDT \
--amount 10 \
--amount-mode readable \
--execution-mode proof \
--output guard-proof.json
Run a live Agentic Wallet execution only after user approval:
PYTHONPATH="$SKILL_DIR/runtime" python3 "$SKILL_DIR/scripts/run_execution_guard.py" \
--agent strategy-office \
--intent-id strategy-office-live-001 \
--from USDC \
--to USDT \
--amount 10 \
--amount-mode readable \
--slippage 0.5 \
--execution-mode agentic-wallet \
--wallet default \
--chain 196 \
--output guard-live-proof.json
--live is an alias for --execution-mode agentic-wallet.
For real OnchainOS route judgment, export API credentials in the OpenClaw environment or ~/.config/onchainos.env:
export ONCHAINOS_API_KEY="..."
export ONCHAINOS_API_SECRET="..."
export ONCHAINOS_API_PASSPHRASE="..."
export ONCHAINOS_CHAIN_INDEX="196"
For live wallet execution, onchainos must be installed and logged in:
onchainos wallet login
onchainos wallet status
The runtime uses OnchainOS DEX Aggregator APIs for:
/api/v6/dex/aggregator/all-tokens/api/v6/dex/aggregator/get-liquidity/api/v6/dex/aggregator/quoteThe output includes:
pre_execution.verdict: execute, resize, retry, or blockpre_execution.checks: quote availability, price impact, fallback coverage, token tax, honeypot flags, gas and fee fieldsexecution.status: simulated_success, success, broadcasted, failed, or not_executedpost_execution.proof_id and moltbook_summaryclosed_loop_validation: whether the pre-execution verdict matched the post-execution outcomewallet_ready=false: run onchainos wallet login in the same OpenClaw environment.verdict=block: do not execute; show the block reason.verdict=resize: execute only if the user accepts the resized risk outcome.execution.error.