Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion docs/skills.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ This repository ships one canonical skill for UXC (Universal X-Protocol CLI) and
- Wrapper for DexScreener public market data and DEX pair reads via UXC + curated OpenAPI schema and no-auth setup.
- `skills/helius-openapi-skill`
- Wrapper for Helius Wallet API wallet intelligence reads via UXC + curated OpenAPI schema and API-key auth.
- `skills/blocknative-openapi-skill`
- Wrapper for Blocknative gas price and fee intelligence reads via UXC + curated OpenAPI schema and API-key auth.
- `skills/alchemy-openapi-skill`
- Wrapper for Alchemy Prices API read workflows via UXC + curated OpenAPI schema and path-templated API-key auth.
- `skills/chainbase-openapi-skill`
Expand Down Expand Up @@ -87,7 +89,7 @@ python ~/.codex/skills/.system/skill-installer/scripts/install-skill-from-github
--path skills/deepwiki-mcp-skill
```

Replace `skills/deepwiki-mcp-skill` with `skills/context7-mcp-skill`, `skills/okx-mcp-skill`, `skills/dune-mcp-skill`, `skills/thegraph-mcp-skill`, `skills/thegraph-token-mcp-skill`, `skills/etherscan-mcp-skill`, `skills/notion-mcp-skill`, `skills/discord-openapi-skill`, `skills/slack-openapi-skill`, `skills/matrix-openapi-skill`, `skills/line-openapi-skill`, `skills/feishu-openapi-skill`, `skills/whatsapp-openapi-skill`, `skills/dingtalk-openapi-skill`, `skills/coingecko-openapi-skill`, `skills/defillama-openapi-skill`, `skills/blockscout-openapi-skill`, `skills/chainbase-openapi-skill`, `skills/moralis-openapi-skill`, `skills/alchemy-openapi-skill`, `skills/coinapi-openapi-skill`, `skills/dexscreener-openapi-skill`, `skills/helius-openapi-skill`, `skills/binance-web3-openapi-skill`, or `skills/binance-spot-openapi-skill` as needed.
Replace `skills/deepwiki-mcp-skill` with `skills/context7-mcp-skill`, `skills/okx-mcp-skill`, `skills/dune-mcp-skill`, `skills/thegraph-mcp-skill`, `skills/thegraph-token-mcp-skill`, `skills/etherscan-mcp-skill`, `skills/notion-mcp-skill`, `skills/discord-openapi-skill`, `skills/slack-openapi-skill`, `skills/matrix-openapi-skill`, `skills/line-openapi-skill`, `skills/feishu-openapi-skill`, `skills/whatsapp-openapi-skill`, `skills/dingtalk-openapi-skill`, `skills/coingecko-openapi-skill`, `skills/defillama-openapi-skill`, `skills/blockscout-openapi-skill`, `skills/chainbase-openapi-skill`, `skills/moralis-openapi-skill`, `skills/alchemy-openapi-skill`, `skills/coinapi-openapi-skill`, `skills/dexscreener-openapi-skill`, `skills/helius-openapi-skill`, `skills/blocknative-openapi-skill`, `skills/binance-web3-openapi-skill`, or `skills/binance-spot-openapi-skill` as needed.

After installation, restart Codex to load new skills.

Expand Down Expand Up @@ -200,6 +202,12 @@ bash skills/dexscreener-openapi-skill/scripts/validate.sh
bash skills/helius-openapi-skill/scripts/validate.sh
```

- Validate Blocknative wrapper docs when touched:

```bash
bash skills/blocknative-openapi-skill/scripts/validate.sh
```

- Validate Alchemy wrapper docs when touched:

```bash
Expand Down
114 changes: 114 additions & 0 deletions skills/blocknative-openapi-skill/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
---
name: blocknative-openapi-skill
description: Operate Blocknative gas intelligence APIs through UXC with a curated OpenAPI schema, API-key auth, and read-first guardrails.
---

# Blocknative Gas Platform Skill

Use this skill to run Blocknative gas intelligence operations through `uxc` + OpenAPI.

Reuse the `uxc` skill for shared execution, auth, and error-handling guidance.

## Prerequisites

- `uxc` is installed and available in `PATH`.
- Network access to `https://api.blocknative.com`.
- Access to the curated OpenAPI schema URL:
- `https://raw.githubusercontent.com/holon-run/uxc/main/skills/blocknative-openapi-skill/references/blocknative-gas.openapi.json`
- A Blocknative API key for the full v1 surface.

## Scope

This skill covers a read-first Blocknative gas intelligence surface:

- supported chain discovery
- gas price confidence estimates
- base fee and blob fee prediction
- pending gas distribution analysis

This skill does **not** cover:

- write operations
- transaction submission
- mempool event streaming
- broader Blocknative product areas outside the selected gas platform endpoints

## Authentication

Blocknative uses `Authorization` header auth. Some discovery and gas reads can work without a key, but this skill standardizes on authenticated requests because `basefee-estimates` and `distribution` require a valid API key.

Configure one API-key credential and bind it to `api.blocknative.com`:

```bash
uxc auth credential set blocknative \
--auth-type api_key \
--api-key-header Authorization \
--secret-env BLOCKNATIVE_API_KEY

uxc auth binding add \
--id blocknative \
--host api.blocknative.com \
--scheme https \
--credential blocknative \
--priority 100
```

Validate the active mapping when auth looks wrong:

```bash
uxc auth binding match https://api.blocknative.com
```

## Core Workflow

1. Use the fixed link command by default:
- `command -v blocknative-openapi-cli`
- If missing, create it:
`uxc link blocknative-openapi-cli https://api.blocknative.com --schema-url https://raw.githubusercontent.com/holon-run/uxc/main/skills/blocknative-openapi-skill/references/blocknative-gas.openapi.json`
- `blocknative-openapi-cli -h`

2. Inspect operation schema first:
- `blocknative-openapi-cli get:/chains -h`
- `blocknative-openapi-cli get:/gasprices/blockprices -h`
- `blocknative-openapi-cli get:/gasprices/basefee-estimates -h`

3. Prefer narrow validation before broader polling:
- `blocknative-openapi-cli get:/chains`
- `blocknative-openapi-cli get:/gasprices/blockprices chainid=1`
- `blocknative-openapi-cli get:/gasprices/basefee-estimates`

4. Execute with key/value parameters:
- `blocknative-openapi-cli get:/gasprices/blockprices chainid=1 confidenceLevels=70,90,99`
- `blocknative-openapi-cli get:/gasprices/blockprices system=story network=mainnet`
- `blocknative-openapi-cli get:/gasprices/distribution chainid=1`

## Operation Groups

### Discovery

- `get:/chains`

### Gas Intelligence

- `get:/gasprices/blockprices`
- `get:/gasprices/basefee-estimates`
- `get:/gasprices/distribution`

## Guardrails

- Keep automation on the JSON output envelope; do not use `--text`.
- Parse stable fields first: `ok`, `kind`, `protocol`, `data`, `error`.
- Treat this v1 skill as read-only. Do not imply transaction sending or execution support.
- `blockprices` can be polled without auth on some plans, but `basefee-estimates` and `distribution` require a valid key. Standardize on auth so mixed workflows do not fail mid-run.
- These endpoints update at most once per second on paid plans and more slowly on free plans; avoid tight polling loops that only return stale data.
- `distribution` is Ethereum-mainnet focused in the current docs. Do not assume multi-chain coverage there just because `blockprices` supports many chains.
- Keep `confidenceLevels` narrow and explicit when you do not need the full default ladder.
- `blocknative-openapi-cli <operation> ...` is equivalent to `uxc https://api.blocknative.com --schema-url <blocknative_openapi_schema> <operation> ...`.

## References

- Usage patterns: `references/usage-patterns.md`
- Curated OpenAPI schema: `references/blocknative-gas.openapi.json`
- Blocknative Gas Price API docs: https://docs.blocknative.com/gas-prediction/gas-platform
- Blocknative Base Fee API docs: https://docs.blocknative.com/gas-prediction/prediction-api-base-fee-and-blob-fee
- Blocknative Gas Distribution API docs: https://docs.blocknative.com/gas-prediction/gas-distribution-api
4 changes: 4 additions & 0 deletions skills/blocknative-openapi-skill/agents/openai.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
interface:
display_name: "Blocknative Gas Platform"
short_description: "Operate Blocknative gas price and fee intelligence reads via UXC + curated OpenAPI schema"
default_prompt: "Use $blocknative-openapi-skill to discover and execute Blocknative gas intelligence read-only operations through UXC with Authorization header auth and polling guardrails."
Loading
Loading