pyth-oracle
Integrate Pyth oracle prices into a Sui Move package. Use when the user mentions Pyth or wants price oracles on Sui.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Integrate Pyth oracle prices into a Sui Move package. Use when the user mentions Pyth or wants price oracles on Sui.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Pick a brand name, color palette, or typography for a Sui product. Use when the user wants to name or brand a Sui project.
Build an AI agent that signs Sui transactions or runs onchain actions. Use when the user wants an AI agent on Sui.
Build a Sui data indexer or analytics pipeline. Use when the user wants to index Sui events, build a pipeline, or query Sui RPC data.
Build a mobile Sui app with React Native or the Sui Mobile SDK. Use when the user wants iOS, Android, or mobile Sui flows.
Pair with a coding agent to build a Sui MVP step by step. Use when the user wants to build the MVP iteratively with an agent.
Author Sui Move modules and packages with a senior Move dev as your pair. Use when the user wants to write, build, author, add, or scaffold Move code, smart contracts, or Sui programs at the module or function level, in any phrasing.
| name | pyth-oracle |
| description | Integrate Pyth oracle prices into a Sui Move package. Use when the user mentions Pyth or wants price oracles on Sui. |
# Suiperpower telemetry. Routes through the CLI so projects.json + Convex stay in sync.
# Silent on failure so the skill never blocks. Opt out: SUIPERPOWER_TELEMETRY=off.
#
# AGENT NOTE: when this skill finishes, run the matching completion command:
# suiperpower track pyth-oracle build completed
# Or use "failed" / "aborted" if it ended that way.
command -v suiperpower >/dev/null 2>&1 && suiperpower track pyth-oracle build started >/dev/null 2>&1 &
true
If TEL_PROMPTED is no, before doing real work, ask the user:
Help suiperpower get better. We track which skills get used and how long they take. No code, no file paths, no PII. Change anytime in
~/.suiperpower/config.json.A) Sure, anonymous B) No thanks
Write the answer to ~/.suiperpower/config.json telemetryTier field and create ~/.suiperpower/.telemetry-prompted. Then continue.
Integrates Pyth pull-based price feeds into a Sui project so the user's Move contract can read real-time, signed prices for 1500+ assets. Walks the user through the Move dependency, TS client setup, on-chain price consumption, and verifies a real price read on testnet before declaring done.
find-next-sui-idea first.scaffold-project first.build-with-move.deepbook-orderbook.scallop-money-market (which may itself use Pyth internally).If you activated this and the user actually wants something else, consult skills/SKILL_ROUTER.md and hand off.
.suiperpower/build-context.md from scaffold-project. Read it if present.If unclear, interview the user for:
Move code that receives &PriceInfoObject and reads price with staleness check.
TS client code using @pythnetwork/pyth-sui-js that fetches prices from Hermes and passes them in the same PTB.
A verified testnet price read: one real transaction that reads a Pyth price on chain, observable on suiscan.
Append to .suiperpower/build-context.md:
## pyth-oracle session, <timestamp>
- feeds: <list of feed IDs>
- staleness: <max_age_secs>
- network: testnet | mainnet
- hermes endpoint: <url>
- pyth state id: <id>
- wormhole state id: <id>
- verified tx digest: <digest>
- open issues: <list>
The skill never deletes files outside the integration source path without explicit user confirmation.
Pyth is a pull oracle. The price lives off chain on Hermes servers. Your client fetches a signed price update, then passes it on chain in the same PTB that reads the price. The flow:
1. TS client calls Hermes: getPriceFeedsUpdateData([feedId])
2. TS client builds PTB:
a. pythClient.updatePriceFeeds(tx, updateData, [feedId]) -> PriceInfoObject IDs
b. tx.moveCall your_module::use_price(priceInfoObjectId, clock, maxAge)
3. User signs and executes the PTB
4. Your Move contract reads price from &PriceInfoObject via get_price_no_older_than
Your Move contract never calls Pyth update functions directly. It only receives &PriceInfoObject as a parameter. The TS SDK handles updates. This is critical because the Pyth package ID changes on upgrades, and hard-coding it in Move would brick your contract.
Context gathering
.suiperpower/build-context.md if it exists.Add Move dependency
Move.toml. See references/pyth-quickstart.md for the exact config.rev = "sui-contract-testnet" for testnet, "sui-contract-mainnet" for mainnet.Write the Move contract
&PriceInfoObject and &Clock as function parameters.pyth::pyth::get_price_no_older_than(price_info_object, clock, max_age) for staleness-checked reads.price::get_price(), price::get_expo(), price::get_conf() to extract values.value * 10^expo. See references/pyth-pitfalls.md.Write the TS client
@pythnetwork/pyth-sui-js.SuiPriceServiceConnection pointing to the right Hermes endpoint (no extra config needed).SuiPythClient(suiClient, pythStateId, wormholeStateId) for the target network.updatePriceFeeds first, then your moveCall with the returned PriceInfoObject IDs.references/pyth-quickstart.md for the full pattern.Look up feed IDs
GET https://hermes.pyth.network/v2/price_feeds?query=<symbol>&asset_type=cryptoreferences/pyth-quickstart.md.Test on testnet
Writeback
.suiperpower/build-context.md.Closing handoff
.suiperpower/intent.md exists and the session was non-trivial (new module, new sponsor integration, or material changes to public functions), recommend verify-against-intent as the next step so drift is caught before shipping.intent.md exists and the session was non-trivial, surface that gap once: offer clarify-intent to backfill, do not force it.Before reporting done, the skill asks itself the following and refuses to declare success if any answer is no:
get_price_no_older_than (not get_price_unsafe) with an explicit max age?&PriceInfoObject as a parameter instead of hard-coding any Pyth update call?If any answer is no, the skill reports the gap and works through it before claiming the integration is complete.
On-demand references (load when relevant to the user's question):
references/pyth-quickstart.md: Move dependency config, TS SDK setup, contract addresses, feed IDs, full integration recipe.references/pyth-move-api.md: Move API reference for reading prices, extractors, and the PriceInfoObject type.references/pyth-pitfalls.md: Exponent math, confidence intervals, staleness, upgrade safety, gas costs, EMA vs spot.Official docs (fetch at runtime for the latest details):
claude "/suiper:pyth-oracle <your message>"codex "/pyth-oracle <your message>"grok, then /pyth-oracle <your message> in the session~/.cursor/rules/pyth-oracle.mdc and reference it.If you activated this and the user actually wants something else, consult skills/SKILL_ROUTER.md and hand off.