一键导入
new-blog-post
Scaffold and write a new MDX blog post. Use when asked to create a blog post, write an article, or add content to the posts collection.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Scaffold and write a new MDX blog post. Use when asked to create a blog post, write an article, or add content to the posts collection.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Build, preview, and verify the jmrp.io Astro 7 project. Use when asked to build, deploy, or run the QA pipeline.
Debug Content Security Policy (CSP) and Subresource Integrity (SRI) issues in the jmrp.io project
Create a new reusable Astro UI component in src/components/ui/. Use when asked to add a component, build a UI element, or extend the component library.
Run accessibility audits and fix WCAG 2.2 AA violations. Use when asked about accessibility, a11y, WCAG, or axe-core issues.
Add or update translations for the EN/ES bilingual system. Use when asked about translations, missing keys, locale routing, hardcoded strings, or adding a new language.
| name | new-blog-post |
| description | Scaffold and write a new MDX blog post. Use when asked to create a blog post, write an article, or add content to the posts collection. |
| argument-hint | [topic] [tags] |
Create a new MDX blog post for jmrp.io.
ls src/content/posts/en/ | grep -E '^[0-9]{3}-' | sort | tail -3
Take the highest number and increment by 1. Skip 999-testing-components.mdx — that is
a permanent test fixture, not a real post.
Path: src/content/posts/en/NNN-your-slug.mdx. Use src/content/posts/en/_template.mdx
as the base. A complete, GEO-optimized post carries this frontmatter:
---
title: "Post Title"
slug: "NNN-post-slug" # MUST start with the NNN- numeric prefix
publishedDate: 2025-01-15
description: "SEO description — must be ≤ 155 characters"
tags: ["tag1", "tag2"]
draft: true
# --- GEO / structured-data fields (see "What every post must include") ---
articleType: "TechArticle" # technical guide/tutorial; "BlogPosting" for narrative
proficiencyLevel: "Intermediate" # Beginner | Intermediate | Expert (optional)
topics: # Wikidata-linked topics — first = about, rest = mentions
- name: "Topic Name"
wikidata: "Q12345" # VERIFIED bare Q-id
faq: # genuine Q&A about THIS post → FAQ section + FAQPage JSON-LD
- question: "A real question a reader would ask?"
answer: "A concise, self-contained answer."
---
import TLDRSummary from "@components/ui/TLDRSummary.astro";
import Callout from "@components/ui/Callout.astro";
A short intro paragraph (the "entradilla") that frames the problem and why it matters.
<TLDRSummary>
One-paragraph, self-contained summary of the key takeaway (the answer-target).
</TLDRSummary>
## Introduction
...
## Conclusion
...
The visible FAQ section, the
TechArticle/FAQPage/HowToJSON-LD, theabout/mentionstopic linking, the author bio card, and the References list are all rendered automatically byBlogPost.astrofrom the frontmatter — do NOT add<FAQ>,<AuthorCard>, or hand-written schema in the MDX body.
These are required for the site's GEO / accessibility / structured-data standards:
<TLDRSummary> near the top, after a short
intro paragraph (the "entradilla") and before the first ## heading. It renders
as an <h2> answer-target that AI engines extract — make it a self-contained
summary of the conclusion, not a "what you'll learn" preview. (Consistent
format across the blog: cover → intro → TL;DR → body.)articleType — set "TechArticle" for engineering guides/tutorials (the
norm here); leave the default "BlogPosting" only for narrative/opinion posts.topics (Wikidata Q-ids) — 1 primary (about) + up to 5 secondary
(mentions), max 6. Each { name, wikidata }. Verify every Q-id resolves to
the intended entity before using it (a wrong Q-id is worse than none):
https://www.wikidata.org/w/api.php?action=wbsearchentities&search=<term>&language=en&format=json&limit=5faq — a handful of genuine questions a reader would ask, with concise
self-contained answers. Rendered as a collapsible FAQ at the end + emitted as
FAQPage JSON-LD. Only real Q&A — never padding.howto (step-by-step guides only) — mirror the post's ordered steps into a
HowTo graph node (name, optional totalTime ISO-8601, tools, supplies,
and steps[] { name, text, anchor }). The visible steps stay in the body.src/content/posts/es/NNN-*.mdx),
it carries its OWN faq (translated) and the SAME topics Q-ids (English Wikidata
labels, identical Q-ids in both locales).| Field | Constraint |
|---|---|
title | Required |
slug | Required — must start with the NNN- numeric prefix, unique across posts |
publishedDate | Required — format YYYY-MM-DD |
description | Recommended — ≤ 155 characters (enforced by content-integrity.spec.ts) |
draft | true while writing; remove or set false to publish |
tags | Optional array of lowercase strings |
updatedDate | Optional — set when revising a published post (emits a real dateModified; otherwise dateModified falls back to publishedDate) |
coverImage | Optional — relative image (rendered as an AVIF+WebP <picture>) |
articleType | "TechArticle" (guides) or "BlogPosting" (default) |
proficiencyLevel | Optional — Beginner / Intermediate / Expert |
topics | [{ name, wikidata }] — verified Q-ids; first = about, rest = mentions |
faq | [{ question, answer }] — genuine Q&A |
howto | Step-by-step guides only — see schema in content.config.ts |
title — start content at h2, then h3. Never skip levels. Avoid two headings with identical text (duplicate ToC entries / ambiguous anchors).alt text<Mermaid> requires ariaLabel prop<script> tags in MDX — breaks CSPrel="external noopener noreferrer" + target="_blank" (applied automatically by rehype plugin)<a> tags; add explicit ones in the frontmatter references: arrayImport from @components/ui/. See src/components/ui/AGENTS.md for the full reference
with props tables and examples. Commonly used in posts:
import TLDRSummary from "@components/ui/TLDRSummary.astro";
import Callout from "@components/ui/Callout.astro";
import Collapsible from "@components/ui/Collapsible.astro";
import { Tabs, TabPanel } from "@components/ui/tabs";
import { TerminalSession, TerminalSessionCommand, TerminalSessionOutput } from "@components/ui/terminal-session";
import Code from "@components/ui/Code.astro";
import FileContent from "@components/ui/FileContent.astro";
import TerminalCommand from "@components/ui/TerminalCommand.astro";
import Mermaid from "@components/ui/Mermaid.astro";
import Table from "@components/ui/Table.astro";
import CheckList from "@components/ui/CheckList.astro";
import StepByStep from "@components/ui/StepByStep.astro";
import BeforeAfter from "@components/ui/BeforeAfter.astro";
import StateNotice from "@components/ui/StateNotice.astro";
FAQandAuthorCardare NOT imported in posts — they are rendered by the layout from thefaqfrontmatter and the site author data.
# Frontmatter constraints (description length, slug uniqueness, etc.)
pnpm test:e2e tests/content-integrity.spec.ts
# Full build check — also validates the JSON-LD (TechArticle/FAQPage/HowTo/topics)
# against Schema.org via schema-dts types
pnpm build
draft: truepnpm dev --host to preview (review from another device on the LAN via its IP)faq + topics once the content is settleddraft: false (or remove the field) when ready to publishpnpm verify before committingSee docs/BLOG_POST_GUIDE.md for the complete blog writing guide.