Token导航 LogoToken导航TokenDH.com
开发需要联网github未标认证来源可访问许可证需确认审计提醒

afp-product-builder法新社产品构建者

Agent Skill

afp-product-builder 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

225

周安装

9

GitHub Stars

2

下载量

73
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:afp-product-builder(法新社产品构建者)
来源仓库:https://github.com/autonity/afp-sdk
仓库路径:skills/afp-product-builder
安装命令:
npx skills add https://github.com/autonity/afp-sdk --skill afp-product-builder
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/autonity/afp-sdk --skill afp-product-builder

简介

用于生成符合 Forecastathon 竞赛要求的完整产品规范文档,支持 IPFS 存储。

  • 适合时间序列或事件型预测产品的设计与元数据封装,包含价格带与合约地址约束。
  • 通过 npx 命令从 GitHub 安装,需指定网络环境(主网或测试网)和注册 builder 地址。
  • 严格遵循比赛规则,包括 oracle 地址、抵押资产等固定参数不可更改。
  • afp-product-builder 属于开发类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

AFP Product Builder

Use this skill to produce a complete, valid product specification for the Forecastathon competition, including extended metadata that can be pinned to IPFS as a DAG-CBOR encoded DAG.

Inputs to gather first

  • Network: bakerloo or mainnet.
  • Builder address (Forecastathon-registered).
  • Product type: time series (scalar) or event (binary or ternary).
  • Data source: public API URL and fields to extract.
  • Start time and earliest FSP submission time (UTC ISO 8601).
  • Min and max price band (unleveraged products only).
  • Symbol and description.

Forecastathon constraints (must enforce)

  • Required contract addresses:

- Bakerloo: oracleAddress 0x72EeD9f7286292f119089F56e3068a3A931FCD49, collateralAsset 0xDEfAaC81a079533Bf2fb004c613cc2870cF0A5b5. - Mainnet: oracleAddress 0x06CaDDDf6CC08048596aE051c8ce644725219C73, collateralAsset 0xAE2C6c29F6403fDf5A31e74CC8bFd1D75a3CcB8d.

  • Builder must be a registered Forecastathon participant.
  • startTime must be at least two full working days after PR submission.
  • Products are unleveraged and must define minPrice and maxPrice.
  • Extended metadata must be pinned on IPFS and conform to standard schemas.
  • API source must be valid and freely accessible.

Build the on-chain product (PredictionProductV1)

Use camelCase field names inside product:

  • product.base.metadata.builder (EVM checksum address)
  • product.base.metadata.symbol (A-Z0-9, 1-16 chars)
  • product.base.metadata.description
  • product.base.oracleSpec.oracleAddress (required per network)
  • product.base.oracleSpec.fsvDecimals, fspAlpha, fspBeta, fsvCalldata
  • product.base.collateralAsset (required per network)
  • product.base.startTime (UTC ISO 8601, Z)
  • product.base.pointValue
  • product.base.priceDecimals
  • product.base.extendedMetadata (CID, filled after pinning)
  • product.expirySpec.earliestFSPSubmissionTime (UTC ISO 8601, Z)
  • product.expirySpec.tradeoutInterval
  • product.minPrice < product.maxPrice

Build extended metadata (snake_case)

Extended metadata fields are outcome_space, outcome_point, oracle_config, and oracle_fallback. These are pinned on IPFS and referenced by CID.

Outcome space and point

Time series (scalar):

  • outcome_space: OutcomeSpaceTimeSeries

- fsp_type: "scalar" - description - base_case.condition and base_case.fsp_resolution - edge_cases (optional) - units, source_name, source_uri - frequency: daily, weekly, fortnightly, semimonthly, monthly, quarterly, yearly - history_api_spec (optional for backing data)

  • outcome_point: OutcomePointTimeSeries

- fsp_type: "scalar" - observation.reference_date and observation.release_date (YYYY-MM-DD)

Event (binary or ternary):

  • outcome_space: OutcomeSpace

- fsp_type: "binary" or "ternary" - description - base_case.condition and base_case.fsp_resolution - edge_cases (optional)

  • outcome_point: OutcomePointEvent

- fsp_type: "binary" or "ternary" - outcome (specific candidate or yes/no outcome)

Template variables in conditions must resolve against outcome_point fields. Example: {outcome} for events, {observation.release_date} for time series.

Oracle config

Manual resolution:

  • oracle_config: OracleConfig

- description - project_url (optional)

API-backed resolution:

  • oracle_config: OracleConfigPrototype1

- description - project_url (optional) - evaluation_api_spec: ApiSpecJSONPath - spec_variant: "product-fsv" - url, date_path, value_path - date_format_type: iso_8601 | unix_timestamp | custom - timestamp_scale if unix timestamps are ms - auth_param_location: none | query | header - auth_param_name / auth_param_prefix if needed

For time series, history_api_spec (OutcomeSpaceTimeSeries) should use spec_variant: "underlying-history" when you include it.

Oracle fallback

  • oracle_fallback.fallback_time must be at least 7 days after earliestFSPSubmissionTime.
  • oracle_fallback.fallback_fsp must be within [minPrice, maxPrice].

API spec guidance

  • Use JSONPath strings that select parallel arrays for dates and values.
  • Prefer APIs that return ISO 8601 dates or UNIX timestamps to avoid custom parsing.
  • Verify the URL is reachable (HEAD request succeeds).
  • Prefer no-auth or free-access endpoints for Forecastathon.
  • See references/api-sources.md for vetted examples.

IPFS pinning (DAG-CBOR required)

Extended metadata must be pinned as a DAG-CBOR DAG, not a single JSON blob. The AFP SDK handles this automatically by encoding and pinning each component and the root DAG:

import afp

app = afp.AFP(
    rpc_url=AUTONITY_RPC_URL,
    authenticator=afp.PrivateKeyAuthenticator(PRIVATE_KEY),
    ipfs_api_url=IPFS_API_URL,
    ipfs_api_key=IPFS_API_KEY,
)
product_api = app.Product()

spec = product_api.validate(product_dict)
pinned = product_api.pin(spec)  # builds and pins DAG-CBOR

If you build the DAG manually, ensure you store it as dag-cbor (e.g., ipfs dag put default store codec) and include schema CIDs for each component.

Validation and output

  1. Use Product.validate or Product.validate_json to enforce schemas.
  2. Ensure business rules and Forecastathon constraints pass.
  3. Use Product.dump_json for canonical JSON output.
import afp

product_api = afp.AFP(...).Product()
spec = product_api.validate(product_dict)
pinned = product_api.pin(spec)
product_json = product_api.dump_json(pinned)

Deliverables

  • Complete product JSON with extendedMetadata CID filled in.
  • Clear explanation of outcome_space resolution and data source.
  • Validation checklist confirmation (see references/validation-checklist.md).

References

  • Public API options and JSONPath examples: references/api-sources.md
  • Validation checklist and constraints: references/validation-checklist.md

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

37.96%
按下载量换算28

Claude

29.17%
按下载量换算21

Cursor

19.54%
按下载量换算14

Gemini CLI

9.81%
按下载量换算7

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills