mdcms-mdx-components

mdcms-mdx-components is a skill for Claude Code, Codex from mdcms-ai/mdcms. It costs 150 tokens per session (1,611 once invoked), scanned A, original, MIT.

A workflow for registering custom React components in MDX, a Markdown format that can include interactive components. It connects those components to the authoring files, MDCMS Studio preview, and the host app's rendered output.

In plain words
What is it for?
Use it to register components such as callouts, buttons, charts, or videos so they can be authored, previewed, and rendered consistently.
Why use it?
It prevents a custom component from working in only one place, such as the website but not the editor preview.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/mdcms-ai/mdcms/mdcms-mdx-components
Any agent
npx skills add mdcms-ai/mdcms --skill mdcms-mdx-components
Clone the repo
git clone --depth 1 https://github.com/mdcms-ai/mdcms

Made for: Claude Code, 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 mdcms-mdx-components

README.md
[![agentmods](https://agentmods.dev/badge/skills/mdcms-ai/mdcms/mdcms-mdx-components.svg)](https://agentmods.dev/skills/mdcms-ai/mdcms/mdcms-mdx-components)
Your own site
<a href="https://agentmods.dev/skills/mdcms-ai/mdcms/mdcms-mdx-components"><img src="https://agentmods.dev/badge/skills/mdcms-ai/mdcms/mdcms-mdx-components.svg" alt="Measured on agentmods" height="20"></a>
Per session 150 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,611 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00150 $0.01611
Opus 5 $0.00075 $0.00805
Sonnet 5 $0.00030 $0.00322
Haiku 4.5 $0.00015 $0.00161

Measured 4d ago against content hash 0948b95c1c3f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

mdcms-mdx-components 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 4d 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.

skills/mdcms-mdx-components/SKILL.md · 134 lines

How it starts

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

MDCMS MDX Components

Register custom React components so they render consistently inside:

  1. The author's MDX source files,
  2. The Studio preview (editors see them in the visual editor), and
  3. The host app's SSR / CSR output (production renders them too).

When to use this skill

The user has MDX content that uses custom components (<Callout>, <CTAButton>, <Chart>, <Video>) and wants them to "just work" end to end. Also use when a component renders fine in one place (e.g., the host app) but not another (e.g., Studio shows the raw tag or empty content).

Not for schema changes (mdcms-schema-refine) or for regular markdown (no registration needed).

Prerequisites

  • mdcms.config.ts exists (run mdcms-brownfield-init or mdcms-greenfield-init first).
  • Host app already has MDX rendering set up (or is willing to add it — see the target framework's MDX integration).
  • Each custom component is a React component in the host app's source tree.

How components flow

The MDCMS contract is: components are declared once, in a shared module, and referenced from both mdcms.config.ts and the host app's MDX runtime. Studio reads the config to know which components exist and how to render them in preview; the host app reads the same registry to render them in production.

The apps/studio-example repo demonstrates the current pattern — treat it as the canonical reference when file paths or export names change.

Steps

1. Create a shared components module

Create a single source of truth for component metadata and implementations:

// lib/mdcms-components.ts
import { Callout } from "@/components/callout";
import { CTAButton } from "@/components/cta-button";

export const mdcmsComponents = [
  {
    name: "Callout",
    component: Callout,
  },
  {
    name: "CTAButton",
    component: CTAButton,
  },
];

Exact shape (keys like name, component, extractedProps) comes from @mdcms/studio's component contract — check apps/studio-example/lib/*-studio-config.ts for the current field set. Do not invent fields; copy from the reference.

Read the full file on GitHub · 134 lines

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. 4d ago First seen · 134 lines · 150 tokens per session scan A 0948b95c1c3f

Subscribe to this mod's changes

mdcms-mdx-components is a skill published in the GitHub repository mdcms-ai/mdcms (22 stars, last pushed 5d ago), licensed MIT. It adds 150 tokens to every session and 1,611 once invoked, about $0.0007 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-08-30.

Related

Other skills, from other repositories

webiny-api-cms-content-models

Creating Headless CMS content models via code using the ModelFactory pattern. Use this skill when the developer wants to create, modify, or understand content model definitions, define fields and validators, set up reference fields between models, configure field layouts (including nested layouts inside object or…

webiny/webiny-js · 297 tokens

webiny-form-model

Building forms with the FormModel system — field types, renderers, layout, validation, conditional rules, computed fields, and dynamic zones. Use this skill when the developer needs to define form fields with the builder API, choose renderers, build layouts with tabs/rows/separators, add validation (Zod or…

webiny/webiny-js · 93 tokens

webiny-api-architect

The hub skill for all API/backend architecture in Webiny. Covers architecture overview, Services vs UseCases, feature naming and organization, feature structure templates, DI decision tree, anti-patterns, createFeature, createAbstraction, container registration, domain errors, entity patterns, naming conventions…

webiny/webiny-js · 90 tokens

webiny-admin-architect

Admin-side architecture patterns for Webiny extensions. Use this skill when building frontend features with headless features (UseCase/Repository/Gateway), presentation features (Presenter/ViewModel/hooks/components), MobX-based presenters, RegisterFeature, and Admin BuildParams. Covers the admin/ directory structure…

webiny/webiny-js · 71 tokens

webiny-v5-to-v6-migration

Migration patterns for converting v5 Webiny code to v6 architecture. Use this skill when migrating existing v5 plugins to v6 features, converting context plugins to DI services, adapting v5 event subscriptions to v6 EventHandlers, or understanding how v5 patterns translate to v6. Targeted at AI agents performing…

webiny/webiny-js · 75 tokens

webiny-cognito-federation

Configuring Cognito Federation for Webiny projects — federated sign-in via external identity providers (Google, Facebook, Apple, Amazon, OIDC/Entra ID) while keeping Cognito as the user pool. Use this skill when the developer asks about Cognito federation, SSO with Cognito, adding Google/Microsoft/OIDC login to…

webiny/webiny-js · 126 tokens