Skip to main content
skill CX Codex

chainlink-data-feeds-skill — Claude Code skill: read Chainlink price

Teaches the agent to write contracts and off-chain code that read Chainlink price feeds through AggregatorV3Interface and latestRoundData.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add smartcontractkit/chainlink-agent-skills --skill chainlink-data-feeds-skill -a claude-code
Open on GitHub

What chainlink-data-feeds-skill does

The skill kicks in when a project needs Chainlink feed data: feed integration, address lookup, consumer contracts, multi-chain feeds, MVR bundles, SVR and OEV, feed monitoring, historical data, L2 sequencer checks, rates and volatility feeds, SmartData and RWA. Inside are reference files the agent loads on demand instead of all at once. EVM requests default to the price feeds route; other routes follow the trigger table.

There is a starter kit too: a Foundry project README plus its files, which the agent returns in full or adapts while keeping the layout and the install, test and deploy commands. The safety rules say decimals() is called at runtime rather than hardcoded, updatedAt is checked against the feed heartbeat, and on L2 the sequencer uptime feed needs AggregatorV2V3Interface with an answer != 0 rejection and a 3600-second recovery grace period. The deprecated answeredInRound is not used for freshness.

A live feed address only comes from the official address page fetched in the same turn. If that page was not fetched, the config gets a placeholder marked as unverified. Examples carry an unaudited, not-for-production warning, so audits, monitoring and circuit breakers stay with the integrator. CCIP, VRF, Automation and Functions requests are handed off to their own products.

What it helps with

  • read a Chainlink feed price inside a Solidity contract
  • find the current proxy address for a given pair
  • scaffold a Foundry project with a consumer contract and tests
  • guard a price read with an L2 sequencer uptime check
  • write an off-chain script to read a feed and watch freshness

Example prompts for the agent

  • Write a consumer contract that reads ETH/USD from a Chainlink feed with latestRoundData
  • Give me the starter Foundry project for a price feed integration with tests and deploy scripts
  • How do I check round freshness and handle an L2 sequencer outage?

How to install chainlink-data-feeds-skill

1Skills CLI (Vercel)

npx skills add smartcontractkit/chainlink-agent-skills --skill chainlink-data-feeds-skill -a claude-code

2Manually: put the files in place

~/.claude/skills/chainlink-data-feeds-skill/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/chainlink-data-feeds-skill/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about chainlink-data-feeds-skill

How do I install chainlink-data-feeds-skill in Claude?

Run npx skills add smartcontractkit/chainlink-agent-skills --skill chainlink-data-feeds-skill -a claude-code. The skill lands at ~/.claude/skills/chainlink-data-feeds-skill/SKILL.md.

What does chainlink-data-feeds-skill do?

It helps the agent write Chainlink price feed code: consumer contracts, address lookup, freshness and sequencer checks, plus off-chain reads.

How is it different from chainlink-data-streams-skill?

This one covers price feeds and AggregatorV3Interface. Data Streams reports over REST and WebSocket live in chainlink-data-streams-skill.

Source text

SKILL.md · MIT
---
name: chainlink-data-feeds-skill
description: "Helps developers read Chainlink price feeds with AggregatorV3Interface and latestRoundData. This is not a Data Streams report. REST and WebSocket report streams go to chainlink-data-streams-skill. It applies to price feed integration, feed address lookup, consumer contracts, multi-chain feeds, MVR bundle feeds, SVR and OEV feeds, feed monitoring, historical data, L2 sequencer checks, rates and volatility feeds, and SmartData and RWA feeds."
license: MIT
allowed-tools: Read WebFetch Write Edit
metadata:
  version: "0.0.9"
---

# Chainlink Data Feeds Skill

## Progressive Disclosure

| Request / triggers | Load |
|---|---|
| EVM read, consumer contract, off-chain read, address lookup/debugging | [price feeds](references/reading-price-feeds.md) |
| Working Foundry/Data Feeds project | Load the [starter README](templates/starter-kit/README.md) and every listed file; reply with their contents or a tailored derivative, never a local/absolute path alone. Preserve layout and include install/test/deploy commands, Sepolia ETH/USD or verified named-network lookup, unaudited/not-for-production warning, and L2 sequencer protection. |
| Multiple-Variable Response, multi-variable feed, `BundleAggregatorProxy` | [MVR](references/mvr-feeds.md) |
| Smart Value Recapture, OEV/MEV recapture, searcher onboarding | [SVR](references/svr-feeds.md) |
| Feed categories/selection, SmartData/RWA, rates/volatility, tokenized equity | [types](references/feed-types.md) |
| Solana, StarkNet, Aptos, Tron, Move, Cairo, Anchor, TronBox | [multi-chain](references/multi-chain.md) |
| L2 sequencer, deprecation, monitoring, registry, responsibilities, data sources, self-managed feeds | [operations](references/feed-operations.md) |
| Live addresses/schedules/parameters; interface/signature mismatch, proxy/aggregator source, GitHub example | [official sources](references/official-sources.md), then [docs index](assets/data-feeds-docs-index.md) for facts the curated references do not have |

Do not load references speculatively. Default EVM requests to price feeds; ask only when routing depends on missing context.
Do not assume this skill is the only capability available.
Hand CCIP/bridge, VRF, Automation, and Functions requests to their owning products exclusively, giving each product's standard next steps from general knowledge; emit no Data Feeds or weaker substitute and never improvise live constants.
When a user requests Data Feeds code or operational steps, emit that deliverable in the response; never replace it with a status or completion summary.
For MVR requests, choose the MVR route even when a live address, feed ID, or schema cannot be verified; use clearly marked placeholders for unverified values and continue with all requested design, consumer code, tests, and configuration instead of stopping at verification.
Every SVR response must emit the exact standalone sentence `Complete the Chainlink compatibility form` before any onboarding or address-migration guidance.
For a configuration-focused SVR protocol integration or migration, give concise configuration, onboarding, verification, and safety steps plus only the minimal address/configuration delta; do not emit a full consumer unless the user explicitly requests one. Keep auction mechanics high-level and exclude searcher-only selectors, WebSocket endpoints, signing instructions, and MEV-Share/Atlas bot implementation details unless the user explicitly asks to build or operate a searcher.

## Safety rules

1. Validate `updatedAt` against the feed heartbeat; reject incomplete or stale rounds.
2. Call `decimals()` at runtime; never hardcode decimals.
3. On L2, always use `AggregatorV2V3Interface` for the sequencer uptime feed—never `AggregatorV3Interface`; reject `answer != 0` and enforce the 3600-second recovery grace period.
4. Never use deprecated `answeredInRound` for freshness or other logic.
5. For an implicit current-price Solidity getter, use the exact named-return form `returns (int256 price, uint8 decimals)`; declare `uint256 updatedAt;` first, then assign `(, price,, updatedAt,) = dataFeed.latestRoundData();`. Do not substitute an unnamed-return or alternate compiling tuple form.
6. Warn that examples are unaudited and not for production; mainnet integrators own audits, dependencies, monitoring, circuit breakers, contingencies, and user risk disclosure.

## Freshness policy

1. Use this skill's references first.
2. If [official-sources.md](references/official-sources.md) names the page, fetch that page's `.md` URL.
3. If it does not, fetch `https://docs.chain.link/data-feeds/llms.txt`, pick one page, and fetch that page's `.md` URL.
4. Fetch `https://docs.chain.link/data-feeds/llms-full.txt` only when the question is broad and no one page covers it.
5. Use Context7 only when the `.md` fetch fails, the page is empty, or the page has under 1,000 useful characters and does not answer. Ask for the missing fact only.
6. Stop when the page answers. Fetch at most three pages. Prefer the `.md` URL. Use `Accept: text/markdown` on the normal page URL only when the tool cannot open the `.md` URL and can set that header.
7. Never improvise live facts or patterns. If a value is unverified, say so and name the URL.

## Invariants

- Read EVM proxies, not underlying aggregators.
- Preserve the starter kit layout/README invariants; replace illustrations and tune heartbeat/mock values.
- Use `AggregatorV3Interface` for single values, `IBundleAggregatorProxy` for MVR, and `AggregatorV2V3Interface` for sequencer uptime.
- A live feed address in config must be copied from the official address page fetched in this turn. When that page lists more than one contract for the pair, use the contract for the product the user asked for. A normal price read uses the standard proxy, not an SVR, backup, or legacy proxy. If the page was not fetched, use a placeholder and say the address is unverified. Never present a remembered address as the verified current feed.
- Verify unknown feed IDs, schemas, parameters, and support.

© smartcontractkit · MIT · smartcontractkit/chainlink-agent-skills

Similar skills

Everything for Backend and APIs →

From the same set4

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor