x-article
Format a post for an X Article
X Articles only support two heading levels ("heading" and "subheading") plus bold text, and images must be uploaded one at a time. This skill produces a clean markdown file and a folder of ordered images so the user can copy/paste text and drag images in order.
The user will provide a post — a slug, a filename, or a path under contents/blog/ or contents/newsletter/: $ARGUMENTS
Step 1: Locate the source
Find the source file under contents/blog/ or contents/newsletter/ (extension may be .md or .mdx). If the argument is ambiguous or matches multiple files, ask which one. Note whether it came from blog or newsletter — the CTA in Step 4 only applies to newsletters.
Read the full file.
Step 2: Set up the output
Derive {slug} from the source filename (without extension). Create the output folder x-articles/{slug}/ (relative to repo root) and an images/ subfolder inside it.
Step 3: Write x-articles/{slug}/article.md
Transform the source body into the article file: