Okx Verifiable Dex Swap logo

Okx Verifiable Dex Swap

Organization
primus-labs
okx-verifiable-dex-swap

Plan and apply verifiable swap-related calls for OKX OnchainOS-style workflows using Primus zkTLS. Use when the user asks for swap quotes, route summaries, liquidity-source metadata, approval data, or swap-preparation results and wants the request/response pair optionally backed by a proof. Distinguish clearly between proving the API response and proving final on-chain execution.

Overview

Publisherprimus-labs
Repositoryskills
Skill nameokx-verifiable-dex-swap
Stars
35
Forks
10
Bundled files
1
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by primus-labs on GitHub. Read the source before you install it.

Installation

Install the Okx Verifiable Dex Swap AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/primus-labs/skills/tree/main/onchainos-verifiable-skills/skills/okx-verifiable-dex-swap
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/primus-labs/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/onchainos-verifiable-skills/skills/okx-verifiable-dex-swap .claude/skills/okx-verifiable-dex-swap
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Okx Verifiable Dex Swap in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Okx Verifiable Dex Swap on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Okx Verifiable Dex Swap is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

OKX Verifiable DEX Swap

This is a quote-first skill for swap proofs, but action-oriented swap endpoints may also be attested if the user wants that extra assurance.

Current status

  • supported chains: good candidate
  • liquidity source list: good candidate
  • swap quote: partial candidate
  • approve tx generation: opt-in proof candidate
  • swap tx generation: opt-in proof candidate

Shared references

  • ../../references/primus-zktls-patterns.md
  • ../../references/response-contracts.md
  • ../../references/fallback-decision-trees.md
  • ../../references/verification-choice-prompts.md
  • ../../references/interaction-examples.md
  • ../../references/endpoint-catalog.md
  • ../../references/limitations.md

How to use this skill

  1. Separate read-only quote questions from execution questions.
  2. If the user wants a proof, prefer proving:
    • quoted output amount
    • route summary
    • price impact
    • liquidity source metadata
  3. For approve or swap-prep endpoints, ask whether the user wants:
    • fast path
    • request/response proof
    • request/response proof plus later chain confirmation
  4. Do not claim that a proof of a quote or calldata response is a proof that the later swap executed.

First-release guidance

  • Good proof target:
    • "Prove the quote for swapping token A to token B right now"
  • Higher-cost proof target:
    • "Prove the approval calldata response"
  • Weak proof target:
    • "Prove the final swap transaction settled" without a chain-native finality check

Concrete endpoint templates

Supported chains

  • Endpoint: GET https://web3.okx.com/api/v6/dex/aggregator/supported/chain
  • Good proof fields:
    • $.data[0].chainIndex
    • $.data[0].chainName
    • $.data[0].dexTokenApproveAddress

Liquidity sources

  • Endpoint: GET https://web3.okx.com/api/v6/dex/aggregator/get-liquidity
  • Query pattern:
text
?chainIndex=1
  • Good proof fields for the first row:
    • $.data[0].id
    • $.data[0].name
    • $.data[0].logo

Quote

  • Endpoint: GET https://web3.okx.com/api/v6/dex/aggregator/quote
  • Query pattern:
text
?chainIndex=1&amount=1000000&swapMode=exactIn&fromTokenAddress=0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee&toTokenAddress=0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48
  • Good proof fields:
    • $.data[0].fromTokenAmount
    • $.data[0].toTokenAmount
    • $.data[0].tradeFee
    • $.data[0].estimateGasFee
    • $.data[0].priceImpactPercent
    • $.data[0].dexRouterList[0].toToken.tokenSymbol

Approve transaction

  • Endpoint: GET https://web3.okx.com/api/v6/dex/aggregator/approve-transaction
  • Current policy:
    • allow as opt-in proof
    • label it as request/response pair or execution-prep data
    • never imply it proves a later approval transaction was mined

Output contract

Prefer these reply modes:

  • attested for supported chains and liquidity-source metadata
  • partial for quote summary
  • attested or partial for approve / swap-prep data when the user explicitly wants proof
  • fallback only when the user prefers speed or the payload is too unstable

For quote replies, separate:

  • verified subclaim: quoted output, route summary, price impact
  • unverified remainder: approval, signing, broadcast, and settlement

For action-attested replies, also state:

  • proof scope: request/response pair
  • finality note: chain confirmation still required

Fallback policy

If the user moves from quote to execution:

  1. keep the quote proof separate
  2. ask whether they want proof for the approval or swap-prep response too
  3. route the final transaction status to gateway or chain-native verification

Decision tree

  1. Is the request chain support metadata or liquidity-source metadata?
    • yes -> attested
  2. Is it a quote summary for one concrete swap?
    • yes -> partial or attested, depending on payload size
  3. Is it approval generation or swap calldata?
    • yes -> ask user whether to use fast path or prove the request/response pair
  4. Is it whether the swap completed?
    • use chain-native confirmation, optionally paired with attested API responses from earlier steps

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Okx Verifiable Dex Swap AI skill do?

Plan and apply verifiable swap-related calls for OKX OnchainOS-style workflows using Primus zkTLS. Use when the user asks for swap quotes, route summaries, liquidity-source metadata, approval data, or swap-preparation results and wants the request/response pair optionally backed by a proof. Distinguish clearly between proving the API response and proving final on-chain execution.

Why use Okx Verifiable Dex Swap on TypingMind?

Because you install it once and use it with any model. Okx Verifiable Dex Swap is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Okx Verifiable Dex Swap in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/primus-labs/skills/tree/main/onchainos-verifiable-skills/skills/okx-verifiable-dex-swap. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Okx Verifiable Dex Swap?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Okx Verifiable Dex Swap?

As many as you like. As long as a model supports skills, you can use Okx Verifiable Dex Swap with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Okx Verifiable Dex Swap AI skill free?

It is published on GitHub by primus-labs. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇