agentleFS
vaquarkhanvaquarkhan/web3-agent-skills/skills/skill-11-oracle-data-feeds/SKILL.md

skill-11-oracle-data-feeds

Skill2 starsChanged 6 months agoMITView on GitHub

Integrates oracle and data feed services including Chainlink and Pyth price feeds, VRF randomness, and Chainlink Automation keepers. Use when consuming on-chain price data, random numbers, or conditional automation.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Never use block variables (blockhash, timestamp) for randomness

    line 51
  2. Distinctive:

    Use multiple sources for critical decisions (liquidations, minting)

    line 65
  3. Distinctive:

    Never use spot DEX price as sole oracle for high-value ops

    line 68

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Oracle & Data Feeds

When to Use

  • Reading price feeds for DeFi calculations
  • Requesting verifiable random numbers (VRF)
  • Setting up Chainlink Automation (keepers)
  • Validating oracle freshness and deviation thresholds
  • Comparing multi-oracle prices for manipulation detection

Prerequisites

  • MCP: price-feed-server, blockchain-rpc-server
  • Skill-08 for oracle manipulation risk assessment

Workflow

1. Chainlink Price Feeds

AggregatorV3Interface feed = AggregatorV3Interface(aggregatorAddress);
(, int256 price, , uint256 updatedAt, ) = feed.latestRoundData();

Validation checks:

  • updatedAt within heartbeat (varies: 1h ETH/USD, 24h long-tail)
  • price > 0
  • Compare with Pyth/CoinGecko — flag if deviation > 2%

Feed addresses: see knowledge-base/protocols/ and Chainlink docs per chain.

2. Pyth Network

  • Pull model: update price feeds in same tx via getUpdateData()
  • Hermes API for off-chain price reads
  • Lower latency than push oracles for L2s

3. Chainlink VRF v2.5

  1. Subscribe or direct funding
  2. Request randomness: requestRandomWords(keyHash, subId, minConfirmations, callbackGasLimit, numWords)
  3. Fulfill in callback: fulfillRandomWords(requestId, randomWords)
  4. Never use block variables (blockhash, timestamp) for randomness

4. Chainlink Automation

TypeUse Case
Time-basedPeriodic harvest, rebalance
Custom logiccheckUpkeep() returns upkeepNeeded
Log triggerReact to specific events

Register upkeep with LINK funding; monitor balance.

5. Oracle Security

  • Use multiple sources for critical decisions (liquidations, minting)
  • Implement staleness checks and circuit breakers
  • TWAP for AMM-derived prices (minimum 30-minute window)
  • Never use spot DEX price as sole oracle for high-value ops

References

  • references/chainlink-feeds.md
  • references/pyth-integration.md
  • price-feed-server MCP tools

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.