Skip to content

heymegabyte/agent-skills / skills/blog-publishing

blog-publishing

Flagged

Shared research-driven editorial and blog publishing system for the Megabyte Labs ecosystem (@theme-tools/blog, ui.theme.tools, and adopting Cloudflare Workers sites). Activate when generating, researching, citing, illustrating, editing in Plate/Slate, or scheduling 2,000–3,000+ word reference articles with live DataForSEO v3 keyword intelligence, claim-level citations, 30 visual applications (E01–E30), and 3 daily publishing slots.

references/plate-authoring.md

View on GitHub
# Canonical Plate/Slate Document & Inline Authoring (`G01–G30`, `H01–H30`)

Implementation modules: `@theme-tools/blog/schema`, `@theme-tools/blog/renderer`, `@theme-tools/blog/editor`, and `@theme-tools/blog/migration`.

## 1. Single Canonical Plate Document (`G01–G02`, `H01–H03`)

Every article revision stores a single `ValidatedPlateDocument` (`PlateBlockNode[]` validated by Zod v4 in jitless mode):

- **Public Readers (`ArticleStaticRenderer`)**: Renders complete semantic HTML (`<article>`, `<figure>`, `<table>`, `<details>`, `<ol>`, JSON-LD `BlogPosting`) with **zero Plate/Slate editor runtime** downloaded (`H03`).
- **Authorized Editors (`PlateArticleAuthoringShell`)**: Lazy-loaded via `React.lazy(() => import("./LazyPlateEditor"))` only when an authenticated site member with `author`, `editor`, `publisher`, or `owner` role clicks `+ New article` or `Edit Article in Plate`.

## 2. Supported Plate Block & Inline Node Types (`F01`, `G06–G14`)

- **Block Nodes**: `h2`, `h3`, `h4`, `p`, `blockquote`, `ul`, `ol`, `code_block`, `callout` (`note`, `tip`, `important`, `warning`, `caution`, `tldr`, `methodology`), `figure`, `chart`, `comparison_table`, `calculator`, `sequence`, `disclosure`.
- **Inline Nodes**: `text` (`bold`, `italic`, `code`), `link` (`href`), `citation` (`CitationNode` with `claimId`, `sourceId`, `evidenceId`, ` children`).

## 3. Prominent `+ New article` Homepage Button (`G04–G05`)

- `BlogHomepageNewArticleButton` (`data-testid="new-article-button"`) renders prominently on `/blog` **only** when `canUserWriteDraft(user, siteId)` returns `true`.
- Anonymous visitors and signed-in non-members (`role: "viewer"`) never see the button; non-members receive an explicit read-only notice (`data-testid="editorial-access-denied-notice"`).

## 4. Immutable Publish Pointer & Optimistic Concurrency (`G16–G25`)

- Published articles are selected by `ArticleRecord.publishedRevisionId`. Editing creates a new draft `ArticleRevision` (`latestDraftRevisionId`) and never mutates the live public revision until publish succeeds.
- Saving a draft requires `expectedBaseRevisionId`; stale base revisions return a structured conflict (`conflictReason: "STALE_BASE_REVISION"`).
- Offline drafts in `localStorage` are namespaced by `tenantId + siteId + userId + articleId + baseRevisionId` and wiped on `clearUserOfflineDraftsOnLogout` (`G18`, `K22`).
brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).Stars: 322kUpdated Claude CodeCodexVerifiedInstall
brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).Stars: 198kUpdated Claude CodeCodexVerifiedInstall