supra-push-oracle — Claude Code skill: Supra price feeds on Hedera
A skill for reading the Supra push oracle on Hedera: getSvalue(pairId), millisecond timestamps and USDT pairs. Useful when a contract pulls prices from Supra.
npx skills add hedera-dev/hedera-skills --skill supra-push-oracle -a claude-codeWhat supra-push-oracle does
The skill lays out the Supra push pattern: the oracle writes to an on-chain feed, and the consumer calls getSvalue(pairId) to get price, decimals and time. The ISupraSValueFeed address is fixed per network, and a pair ID is a numeric Supra identifier, not an EVM aggregator address. Chain IDs: testnet 296, mainnet 295.
The timestamp is where things break. On Hedera the time field often arrives in milliseconds, so it gets compared against 10_000_000_000 and divided by 1_000 before any staleness check. Skip that step and the value reads as the future, which lets old quotes through. The second trap is the quote asset: Hedera feeds are often denominated in USDT rather than USD, and labelling one as USD is wrong.
Rejecting bad data gets its own section. Zero time, zero price, a stale timestamp and an unknown pair ID should all revert instead of returning zero. Prices are normalized through decimals to the consumer scale, usually 18. Inside are SKILL.md with a checklist and two references: references/examples.md with read sketches and references/hedera-feeds.md on where to source addresses and pair IDs.
What it helps with
- read a price from a Supra feed on Hedera
- convert a millisecond timestamp to unix seconds
- reject a stale or zero quote before it hits a calculation
- match a pair ID to the right market
- avoid labelling a USDT feed as USD
Example prompts for the agent
- Add Supra price reading on Hedera to the consumer contract
- Check that the
getSvaluetimestamp is converted to seconds before the staleness check - Review the oracle read: zeros, staleness, decimals
How to install supra-push-oracle
1Skills CLI (Vercel)
npx skills add hedera-dev/hedera-skills --skill supra-push-oracle -a claude-code2Manually: put the files in place
~/.claude/skills/supra-push-oracle/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/supra-push-oracle/
1Skills CLI (Vercel)
npx skills add hedera-dev/hedera-skills --skill supra-push-oracle -a codex2Manually: put the files in place
.agents/skills/supra-push-oracle/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add hedera-dev/hedera-skills --skill supra-push-oracle -a cursor2Manually: put the files in place
.cursor/skills/supra-push-oracle/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install hedera-dev/hedera-skills supra-push-oracle2Manually: put the files in place
.github/skills/supra-push-oracle/SKILL.md1Skills CLI (Vercel)
npx skills add hedera-dev/hedera-skills --skill supra-push-oracle -a gemini-cli2Platform CLI
gemini skills install https://github.com/hedera-dev/hedera-skills --path plugins/oracles/skills/supra-push-oracleManually: put the files in place
.devin/skills/supra-push-oracle/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add hedera-dev/hedera-skills --skill supra-push-oracle -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about supra-push-oracle
How do I install supra-push-oracle in Claude?
Run npx skills add hedera-dev/hedera-skills --skill supra-push-oracle -a claude-code. The skill lands at ~/.claude/skills/supra-push-oracle/SKILL.md.
What does supra-push-oracle do?
It covers reading the Supra push oracle on Hedera: calling getSvalue(pairId), handling decimals and time, enforcing freshness and reverting on incomplete quotes.
Why does the timestamp look like it is in the future?
On Hedera the time field is often in milliseconds. Values above 10_000_000_000 are divided by 1_000 before being compared with block.timestamp.
Source text
SKILL.md · Apache-2.0
--- name: supra-push-oracle description: > Supra S-Value push oracle on Hedera. Use when reading getSvalue price feeds on Hedera (testnet 296 / mainnet 295), mapping pair IDs, converting millisecond timestamps to unix seconds, or quoting USDT pairs where USD is unavailable. --- # Supra Push Oracle (Hedera) **Push S-Value pattern:** Supra updates an on-chain feed; readers call `getSvalue(pairId)` and must reject empty, zero, or stale quotes. ```text Supra push oracle → getSvalue(pairId) → consumer ``` Consumers may wrap the feed behind a local interface; that is optional. Do not assume a project-specific adapter name. ## Quick Reference | Piece | Role | | ----- | ---- | | Push oracle | Immutable `ISupraSValueFeed` address for the network | | Pair ID | Numeric Supra pair id (not an EVM aggregator address) | | Read | `getSvalue(pairId)` → price, decimals, time | | Time | Often **milliseconds** on Hedera — convert when `time > 1e10` | | Quote asset | Hedera feeds are often **USDT**, not USD | | Freshness | Compare unix **seconds** to a max staleness | **Hedera chain IDs:** testnet `296`, mainnet `295`. See [references/hedera-feeds.md](references/hedera-feeds.md) for where to source push-oracle addresses and pair IDs. See [references/examples.md](references/examples.md) for read sketches. ## Critical: Millisecond Timestamps Supra `time` on Hedera is frequently milliseconds. Treat values `> 10_000_000_000` as ms and convert before staleness checks: ```solidity uint256 updatedAt = pf.time > 10_000_000_000 ? pf.time / 1_000 : pf.time; if (block.timestamp - updatedAt > maxStaleness) revert StalePrice(updatedAt, maxStaleness); ``` Comparing a millisecond timestamp to `block.timestamp` (seconds) will look “in the future” or skip staleness incorrectly. ## Critical: USDT Pairs On Hedera Current Hedera Supra feeds often quote **USDT**, not USD. Pair keys / symbols must match the actual quote (`HBAR`/`USDT`, `BTC`/`USDT`). Do not label a USDT feed as USD. ## Completeness And Invalid Prices Revert when: | Condition | Why | | --------- | --- | | `pf.time == 0` | No successful update | | `pf.price == 0` | Invalid price | | Stale after converting to seconds | Older than `maxStaleness` | | Unknown pair ID | Do not return zero | Normalize `pf.price` with `pf.decimals` to the consumer scale (often 18). ## Checklist When implementing or reviewing Supra reads on Hedera: - [ ] Push-oracle address and pair IDs taken from Supra Hedera docs (not Ethereum) - [ ] Timestamps converted to unix seconds when they look like milliseconds - [ ] Pair symbols match the real quote asset (often USDT) - [ ] Zero / missing updates revert - [ ] Staleness bound is enforced in seconds - [ ] Decimals normalized to the consumer scale ## References - [references/examples.md](references/examples.md) — `getSvalue` and timestamp sketches - [references/hedera-feeds.md](references/hedera-feeds.md) — where to source push-oracle addresses and pair IDs - [Supra push oracle networks](https://docs.supra.com/oracles/data-feeds/push-oracle/networks) - [Supra data feeds index](https://docs.supra.com/oracles/data-feeds/data-feeds-index)
© hedera-dev · Apache-2.0 · hedera-dev/hedera-skills