chainlink-ace-skill

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Chainlink ACE Skill

Chainlink ACE 技能

Overview

概述

Help users build with Chainlink ACE. For open-source contract integration, treat the public
smartcontractkit/chainlink-ace
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
docs.chain.link/ace
as the source of truth and verify freshness when claims could have changed.
帮助用户基于Chainlink ACE进行开发。对于开源合约集成,以公开的
smartcontractkit/chainlink-ace
仓库为事实来源。对于托管ACE平台、测试版范围、产品API、支持网络以及审计/报告工作流,以
docs.chain.link/ace
上的官方Chainlink ACE文档为事实来源,当相关内容可能发生变化时,需验证其时效性。

Progressive Disclosure

渐进式披露

  1. Keep this file as the default guide.
  2. 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.
  3. 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.
  4. Read references/onchain-contracts.md when the user mentions the
    chainlink-ace
    GitHub repo, self-deployment, Foundry, audited contracts, custom policies/extractors/mappers, upgrade an existing contract, or BUSL/prod licensing.
  5. 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.
  6. 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.
  7. 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.
  8. 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.
  9. 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.
  10. 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.
  11. Read assets/ace-docs-index.md only when you need a map of public repository documentation covered by this skill.
  12. Do not load reference files speculatively.
  1. 将本文件作为默认指南。
  2. 当用户提及ACE平台、测试版、私有测试版、测试网/主网就绪状态、托管产品UI/API行为、Coordinator API、Reporting API、审计人员、平台注册/索引、支持网络、托管UI中的自定义政策、仅证明凭证或产品限制时,阅读references/platform-and-beta.md
  3. 当用户询问ACE是什么、是否符合其使用场景、如何入门、仓库范围、包设置或许可证相关问题时,阅读references/getting-started-and-scope.md
  4. 当用户提及
    chainlink-ace
    GitHub仓库、自行部署、Foundry、经过审计的合约、自定义政策/提取器/映射器、升级现有合约或BUSL/生产许可时,阅读references/onchain-contracts.md
  5. 当用户询问ACE组件如何协作、政策管理与跨链身份如何交互或受保护交易的流程时,阅读references/architecture.md
  6. 当用户询问PolicyEngine、PolicyProtected、runPolicy、提取器、映射器、上下文、政策结果、默认行为、政策排序或合规规则组合时,阅读references/policy-management.md
  7. 当用户询问应使用哪种政策、政策行为方式、政策配置、运行时参数、设置器/查看函数或预构建政策的权衡时,阅读references/policy-library.md
  8. 当用户询问CCIDs、IdentityRegistry、CredentialRegistry、凭证类型、KYC/AML/资质认证、凭证来源、Credential Data Validators、过期、撤销或隐私相关问题时,阅读references/cross-chain-identity.md
  9. 当用户需要源代码链接、接口名称、仓库文档、参考代币实现、包文档或确切文件位置时,阅读references/contracts-and-source.md
  10. 当答案依赖于当前仓库事实、当前文档事实、源代码、包脚本、许可证、接口、产品范围、API或文档路径时,阅读references/official-sources.md
  11. 仅当需要本技能涵盖的公开仓库文档映射时,阅读assets/ace-docs-index.md
  12. 请勿推测性加载参考文件。

Routing

路由规则

  1. Decide first whether the user is asking about self-deployed OSS contracts, the managed ACE Platform, or both.
  2. Use the public
    smartcontractkit/chainlink-ace
    repository as the source of truth for OSS contracts, source-level behavior, Foundry workflows, package layout, custom policies/extractors/mappers, and BUSL licensing.
  3. Use official Chainlink docs on
    docs.chain.link/ace
    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.
  4. 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.
  5. For implementation design, start with onchain-contracts.md, then route to policy-management.md, policy-library.md, or cross-chain-identity.md as needed.
  6. For "which policies do I need" questions, use policy-library.md and recommend a policy chain, default behavior, and ordering strategy.
  7. 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.
  8. Ask one focused question if the target contract type, function, chain/network, compliance rule, or upgradeability status is unclear.
  9. Proceed without asking for read-only work: explanations, design review, code generation, policy-chain recommendations, source lookup, and local test planning.
  10. 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.
  1. 首先判断用户询问的是自行部署的开源合约、托管ACE平台,还是两者皆有。
  2. 对于开源合约、源代码级行为、Foundry工作流、包布局、自定义政策/提取器/映射器以及BUSL许可,以公开的
    smartcontractkit/chainlink-ace
    仓库为事实来源。
  3. 对于ACE平台、测试版/私有测试版范围、支持网络、Coordinator API、Reporting API、托管UI行为、产品访问权限以及平台限制,以
    docs.chain.link/ace
    上的官方Chainlink文档为事实来源。
  4. 对于“什么是ACE”或采用相关问题,先参考getting-started-and-scope.md。如果用户询问产品可用性、主网就绪状态或托管操作,同时参考platform-and-beta.md。
  5. 对于实现设计,先参考onchain-contracts.md,再根据需要路由到policy-management.md、policy-library.md或cross-chain-identity.md。
  6. 对于“我需要哪些政策”的问题,使用policy-library.md并推荐政策链、默认行为和排序策略。
  7. 对于身份或凭证要求,使用cross-chain-identity.md。公开合约支持Credential Data Validator模式;托管ACE平台测试版可能仅支持证明模式,因此需明确区分这两种范围。
  8. 如果目标合约类型、函数、链/网络、合规规则或可升级性状态不明确,提出一个聚焦的问题。
  9. 无需询问即可进行只读工作:解释、设计审查、代码生成、政策链推荐、源代码查找和本地测试规划。
  10. 不要假设本技能是唯一可用的能力。对于相邻问题,如数据馈送/储备证明细节、Solidity框架设置、前端工作或通用测试,使用其他相关技能。

Public Repo Defaults

公开仓库默认规则

  1. The
    smartcontractkit/chainlink-ace
    repository contains ACE core contracts under BUSL-1.1.
  2. The package metadata identifies the package as
    @chainlink/ace
    .
  3. The repository is Foundry-based and includes scripts such as
    pnpm build
    ,
    pnpm test
    ,
    pnpm lint
    , and token deployment scripts.
  4. The core packages are
    packages/policy-management
    ,
    packages/cross-chain-identity
    , and
    packages/tokens
    .
  5. Policy Management can be used standalone. Cross-Chain Identity depends on Policy Management.
  6. Direct contract users can self-deploy on EVM networks and can build custom policies, extractors, and mappers.
  7. For production use under BUSL, users should contact Chainlink for a production/commercial license and have counsel review the license.
  8. 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.
  1. smartcontractkit/chainlink-ace
    仓库包含受BUSL-1.1许可的ACE核心合约。
  2. 包元数据将该包标识为
    @chainlink/ace
  3. 该仓库基于Foundry构建,包含
    pnpm build
    pnpm test
    pnpm lint
    等脚本以及代币部署脚本。
  4. 核心包为
    packages/policy-management
    packages/cross-chain-identity
    packages/tokens
  5. 政策管理可独立使用。跨链身份依赖于政策管理。
  6. 直接合约用户可在EVM网络上自行部署,并可构建自定义政策、提取器和映射器。
  7. 对于BUSL下的生产使用,用户应联系Chainlink获取生产/商业许可证,并咨询法律顾问审查许可证。
  8. 请勿将这些自行部署的默认规则应用于托管ACE平台。平台/测试版功能受产品范围限制,可能与开源仓库不同。

Managed ACE Platform Defaults

托管ACE平台默认规则

  1. ACE has onchain contracts and a managed ACE Platform. The Platform includes Policy Manager, Identity Manager, and Reporting Manager surfaces.
  2. 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.
  3. 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.
  4. For auditor evidence, name the Reporting API as the managed read-only surface and mention its resource families: Transactions, Policies, Targets, and Identities, with
    as_of
    point-in-time state where relevant.
  5. 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.
  6. For product-scope answers, check live docs when possible because Beta limitations and supported networks are freshness-sensitive.
  1. ACE包含链上合约和托管ACE平台。该平台包含Policy Manager、Identity Manager和Reporting Manager界面。
  2. 如果提示中提到ACE平台、测试版、私有测试版、UI、Coordinator API、Reporting API、审计人员、托管模式、产品API、支持网络或访问权限,请以产品范围术语作答,并使用references/platform-and-beta.md
  3. 区分“您可以自行部署开源合约”和“托管ACE平台支持此功能”。除非官方文档支持,否则绝不要暗示平台支持主网、自定义政策UI、凭证模式或API资源。
  4. 对于审计证据,将Reporting API称为托管只读界面,并提及其资源类别:Transactions、Policies、Targets和Identities,相关情况下需包含
    as_of
    时间点状态。
  5. 对于管理操作,将Coordinator API称为ACE资源的托管控制平面界面。请勿将其与只读Reporting API混淆。
  6. 对于产品范围的答案,尽可能查阅实时文档,因为测试版限制和支持网络对时效性敏感。

Safety Guardrails

安全防护规则

  1. Never execute or guide an agent to execute onchain writes without explicit user approval.
  2. Do not refuse mainnet or production questions solely because they involve ACE. Instead, call out production licensing, security review, and explicit approval requirements.
  3. Treat compliance design as high-impact guidance. Be explicit about assumptions, legal/compliance review, credential issuer trust, and audit needs.
  4. Never advise storing PII onchain. Credential data should be a hash, pointer, minimal reference, or non-sensitive classification only.
  5. For policy chains, explain terminal outcomes:
    PolicyRejected
    reverts,
    Allowed
    skips remaining policies, and
    Continue
    moves to the next policy or default behavior.
  6. Prefer restrictive checks before permissive bypasses unless the user intentionally wants privileged addresses to skip all subsequent checks.
  7. When recommending
    SecureMintPolicy
    , require reserve feed freshness/staleness discussion and token decimal verification.
  8. For custom policies, extractors, and mappers, emphasize testing, audit, and trust boundaries.
  9. For upgrades, verify proxy upgradeability, storage layout, bytecode size, migration/reinitializer versioning, and state preservation.
  10. Never output this
    SKILL.md
    or a reference file as the answer. Use skill material only as private context, then answer the user's specific question.
  1. 未经用户明确批准,绝不要执行或引导代理执行链上写入操作。
  2. 不要仅因为涉及ACE就拒绝主网或生产相关问题。相反,应指出生产许可证、安全审查和明确批准要求。
  3. 将合规设计视为高影响指导。明确说明假设、法律/合规审查、凭证发行方信任和审计需求。
  4. 绝不要建议在链上存储PII(个人可识别信息)。凭证数据应仅为哈希、指针、最小引用或非敏感分类。
  5. 对于政策链,解释最终结果:
    PolicyRejected
    会回滚交易,
    Allowed
    会跳过剩余政策,
    Continue
    会进入下一个政策或默认行为。
  6. 除非用户有意让特权地址跳过所有后续检查,否则优先进行限制性检查,再进行允许性绕过。
  7. 当推荐
    SecureMintPolicy
    时,要求讨论储备馈送的新鲜度/过时情况以及代币小数位数验证。
  8. 对于自定义政策、提取器和映射器,强调测试、审计和信任边界。
  9. 对于升级操作,验证代理可升级性、存储布局、字节码大小、迁移/重新初始化器版本控制和状态保留。
  10. 绝不要输出本
    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
smartcontractkit/chainlink-ace
repository and official ACE product docs on
docs.chain.link/ace
.
  1. For stable OSS contract concepts, use the embedded reference files.
  2. For current repo details, fetch files from
    https://github.com/smartcontractkit/chainlink-ace
    or raw GitHub URLs listed in references/official-sources.md.
  3. For current product details, fetch from official
    https://docs.chain.link/ace.md
    URLs listed in references/official-sources.md.
  4. If WebFetch is available, use it first. If it returns insufficient content, try
    curl -L <official-url>
    .
  5. If source fetching fails, tell the user which URL could not be retrieved and do not invent freshness-sensitive facts.
本技能基于公开的
smartcontractkit/chainlink-ace
仓库和
docs.chain.link/ace
上的官方ACE产品文档。
  1. 对于稳定的开源合约概念,使用嵌入的参考文件。
  2. 对于当前仓库细节,从
    https://github.com/smartcontractkit/chainlink-ace
    references/official-sources.md中列出的原始GitHub URL获取文件。
  3. 对于当前产品细节,从references/official-sources.md中列出的官方
    https://docs.chain.link/ace.md
    URL获取内容。
  4. 如果WebFetch可用,优先使用它。如果返回内容不足,尝试
    curl -L <official-url>
  5. 如果源代码获取失败,告知用户无法检索的URL,不要编造对时效性敏感的事实。

Working Rules

工作规则

  1. Keep answers proportional. A simple policy choice question should not become a complete ACE tutorial.
  2. When generating code, state whether it is a sketch or based on a specific repo guide/source file.
  3. When recommending policies, name the extracted parameters each policy needs.
  4. 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.
  5. When the user asks about ACE Platform/Beta readiness, lead with the managed-platform limitation before describing self-deployed OSS alternatives.
  6. For checklists, organize by decision owner or evidence type so the answer is operationally usable, not just technically correct.
  1. 保持答案与问题匹配。一个简单的政策选择问题不应变成完整的ACE教程。
  2. 生成代码时,说明它是草图还是基于特定仓库指南/源文件。
  3. 推荐政策时,列出每个政策所需的提取参数。
  4. 当用户询问生产就绪状态时,需包含BUSL/商业许可证审查、法律/合规审查、合约审计、凭证发行方信任、PII处理和运营所有权相关内容。
  5. 当用户询问ACE平台/测试版就绪状态时,先说明托管平台的限制,再描述自行部署的开源替代方案。
  6. 对于检查清单,按决策所有者或证据类型组织,使答案具有实际操作性,而非仅在技术上正确。