wp-block-bindings-api

wp-block-bindings-api is a skill for Codex from Lonsdale201/wp-agent-skills. It costs 77 tokens per session (1,633 once invoked), scanned A, original, MIT.

A guide to WordPress Block Bindings, which connect supported block attributes to changing data such as post fields, custom tables, or remote sources.

In plain words
What is it for?
Use it to register data sources, bind values in block markup, check permissions, handle context, and cache dynamic block data.
Why use it?
It keeps displayed values dynamic without replacing the whole block, while making clear that bindings do not store data or enable unsupported attributes.

Skill for Codex

Written for Codex: agents/openai.yaml present.

Good fit Use it to register data sources, bind values in block markup, check permissions, handle context, and cache dynamic block data.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/lonsdale201/wp-agent-skills/wp-block-bindings-api
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Lonsdale201/wp-agent-skills --skill wp-block-bindings-api
Clone the repo
git clone --depth 1 https://github.com/Lonsdale201/wp-agent-skills

Made for: Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for wp-block-bindings-api

README.md
[![agentmods](https://agentmods.dev/badge/skills/lonsdale201/wp-agent-skills/wp-block-bindings-api/github.svg)](https://agentmods.dev/skills/lonsdale201/wp-agent-skills/wp-block-bindings-api)
Your own site
<a href="https://agentmods.dev/skills/lonsdale201/wp-agent-skills/wp-block-bindings-api"><img src="https://agentmods.dev/badge/skills/lonsdale201/wp-agent-skills/wp-block-bindings-api/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for wp-block-bindings-api

Your own site · 80×15
<a href="https://agentmods.dev/skills/lonsdale201/wp-agent-skills/wp-block-bindings-api"><img src="https://agentmods.dev/badge/skills/lonsdale201/wp-agent-skills/wp-block-bindings-api.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 77 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,633 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00077 $0.01633
Opus 5 $0.00039 $0.00816
Sonnet 5 $0.00015 $0.00327
Haiku 4.5 $0.00008 $0.00163

Measured 2d ago against content hash d67d0aa733af, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

wp-block-bindings-api scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

wordpress/wp-block-bindings-api/SKILL.md · 146 lines

How it starts

The opening of the file, as written. The whole thing — 146 lines — stays where its author put it; the contents beside it link to each section on GitHub.

WordPress Block Bindings API

Block Bindings replace selected block attributes at render time from a registered data source. Use them when content should stay dynamic while remaining a normal block. They do not persist data by themselves and do not make an unsupported attribute bindable automatically.

Decide before implementing

Need Use
Bind a supported block attribute to dynamic data Block Bindings
Change the complete rendered structure Dynamic block render.php
Store and validate a custom field Metadata/REST registration plus a binding
Merely transform final HTML Render filter or HTML API

Register the server source

Register on init. The name must be lowercase namespace/name and the callback must be callable.

add_action( 'init', static function (): void {
    register_block_bindings_source(
        'acme/catalog-field',
        array(
            'label'              => __( 'Catalog field', 'acme' ),
            'uses_context'       => array( 'postId' ),
            'get_value_callback' => static function ( array $args, WP_Block $block, string $attribute ) {
                $allowed = array( 'sku', 'subtitle' );
                $key     = isset( $args['key'] ) ? sanitize_key( $args['key'] ) : '';

                if ( ! in_array( $key, $allowed, true ) ) {
                    return null;
                }

                $post_id = isset( $block->context['postId'] ) ? (int) $block->context['postId'] : 0;
                return $post_id ? get_post_meta( $post_id, '_acme_' . $key, true ) : null;
            },
        )
    );
} );

The callback receives binding args, the current WP_Block, and the target attribute name. The args originate in block content and are untrusted. Allowlist keys, validate IDs, and return null when no safe value is available.

Bind the attribute

<!-- wp:paragraph {"metadata":{"bindings":{"content":{"source":"acme/catalog-field","args":{"key":"subtitle"}}}}} -->
<p>Fallback subtitle</p>
<!-- /wp:paragraph -->

Read the full file on GitHub · 146 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 146 lines · 77 tokens per session scan A d67d0aa733af

Subscribe to this mod's changes

wp-block-bindings-api is a skill published in the GitHub repository Lonsdale201/wp-agent-skills (22 stars, last pushed 2d ago), licensed MIT. It adds 77 tokens to every session and 1,633 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-11.

Related

Other skills, from other repositories

airflow-plugins

Builds Airflow 3.1+ plugins that embed FastAPI apps, custom UI pages, React components, middleware, macros, and operator links directly into the Airflow UI. Use when building anything custom inside Airflow 3.1+ that involves Python and a browser-facing interface - creating an Airflow plugin, adding a custom UI page or…

astronomer/agents · 147 tokens

nextjs-app-router

Provides patterns and code examples for building Next.js 16+ applications with App Router architecture. Use when creating projects with App Router, implementing Server Components and Client Components ("use client"), creating Server Actions for forms, building Route Handlers (route.ts), configuring caching with "use…

giuseppe-trisciuoglio/developer-kit · 112 tokens

nextjs-data-fetching

Provides Next.js App Router data fetching patterns including SWR and React Query integration, parallel data fetching, Incremental Static Regeneration (ISR), revalidation strategies, and error boundaries. Use when implementing data fetching in Next.js applications, choosing between server and client fetching, setting…

giuseppe-trisciuoglio/developer-kit · 71 tokens

nextjs-patterns

Next.js best practices, server components, app router patterns, caching strategies, and full-stack architecture.

cosmicstack-labs/mercury-agent-skills · 24 tokens

yida-canvas-data-binding

A method for connecting a YidaCodeCanvas page to real data from Yida forms, connectors, or same-site APIs. YidaCodeCanvas is the component used to run custom React pages inside Yida.

openyida/openyida · 134 tokens

openyida

A skill for creating and changing applications on 宜搭 (Yida), a Chinese low-code platform for building business apps with less hand-written code. It first checks the available tools, login status, project folder, and target application before making changes.

openyida/openyida · 197 tokens