一键导入
new-article
Create a new MDX article with frontmatter, example embeds, and custom components. Use when writing in-depth UX guides or tutorials.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Create a new MDX article with frontmatter, example embeds, and custom components. Use when writing in-depth UX guides or tutorials.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | new-article |
| description | 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.