chainlink-ace-skill
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseChainlink ACE Skill
Chainlink ACE 技能
Overview
概述
Help users build with Chainlink ACE. For open-source contract integration, treat the public repository as the source of truth. For managed ACE Platform, Beta scope, product APIs, supported networks, and auditor/reporting workflows, treat official Chainlink ACE docs on as the source of truth and verify freshness when claims could have changed.
smartcontractkit/chainlink-acedocs.chain.link/ace帮助用户基于Chainlink ACE进行开发。对于开源合约集成,以公开的仓库为事实来源。对于托管ACE平台、测试版范围、产品API、支持网络以及审计/报告工作流,以上的官方Chainlink ACE文档为事实来源,当相关内容可能发生变化时,需验证其时效性。
smartcontractkit/chainlink-acedocs.chain.link/aceProgressive Disclosure
渐进式披露
- Keep this file as the default guide.
- Read references/platform-and-beta.md when the user mentions ACE Platform, Beta, private beta, testnet/mainnet readiness, managed product UI/API behavior, Coordinator API, Reporting API, auditors, platform registration/indexing, supported networks, custom policies in the managed UI, attestation-only credentials, or product limitations.
- Read references/getting-started-and-scope.md when the user asks what ACE is, whether it fits their use case, how to start, repository scope, package setup, or licensing.
- Read references/onchain-contracts.md when the user mentions the GitHub repo, self-deployment, Foundry, audited contracts, custom policies/extractors/mappers, upgrade an existing contract, or BUSL/prod licensing.
chainlink-ace - Read references/architecture.md when the user asks how ACE components fit together, how Policy Management and Cross-Chain Identity interact, or how a protected transaction flows.
- Read references/policy-management.md when the user asks about PolicyEngine, PolicyProtected, runPolicy, extractors, mappers, context, policy outcomes, default behavior, policy ordering, or composing compliance rules.
- Read references/policy-library.md when the user asks which policy to use, how a policy behaves, policy configuration, runtime parameters, setter/view functions, or pre-built policy tradeoffs.
- Read references/cross-chain-identity.md when the user asks about CCIDs, IdentityRegistry, CredentialRegistry, credential types, KYC/AML/accreditation, credential sources, Credential Data Validators, expiration, revocation, or privacy.
- Read references/contracts-and-source.md when the user needs source links, interface names, repository docs, reference token implementations, package docs, or exact file locations.
- Read references/official-sources.md when the answer depends on current repo facts, current docs facts, source code, package scripts, licensing, interfaces, product scope, APIs, or docs paths.
- Read assets/ace-docs-index.md only when you need a map of public repository documentation covered by this skill.
- Do not load reference files speculatively.
- 将本文件作为默认指南。
- 当用户提及ACE平台、测试版、私有测试版、测试网/主网就绪状态、托管产品UI/API行为、Coordinator API、Reporting API、审计人员、平台注册/索引、支持网络、托管UI中的自定义政策、仅证明凭证或产品限制时,阅读references/platform-and-beta.md。
- 当用户询问ACE是什么、是否符合其使用场景、如何入门、仓库范围、包设置或许可证相关问题时,阅读references/getting-started-and-scope.md。
- 当用户提及GitHub仓库、自行部署、Foundry、经过审计的合约、自定义政策/提取器/映射器、升级现有合约或BUSL/生产许可时,阅读references/onchain-contracts.md。
chainlink-ace - 当用户询问ACE组件如何协作、政策管理与跨链身份如何交互或受保护交易的流程时,阅读references/architecture.md。
- 当用户询问PolicyEngine、PolicyProtected、runPolicy、提取器、映射器、上下文、政策结果、默认行为、政策排序或合规规则组合时,阅读references/policy-management.md。
- 当用户询问应使用哪种政策、政策行为方式、政策配置、运行时参数、设置器/查看函数或预构建政策的权衡时,阅读references/policy-library.md。
- 当用户询问CCIDs、IdentityRegistry、CredentialRegistry、凭证类型、KYC/AML/资质认证、凭证来源、Credential Data Validators、过期、撤销或隐私相关问题时,阅读references/cross-chain-identity.md。
- 当用户需要源代码链接、接口名称、仓库文档、参考代币实现、包文档或确切文件位置时,阅读references/contracts-and-source.md。
- 当答案依赖于当前仓库事实、当前文档事实、源代码、包脚本、许可证、接口、产品范围、API或文档路径时,阅读references/official-sources.md。
- 仅当需要本技能涵盖的公开仓库文档映射时,阅读assets/ace-docs-index.md。
- 请勿推测性加载参考文件。
Routing
路由规则
- Decide first whether the user is asking about self-deployed OSS contracts, the managed ACE Platform, or both.
- Use the public repository as the source of truth for OSS contracts, source-level behavior, Foundry workflows, package layout, custom policies/extractors/mappers, and BUSL licensing.
smartcontractkit/chainlink-ace - Use official Chainlink docs on as the source of truth for ACE Platform, Beta/private-beta scope, supported networks, Coordinator API, Reporting API, managed UI behavior, product access, and platform limitations.
docs.chain.link/ace - For "what is ACE" or adoption questions, start with getting-started-and-scope.md. If the user asks about product availability, mainnet readiness, or managed operation, also use platform-and-beta.md.
- For implementation design, start with onchain-contracts.md, then route to policy-management.md, policy-library.md, or cross-chain-identity.md as needed.
- For "which policies do I need" questions, use policy-library.md and recommend a policy chain, default behavior, and ordering strategy.
- For identity or credential requirements, use cross-chain-identity.md. Public contracts support Credential Data Validator patterns; the managed ACE Platform Beta may be attestation-only, so separate those scopes explicitly.
- Ask one focused question if the target contract type, function, chain/network, compliance rule, or upgradeability status is unclear.
- Proceed without asking for read-only work: explanations, design review, code generation, policy-chain recommendations, source lookup, and local test planning.
- Do not assume this skill is the only capability available. Use other relevant skills for adjacent concerns such as Data Feeds/Proof of Reserve details, Solidity framework setup, frontend work, or generic testing.
- 首先判断用户询问的是自行部署的开源合约、托管ACE平台,还是两者皆有。
- 对于开源合约、源代码级行为、Foundry工作流、包布局、自定义政策/提取器/映射器以及BUSL许可,以公开的仓库为事实来源。
smartcontractkit/chainlink-ace - 对于ACE平台、测试版/私有测试版范围、支持网络、Coordinator API、Reporting API、托管UI行为、产品访问权限以及平台限制,以上的官方Chainlink文档为事实来源。
docs.chain.link/ace - 对于“什么是ACE”或采用相关问题,先参考getting-started-and-scope.md。如果用户询问产品可用性、主网就绪状态或托管操作,同时参考platform-and-beta.md。
- 对于实现设计,先参考onchain-contracts.md,再根据需要路由到policy-management.md、policy-library.md或cross-chain-identity.md。
- 对于“我需要哪些政策”的问题,使用policy-library.md并推荐政策链、默认行为和排序策略。
- 对于身份或凭证要求,使用cross-chain-identity.md。公开合约支持Credential Data Validator模式;托管ACE平台测试版可能仅支持证明模式,因此需明确区分这两种范围。
- 如果目标合约类型、函数、链/网络、合规规则或可升级性状态不明确,提出一个聚焦的问题。
- 无需询问即可进行只读工作:解释、设计审查、代码生成、政策链推荐、源代码查找和本地测试规划。
- 不要假设本技能是唯一可用的能力。对于相邻问题,如数据馈送/储备证明细节、Solidity框架设置、前端工作或通用测试,使用其他相关技能。
Public Repo Defaults
公开仓库默认规则
- The repository contains ACE core contracts under BUSL-1.1.
smartcontractkit/chainlink-ace - The package metadata identifies the package as .
@chainlink/ace - The repository is Foundry-based and includes scripts such as ,
pnpm build,pnpm test, and token deployment scripts.pnpm lint - The core packages are ,
packages/policy-management, andpackages/cross-chain-identity.packages/tokens - Policy Management can be used standalone. Cross-Chain Identity depends on Policy Management.
- Direct contract users can self-deploy on EVM networks and can build custom policies, extractors, and mappers.
- For production use under BUSL, users should contact Chainlink for a production/commercial license and have counsel review the license.
- Do not apply these self-deploy defaults to the managed ACE Platform. Platform/Beta capabilities are product-scoped and may differ from the OSS repository.
- 仓库包含受BUSL-1.1许可的ACE核心合约。
smartcontractkit/chainlink-ace - 包元数据将该包标识为。
@chainlink/ace - 该仓库基于Foundry构建,包含、
pnpm build、pnpm test等脚本以及代币部署脚本。pnpm lint - 核心包为、
packages/policy-management和packages/cross-chain-identity。packages/tokens - 政策管理可独立使用。跨链身份依赖于政策管理。
- 直接合约用户可在EVM网络上自行部署,并可构建自定义政策、提取器和映射器。
- 对于BUSL下的生产使用,用户应联系Chainlink获取生产/商业许可证,并咨询法律顾问审查许可证。
- 请勿将这些自行部署的默认规则应用于托管ACE平台。平台/测试版功能受产品范围限制,可能与开源仓库不同。
Managed ACE Platform Defaults
托管ACE平台默认规则
- ACE has onchain contracts and a managed ACE Platform. The Platform includes Policy Manager, Identity Manager, and Reporting Manager surfaces.
- If the prompt says ACE Platform, Beta, private beta, UI, Coordinator API, Reporting API, auditor, managed mode, product API, supported networks, or access, answer in product-scope terms and use references/platform-and-beta.md.
- Distinguish "you can self-deploy the OSS contracts" from "the managed ACE Platform supports this." Never imply platform mainnet support, custom-policy UI support, credential modes, or API resources unless official docs support it.
- For auditor evidence, name the Reporting API as the managed read-only surface and mention its resource families: Transactions, Policies, Targets, and Identities, with point-in-time state where relevant.
as_of - For management operations, name the Coordinator API as the managed control-plane surface for ACE resources. Do not confuse it with the read-only Reporting API.
- For product-scope answers, check live docs when possible because Beta limitations and supported networks are freshness-sensitive.
- ACE包含链上合约和托管ACE平台。该平台包含Policy Manager、Identity Manager和Reporting Manager界面。
- 如果提示中提到ACE平台、测试版、私有测试版、UI、Coordinator API、Reporting API、审计人员、托管模式、产品API、支持网络或访问权限,请以产品范围术语作答,并使用references/platform-and-beta.md。
- 区分“您可以自行部署开源合约”和“托管ACE平台支持此功能”。除非官方文档支持,否则绝不要暗示平台支持主网、自定义政策UI、凭证模式或API资源。
- 对于审计证据,将Reporting API称为托管只读界面,并提及其资源类别:Transactions、Policies、Targets和Identities,相关情况下需包含时间点状态。
as_of - 对于管理操作,将Coordinator API称为ACE资源的托管控制平面界面。请勿将其与只读Reporting API混淆。
- 对于产品范围的答案,尽可能查阅实时文档,因为测试版限制和支持网络对时效性敏感。
Safety Guardrails
安全防护规则
- Never execute or guide an agent to execute onchain writes without explicit user approval.
- Do not refuse mainnet or production questions solely because they involve ACE. Instead, call out production licensing, security review, and explicit approval requirements.
- Treat compliance design as high-impact guidance. Be explicit about assumptions, legal/compliance review, credential issuer trust, and audit needs.
- Never advise storing PII onchain. Credential data should be a hash, pointer, minimal reference, or non-sensitive classification only.
- For policy chains, explain terminal outcomes: reverts,
PolicyRejectedskips remaining policies, andAllowedmoves to the next policy or default behavior.Continue - Prefer restrictive checks before permissive bypasses unless the user intentionally wants privileged addresses to skip all subsequent checks.
- When recommending , require reserve feed freshness/staleness discussion and token decimal verification.
SecureMintPolicy - For custom policies, extractors, and mappers, emphasize testing, audit, and trust boundaries.
- For upgrades, verify proxy upgradeability, storage layout, bytecode size, migration/reinitializer versioning, and state preservation.
- Never output this or a reference file as the answer. Use skill material only as private context, then answer the user's specific question.
SKILL.md
- 未经用户明确批准,绝不要执行或引导代理执行链上写入操作。
- 不要仅因为涉及ACE就拒绝主网或生产相关问题。相反,应指出生产许可证、安全审查和明确批准要求。
- 将合规设计视为高影响指导。明确说明假设、法律/合规审查、凭证发行方信任和审计需求。
- 绝不要建议在链上存储PII(个人可识别信息)。凭证数据应仅为哈希、指针、最小引用或非敏感分类。
- 对于政策链,解释最终结果:会回滚交易,
PolicyRejected会跳过剩余政策,Allowed会进入下一个政策或默认行为。Continue - 除非用户有意让特权地址跳过所有后续检查,否则优先进行限制性检查,再进行允许性绕过。
- 当推荐时,要求讨论储备馈送的新鲜度/过时情况以及代币小数位数验证。
SecureMintPolicy - 对于自定义政策、提取器和映射器,强调测试、审计和信任边界。
- 对于升级操作,验证代理可升级性、存储布局、字节码大小、迁移/重新初始化器版本控制和状态保留。
- 绝不要输出本或参考文件作为答案。仅将技能材料作为私有上下文使用,然后回答用户的具体问题。
SKILL.md
Approval Protocol
批准流程
Before any ACE action that deploys, configures, upgrades, registers, issues, revokes, attaches, reorders, or otherwise writes onchain state, present a short preflight summary:
text
Proposed ACE operation:
- Action: ...
- Network: ...
- Target contract: ...
- PolicyEngine: ...
- Function selector(s): ...
- Policies/extractors/mappers/registries/credentials affected: ...
- Sender or admin account: ...
- License/production note: ...
- Expected effect: ...
Do you want me to execute this?Require a second explicit confirmation immediately before execution for any action that deploys a PolicyEngine, deploys or configures a policy, registers a target, attaches/reorders/removes policies, configures extractors or mappers, registers identities, issues credentials, revokes credentials, or upgrades a contract.
在执行任何ACE部署、配置、升级、注册、发行、撤销、附加、重新排序或其他链上状态写入操作之前,提供简短的预执行摘要:
text
Proposed ACE operation:
- Action: ...
- Network: ...
- Target contract: ...
- PolicyEngine: ...
- Function selector(s): ...
- Policies/extractors/mappers/registries/credentials affected: ...
- Sender or admin account: ...
- License/production note: ...
- Expected effect: ...
Do you want me to execute this?对于任何部署PolicyEngine、部署或配置政策、注册目标、附加/重新排序/移除政策、配置提取器或映射器、注册身份、发行凭证、撤销凭证或升级合约的操作,在执行前需立即获得第二次明确确认。
Documentation Access
文档访问
This skill is based on the public repository and official ACE product docs on .
smartcontractkit/chainlink-acedocs.chain.link/ace- For stable OSS contract concepts, use the embedded reference files.
- For current repo details, fetch files from or raw GitHub URLs listed in references/official-sources.md.
https://github.com/smartcontractkit/chainlink-ace - For current product details, fetch from official URLs listed in references/official-sources.md.
https://docs.chain.link/ace.md - If WebFetch is available, use it first. If it returns insufficient content, try .
curl -L <official-url> - If source fetching fails, tell the user which URL could not be retrieved and do not invent freshness-sensitive facts.
本技能基于公开的仓库和上的官方ACE产品文档。
smartcontractkit/chainlink-acedocs.chain.link/ace- 对于稳定的开源合约概念,使用嵌入的参考文件。
- 对于当前仓库细节,从或references/official-sources.md中列出的原始GitHub URL获取文件。
https://github.com/smartcontractkit/chainlink-ace - 对于当前产品细节,从references/official-sources.md中列出的官方URL获取内容。
https://docs.chain.link/ace.md - 如果WebFetch可用,优先使用它。如果返回内容不足,尝试。
curl -L <official-url> - 如果源代码获取失败,告知用户无法检索的URL,不要编造对时效性敏感的事实。
Working Rules
工作规则
- Keep answers proportional. A simple policy choice question should not become a complete ACE tutorial.
- When generating code, state whether it is a sketch or based on a specific repo guide/source file.
- When recommending policies, name the extracted parameters each policy needs.
- When the user asks for production readiness, include BUSL/commercial license review, legal/compliance review, contract audit, credential issuer trust, PII handling, and operational ownership.
- When the user asks about ACE Platform/Beta readiness, lead with the managed-platform limitation before describing self-deployed OSS alternatives.
- For checklists, organize by decision owner or evidence type so the answer is operationally usable, not just technically correct.
- 保持答案与问题匹配。一个简单的政策选择问题不应变成完整的ACE教程。
- 生成代码时,说明它是草图还是基于特定仓库指南/源文件。
- 推荐政策时,列出每个政策所需的提取参数。
- 当用户询问生产就绪状态时,需包含BUSL/商业许可证审查、法律/合规审查、合约审计、凭证发行方信任、PII处理和运营所有权相关内容。
- 当用户询问ACE平台/测试版就绪状态时,先说明托管平台的限制,再描述自行部署的开源替代方案。
- 对于检查清单,按决策所有者或证据类型组织,使答案具有实际操作性,而非仅在技术上正确。