afp-product-builder

Compose AFP product JSON with on-chain metadata and IPFS pinning.

2|Updated Aug 22, 2025
One-click install
npx skills add https://github.com/autonity/afp-sdk --skill afp-product-builder
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: afp-product-builder
Source: https://github.com/autonity/afp-sdk/tree/main/skills/afp-product-builder
Command: npx skills add https://github.com/autonity/afp-sdk --skill afp-product-builder

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Building AFP products for Forecastathon requires assembling on-chain product definitions, extended metadata, and IPFS pinning so that the final specification is valid, verifiable, and deployable.

Core Features & Use Cases

  • Compose on-chain product definitions using PredictionProductV1 and extended metadata DAGs.
  • Pin and publish extended metadata to IPFS as a DAG-CBOR, producing a CID for on-chain consumption.
  • Validate product JSON against the AFP schemas, generate canonical output, and prepare for registration or testing.
  • Use for selecting public data sources, IPFS pinning, and API-backed resolution rules for Forecastathon.

Quick Start

Create a complete AFP product specification and pin the resulting DAG-CBOR to IPFS.

Frequently Asked Questions about afp-product-builder

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build AFP products from on-chain metadata for Forecastathon?

To build AFP products for Forecastathon, you compose on-chain product definitions using PredictionProductV1, assemble extended metadata DAGs, and validate the resulting product JSON against AFP schemas for registration readiness.

How does IPFS pinning work for on-chain product metadata?

IPFS pinning publishes your extended metadata as a DAG-CBOR, producing a verifiable content identifier (CID) that can be consumed on-chain to link the smart contract with off-chain product specifications.

Do I need Python and afp-sdk to compose on-chain product definitions?

Yes, composing on-chain product definitions and validating AFP product JSON requires Python 3.12 or higher, the afp-sdk installed, internet access, and a configured IPFS pinning endpoint to publish metadata.

What is the best way to validate AFP product JSON against schemas?

The best way to validate AFP product JSON is by using afp-sdk to check the structure against AFP schemas, which generates canonical output and ensures your extended metadata DAGs meet registration and testing requirements.

Can I use API-backed resolution rules to select public data sources for Forecastathon?

Yes, you can configure API-backed resolution rules and select public data sources when preparing your AFP product specification, ensuring the extended metadata correctly resolves required Forecastathon data inputs.

Why does my AFP product JSON validation fail before IPFS pinning?

AFP product JSON validation fails when the structure does not conform to AFP schemas or when the extended metadata DAGs are incomplete, preventing canonical output generation and successful DAG-CBOR pinning to IPFS.