chainlink-data-feeds-skill
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseChainlink Data Feeds Skill
Chainlink Data Feeds Skill
Overview
概述
Route Data Feed requests to the simplest valid path. Generate working code on first attempt when possible. Fetch documentation only when a specific gap blocks progress.
将数据馈送请求引导至最简单的有效路径。尽可能在首次尝试时生成可运行的代码。仅当特定知识缺口阻碍进展时才获取文档。
Progressive Disclosure
渐进式披露
- Keep this file as the default guide.
- Read references/reading-price-feeds.md only when the user wants to read a price feed on EVM, write a consumer contract, read off-chain, look up AggregatorV3Interface, or debug a price feed integration.
- Read references/mvr-feeds.md only when the user asks about Multiple-Variable Response feeds, bundle feeds, or BundleAggregatorProxy.
- Read references/svr-feeds.md only when the user asks about Smart Value Recapture, OEV recapture, or searcher onboarding.
- Read references/feed-types.md only when the user asks about feed categories, SmartData/RWA, rates/volatility, tokenized equity feeds, or needs help choosing a feed type.
- Read references/multi-chain.md only when the user targets Solana, StarkNet, Aptos, or Tron.
- Read references/feed-operations.md only when the user asks about L2 sequencer uptime checks, feed deprecation, contract registry, developer responsibilities, or data sources.
- Read references/official-sources.md only when the answer depends on live data that the reference files do not contain — feed addresses for a specific chain, current deprecation schedules, specific network parameters.
- Read references/source-code.md only when debugging interface mismatches or the user needs to inspect contract source code on GitHub.
- Do not load reference files speculatively.
- 将本文件作为默认指南。
- 仅当用户希望在EVM上读取价格馈送、编写消费者合约、链下读取、查询AggregatorV3Interface或调试价格馈送集成时,才阅读references/reading-price-feeds.md。
- 仅当用户询问多变量响应馈送(Multiple-Variable Response feeds)、捆绑馈送或BundleAggregatorProxy时,才阅读references/mvr-feeds.md。
- 仅当用户询问Smart Value Recapture、OEV回收或搜索者入职时,才阅读references/svr-feeds.md。
- 仅当用户询问馈送类别、SmartData/RWA、利率/波动率、代币化股权馈送,或需要帮助选择馈送类型时,才阅读references/feed-types.md。
- 仅当用户针对Solana、StarkNet、Aptos或Tron时,才阅读references/multi-chain.md。
- 仅当用户询问L2 sequencer可用性检查、馈送弃用、合约注册表、开发者职责或数据源时,才阅读references/feed-operations.md。
- 仅当答案依赖于参考文件中未包含的实时数据——特定链的馈送地址、当前弃用时间表、特定网络参数时,才阅读references/official-sources.md。
- 仅当调试接口不匹配或用户需要在GitHub上检查合约源代码时,才阅读references/source-code.md。
- 不要推测性地加载参考文件。
Routing
路由规则
- Use reading-price-feeds.md as the default for any EVM price feed request — this covers the vast majority of Data Feeds use cases.
- Route to the chain-specific section of multi-chain.md for non-EVM chains (Solana, Aptos, StarkNet, Tron).
- Route to mvr-feeds.md for bundle or multi-variable feed requests.
- Route to svr-feeds.md for OEV or MEV recapture requests.
- Route to feed-operations.md for operational concerns (L2 sequencer checks, deprecation, monitoring).
- Ask one focused question if the chain, feed type, or integration method is unclear.
- Proceed without asking for read-only work: explanations, code generation, debugging.
- 对于任何EVM价格馈送请求,默认使用reading-price-feeds.md——这涵盖了绝大多数Data Feeds用例。
- 对于非EVM链(Solana、Aptos、StarkNet、Tron),路由至multi-chain.md的链特定章节。
- 对于捆绑或多变量馈送请求,路由至mvr-feeds.md。
- 对于OEV或MEV回收请求,路由至svr-feeds.md。
- 对于运营相关问题(L2 sequencer检查、弃用、监控),路由至feed-operations.md。
- 如果链、馈送类型或集成方法不明确,提出一个聚焦的问题。
- 无需询问即可进行只读工作:解释、代码生成、调试。
Safety Defaults
安全默认规则
These are non-negotiable in generated code. Every consumer contract or integration must include them.
- Always validate freshness: check against a staleness threshold based on the feed's heartbeat. Never skip this.
updatedAt - Always call on the feed: never hardcode decimal counts. Different feeds use different decimals.
decimals() - On L2 chains (Arbitrum, Optimism, Base, Scroll, etc.): always include an L2 Sequencer Uptime Feed check with a grace period after recovery.
- Never use for freshness validation — this field is deprecated.
answeredInRound - Remind users that example code is unaudited and not for production use without a security review.
- If the user is targeting mainnet, emphasize developer responsibilities and recommend a security audit.
这些是生成代码中不可协商的要求。每个消费者合约或集成都必须包含这些规则。
- 始终验证新鲜度:根据馈送的心跳间隔,将与陈旧阈值进行对比。绝不能跳过此步骤。
updatedAt - 始终调用馈送的方法:绝不能硬编码小数位数。不同的馈送使用不同的小数位数。
decimals() - 在L2链(Arbitrum、Optimism、Base、Scroll等)上:始终包含L2 Sequencer Uptime Feed检查,并在恢复后设置宽限期。
- 绝不能使用进行新鲜度验证——此字段已被弃用。
answeredInRound - 提醒用户示例代码未经审计,未经安全审查不得用于生产环境。
- 如果用户针对主网,强调开发者职责并建议进行安全审计。
Documentation Access
文档访问
This skill references official Data Feeds documentation URLs throughout its reference files. Whether the model can fetch those URLs depends on the host agent's capabilities.
- If WebFetch, a browser tool, or an MCP server that can retrieve documentation is available, use it to fetch the referenced URL before answering.
- If no documentation-fetching tool is available, do not silently improvise Data Feeds patterns from training data alone. Instead:
- Use the embedded reference content in this skill's reference files as the floor for guidance.
- Tell the user that live documentation could not be verified.
- Provide the specific URL so the user can check it directly.
- For contract-first workflows where correctness matters most, prefer the concrete examples in references/reading-price-feeds.md over generating patterns from memory.
本技能在其参考文件中全程引用官方Data Feeds文档URL。模型是否能够获取这些URL取决于宿主Agent的能力。
- 如果有WebFetch、浏览器工具或可检索文档的MCP服务器可用,在回答前使用它获取引用的URL。
- 如果没有文档获取工具,不要仅从训练数据中即兴创造Data Feeds模式。而是:
- 将本技能参考文件中的嵌入式参考内容作为指导基础。
- 告知用户无法验证实时文档。
- 提供具体URL以便用户直接查看。
- 对于正确性至关重要的合约优先工作流,优先使用references/reading-price-feeds.md中的具体示例,而非凭记忆生成模式。
Working Rules
工作规则
- Generate working code from knowledge and reference files first. Fetch only when a specific detail is missing.
- Treat 0-1 fetches as normal, 2-3 as the ceiling. Most questions need no fetches because the reference files contain the implementation guidance.
- When a fetch is needed, apply the cascade: WebFetch first; if it returns <1000 chars of useful content, fall back to ; if both fail, report the URL to the user.
curl -s -L -A "Mozilla/5.0 ..." "<url>" - Keep answers proportional — a simple "read a price feed" question gets a code block and brief explanation, not a full tutorial.
- Generate code only when code is actually needed.
- Keep unsupported or out-of-scope features out of the answer rather than speculating.
- 首先根据知识和参考文件生成可运行的代码。仅当缺少特定细节时才进行获取。
- 将0-1次获取视为正常,2-3次为上限。大多数问题无需获取,因为参考文件包含实现指导。
- 当需要获取时,按以下顺序尝试:首先使用WebFetch;如果返回的有用内容少于1000字符, fallback到;如果两者都失败,将URL告知用户。
curl -s -L -A "Mozilla/5.0 ..." "<url>" - 保持回答与问题匹配——简单的“读取价格馈送”问题只需代码块和简短解释,无需完整教程。
- 仅在确实需要时生成代码。
- 不要在回答中包含不支持或超出范围的功能,避免猜测。