mdcms-studio-embed

A workflow for placing the MDCMS Studio editing interface inside a React application, such as a Next.js site. Editors can use the content-management interface under a route in the host app, such as /admin.

In plain words
What is it for?
Use it to add an embedded Studio route to a React, Next.js, or Remix application and connect it to an MDCMS server.
Why use it?
It avoids making editors switch to a separate site and explains the app route, package setup, and server access configuration needed for embedding.

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-studio-embed
Any agent
npx skills add mdcms-ai/mdcms --skill mdcms-studio-embed
Clone the repo
git clone --depth 1 https://github.com/mdcms-ai/mdcms

Made for: Claude Code, Codex.

Per session 114 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,777 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.00114 $0.01777
Opus 5 $0.00057 $0.00889
Sonnet 5 $0.00023 $0.00355
Haiku 4.5 $0.00011 $0.00178

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

Security

Grade A, and why

mdcms-studio-embed 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.

skills/mdcms-studio-embed/SKILL.md · 131 lines

How it starts

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

MDCMS Studio Embed

Mount the MDCMS Studio UI inside the user's own host app so editors work alongside product code. The canonical reference is apps/studio-example in the MDCMS repo — use it as the copy-from template for route structure, config preparation, and client bootstrap.

When to use this skill

The user wants a Studio UI under their own domain (e.g. app.example.com/admin/...) instead of running Studio standalone. If they only need the API and use Studio at the server's own /admin/studio route, skip.

Prerequisites

  • A reachable MDCMS server and a working mdcms.config.ts (run mdcms-brownfield-init or mdcms-greenfield-init first).
  • A React app, ideally Next.js App Router. Other frameworks work but the reference implementation is Next.
  • Ability to set server-side env vars on the MDCMS backend (for MDCMS_STUDIO_ALLOWED_ORIGINS).

Steps

1. Install the Studio package in the host app

npm install @mdcms/studio
# or: bun add @mdcms/studio

2. Add a catch-all route

Studio is a single page app embedded at a catch-all route. The reference uses /admin/[[...path]] so every Studio route is served from one Next page. Copy the pattern from apps/studio-example/app/admin/[[...path]] in the MDCMS repo:

app/
  admin/
    [[...path]]/
      page.tsx        # server component that prepares Studio config
      layout.tsx      # minimal layout (Studio brings its own chrome)
    admin-studio-client.tsx   # client wrapper that mounts <Studio />
    studio-config.ts          # prepareStudioConfig + client-serialized subset

The server component calls prepareStudioConfig from @mdcms/studio/runtime against the full mdcms.config.ts, extracts a client-safe subset (component metadata, schema hash, route metadata), and passes it to the client wrapper.

3. Wire the prepared config to <Studio />

The client wrapper uses the <Studio /> component and the prepared config:

"use client";
import { Studio } from "@mdcms/studio";
import type { MdcmsConfig } from "@mdcms/studio";

export function AdminStudioClient({ config }: { config: MdcmsConfig }) {
  return <Studio config={config} />;
}

Read the full file on GitHub · 131 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. 2d ago First seen · 131 lines · 114 tokens per session scan A 6bdaa93380dd

Subscribe to this mod's changes

mdcms-studio-embed is a skill published in the GitHub repository mdcms-ai/mdcms (22 stars, last pushed 4d ago), licensed MIT. It adds 114 tokens to every session and 1,777 once invoked, about $0.0006 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

Shade imports

Import Shade from layer-specific subpaths (primitives, components, patterns, page-templates, utils), never the root barrel. Trigger when editing TSX/TS in Shade-consuming apps.

TryGhost/Ghost · 41 tokens

intlayer-next-js

Integrates Intlayer internationalization with Next.js App Router and Pages Router. Use when the user asks to "setup Next.js i18n", use "useIntlayer" in Server Components, or handle client-side translations in Next.js.

aymericzip/intlayer · 53 tokens

intlayer-react

Integrates Intlayer internationalization with React component. Use when the user asks to "setup React i18n", create a new translated component, use the "useIntlayer" hook, or configure providers.

aymericzip/intlayer · 46 tokens

react-effect-decision

Combine React's official "You Might Not Need an Effect" guidance with this project's stricter no direct useEffect stance. Use when writing, reviewing, or refactoring React components that might reach for useEffect, derived state, event relays, reset logic, subscriptions, or client fetching.

waynesutton/markdown-site · 63 tokens

dev

Full-stack Convex development guidelines covering React, Vite, TypeScript, mutations, auth, design system, and documentation practices. Use when building features, writing Convex functions, or making code changes in this project.

waynesutton/markdown-site · 46 tokens

Shade ShadCN install

Guardrails for running pnpm dlx shadcn@latest add in Shade — never overwrite existing components, fresh branch first, swap raw colours for semantic tokens after integrating. Trigger when the user proposes a shadcn add, or when a fresh ShadCN-shaped file lands in apps/shade/src/components/ui.

TryGhost/Ghost · 72 tokens