Create a new MDX article with frontmatter, example embeds, and custom components. Use when writing in-depth UX guides or tutorials.
This skill helps you create in-depth UX guide articles using MDX.
Articles require 2 things:
src/pages/article/{slug}.mdxsrc/articles.tsOptionally, custom interactive components in src/components/articles/
Create src/pages/article/{slug}.mdx:
---
layout: "@/layouts/ArticleLayout.astro"
title: "Article Title"
description: "Brief description for SEO and article list"
---
import { ExampleEmbed } from "@/components/articles/ExampleEmbed";
# Article Title
Introduction paragraph explaining what this guide covers.
## Section 1
Content with **bold** and *italic* text.
<ExampleEmbed id="existing-example-id" client:load />
### Subsection
- Bullet points
- For key takeaways
## Section 2
More content...
export const articles: Article[] = [
// ... existing articles
{
slug: "my-article-slug", // Must match filename without .mdx
title: "Article Title",
description: "Brief description",
tags: ["Tag1", "Tag2"],
createdAt: "YYYY-MM-DD", // Today's date in ISO format
},
];
Use ExampleEmbed to include existing UX pattern examples:
import { ExampleEmbed } from "@/components/articles/ExampleEmbed";
<ExampleEmbed id="verification-code-input" client:load />
The id must match an existing example in src/examples/.
Important: Always add client:load for React components in MDX.
For complex interactive elements, create components in src/components/articles/:
src/components/articles/
├── ExampleEmbed.tsx # Embed existing examples
├── EmailComparison.tsx # Custom comparison component
├── UltimateOtpDemo.tsx # Custom demo component
└── ux-speed-game/ # Complex multi-file component
├── index.tsx
├── Game.tsx
└── ...
Then import in your MDX:
import { MyCustomComponent } from "@/components/articles/MyCustomComponent";
<MyCustomComponent client:load />
#, ##, ### for headings**bold**, *italic*- item for bullet lists1. item for numbered lists`code` for inline codeclient:load for interactivity<Component />---
layout: "@/layouts/ArticleLayout.astro"
title: "Page title (shown in browser tab)"
description: "SEO description"
---
<ExampleEmbed /> to show patternsprose classes handle typography automatically--- (horizontal rules) are hidden by defaultCheck src/examples/index.ts for all available example IDs to embed.
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer