article2media Multiple formats from articles and video

Document type
Field manual
Updated
Reading time
14 min

A guide to article2media installation in Claude Code/Codex, its shared engine, original/rewrite/translation routes and media dependencies, with a complete owned-Markdown-to-cards-and-WeChat example, QA limits and Traditional Chinese considerations.

Source
Document details
threerocks/article2media
License
MIT

Choose original text, rewriting or translation, prepare the required files and tools, then inspect each output and QA report.

Independent capabilities
10CapabilitiesPlus an entry skill and shared engine
Installed directories
11SkillsKeep capabilities and article2media in the same skills root
Themes
21ThemesCSS file count in the pinned version

01Inputs, outputs and responsibilities

Purpose and research scope

article2media is a collection of Claude Code/Codex skills that turns articles and audiovisual sources into visual posts or explainer videos.

RoleWork
Host agentUnderstand the source and write a rewrite, translation or storyboard
Node.js and supporting toolsProcess files, lay out content, capture images and perform some QA; video also requires capabilities such as speech synthesis

Capabilities exchange files in a separate working directory, keeping text processing separate from visual layout. Original-text layout can use an article file directly; rewriting and translation require the agent to prepare inputs, since rendering commands do not perform that semantic work automatically.

The author's X article provides design background and examples; commands, counts and limits here follow the pinned repository and source code. The code uses MIT, while rights to sample articles and media remain subject to their original source notices.

02Choose the host and installation scope

Installation and the shared engine

Installation methodEnvironmentStructure to preserve
Claude Code pluginInstall the entry skill and capabilities togetherThe plugin manages all 11 skills and the shared engine
skills CLIClaude Code, Codex and compatible hostsKeep capabilities and article2media in the same skills root
Manual skills-directory syncManage locations and versions yourselfPreserve article2media/engine instead of copying only SKILL.md or a wrapper

The Claude Code plugin has the documented entry points below. After installation, use /article2media for the entry skill and namespaced capability names such as /article2media:image-cards.

bash
claude plugin marketplace add threerocks/article2media
claude plugin install article2media@article2media

The following skills CLI command installs for both Claude Code and Codex at user scope.

FlagEffect
-gGlobal user installation; omit -g for project scope
-aSelect a host; repeat for multiple hosts
-ySkip interactive confirmation
bash
npx skills add threerocks/article2media -g -a claude-code -a codex -y

Codex uses $skill names in conversation, such as $article2media for the entry skill or $wechat-layout for one capability. Standalone skill names differ from the Claude plugin namespace; commands prefixed with article2media: do not work as universal command names across hosts.

03Choose by task

Ten capabilities and file handoffs

Source

article-fetch

Retrieve an article

Convert article URLs, local Markdown, text or HTML into article.md and meta.json; complete missing source material before proceeding, without inferring content from a title.

Source

video-transcript

Transcribe audiovisual sources and subtitles

Produce article.md from platform subtitles or local speech recognition, with timelines and raw segments in transcript; Chinese cleanup converts text to Simplified Chinese.

Content

article-rewrite

Restructure a rewrite

The agent writes content.json, while scripts check structure and layout; export can produce rewrite.md and rewrite-assets from the rewrite and charts.

Content

article-translate

Translate the full text

The agent writes article.zh.md block by block, then uses stats/check to inspect structure, possible omissions and numbers; the CLI does not call a translation model itself.

Visual posts

long-image

Magazine-style or original-text long images

content.json produces structured long images, while article files use original-text presentation; without a specified theme, original-text layout uses a white reading surface.

Visual posts

image-cards

Cards with fixed aspect ratios

Supports 3:4, 4:5, 1:1 and 9:16; rewrites produce summary cards, while article files paginate in body order and undergo text read-back comparisons.

Visual posts

wechat-layout

WeChat Official Account layout

Accept article.md, article.zh.md or rewrite.md and produce HTML with inline styles, covers and images; export content.json first.

Video

explainer-video

Vertical explainer video

The agent writes video/video.json before scripts handle narration, visuals, captions and review; the result is a restructured explanation, not a word-for-word reading of the full article.

Visual explanation

logic-whiteboard

Argument whiteboard

Use a source inventory and whiteboard.json to account for paragraphs before rendering the reasoning spine; coverage checks do not establish the argument's truth.

Visual explanation

article-comic

Black-and-white comic

The agent writes comic.json, an image model generates characters and scenes, and HTML lays out text; stop without image-generation capability instead of delivering blank placeholders.

04Decide how to process the text first

Original, rewrite and translation routes

RouteAgent workLayout inputAcceptance focus
Original textRead the source, confirm completeness and preserve the bodyarticle.mdParsed text blocks, DOM read-back and source SHA-256
RewriteRestructure the article according to the schema and write content.jsoncontent.json; export rewrite.md first for WeChatStructure, evidence for numbers, layout and manual content review
TranslationTranslate block by block, retaining block types and orderarticle.zh.md or the requested language editionStructural checks, warnings, terminology and manual semantic comparison

Without an explicit route, long images and cards default to rewriting, while WeChat defaults to original-text layout. To preserve wording, state "original-text layout, preserve the body" in the task; narration, whiteboards and comics each use their own scripts or ledgers and do not carry a full-text verbatim guarantee.

Translation defaults to Simplified Chinese, and Chinese cleanup in video transcription also converts Traditional to Simplified. For a Traditional Chinese workflow, explicitly ask the agent to deliver Traditional Chinese, retain the original subtitles or transcript/raw.txt, and check the final text; --lang zh selects the speech-recognition language and does not preserve Traditional characters.

05Core and optional capabilities

Dependencies, network and platform limits

RoutePrepareExecution limits
Basic visual postsNode.js 22+ and working Chrome/ChromiumThe core needs no npm packages; fonts and source images may use the network
Article URLsAccessible sources and network accessGeneral pages may pass through r.jina.ai/defuddle.md; X uses FxTwitter
Video URLs and subtitlesCorresponding tools such as yt-dlpDownload, login and site limits depend on the source; usable ASR is also needed without subtitles
Local ASR/alignmentThe documented mlx-whisper setup and cached modelsPrimarily an Apple Silicon route; a missing model does not count as working recognition
Video synthesisffmpeg, Chrome and a working narration backendNarration and alignment capabilities vary by host
Local narrationApple Silicon, VoxCPM2/MLX and related toolsPrepare models and the environment in advance
Edge narrationuv and a reachable serviceSends text to a service; uv may fetch uncached Python packages
Illustrations/comicsWorking Codex CLI or OpenAI/Gemini routeCheck login, model access, quota and API costs separately

The official environment check below runs from the repository root. It does not install Node, Chrome, ffmpeg or models for you, but doctor starts temporary headless Chrome, tests Google Fonts connectivity and probes external tools.

bash
bash scripts/install.sh

Chrome uses a new temporary profile without automatically inheriting everyday browser login state. When a video source requires cookies, they go to yt-dlp only through explicit use of --cookies-from-browser; existing local audiovisual or subtitle files are another option.

--no-proxy skips only the two general-page proxy routes and is not a global offline switch. Some YouTube yt-dlp routes may fetch remote EJS components; image generation, external narration, fonts and source images each have their own network requests.

06Manage content and style separately

Themes, ratios and branding

The pinned version contains 21 theme CSS files. Render the same content.json with another theme without rewriting the article for a color change, then check the layout again.

NeedDocumented optionInterface distinction
Business or reading-oriented long imageseditorial, swiss, quietA theme name is not an output route
Dark technology contentmidnightInspect contrast and actual fonts in the output
Cards with fixed aspect ratios--ratio 3:4, 4:5, 1:1, 9:16Ratios affect pagination, not arbitrary cropping
Choose a themeSkill entry --style; rendering CLI --themeDo not pass conversational entry flags to every script
Custom footer informationbrand.json and --brandPreserve attribution and body boundaries according to the source

Some fonts load from Google Fonts or jsDelivr, so offline access or missing fonts may trigger fallbacks. Inspect the actual fonts recorded in QA and the output's line breaks instead of assuming identical layout from the theme name.

07Storyboard, narration and review

Explainer video and voice routes

The agent first writes video/video.json to describe the audience, shots, lines and visuals, then runs video commands. Expected output is a 1080×1920 vertical video with covers, captions, review data and a publishing draft.

bash
node skills/explainer-video/scripts/video.mjs check article2media-out/demo/video/video.json
node skills/explainer-video/scripts/video.mjs make article2media-out/demo/video/video.json

Run these commands from the repository root. Both make and render may synthesize narration when the cache is missing, and optional illustrations may call an image service; render is not guaranteed to replay without network access or costs.

The pinned catalog has 6 public voices, with news-man as the default; the 7 voices in the author's X article do not apply to this pinned version. Validate voice quality and speed on the target host.

Narration routeConditions and limits
VoxCPM2/MLXLocal Apple Silicon route using 48 kHz; prepare models beforehand
EdgeNeeds the network and may fetch Python packages through uv
macOS system voicePlatform-specific fallback; check alignment capability separately

08Complete only the stages you need

Advanced use and rerun rules

Continue from working files

Do not fetch again when a complete article.md exists; reuse content.json for theme or layout changes and add only fields required by the target layout.

Keep sources from every stage

Retain the original, translation, rewrite and transcription raw.txt, recording source checks separately from layout acceptance; fix upstream content instead of editing generated HTML by hand.

Distinguish checks from full rendering

The scope of --check varies by script; cards and WeChat preliminary checks do not establish that Chrome layout acceptance ran.

Stop according to image-generation needs

Comics require working image-generation capability; a failed optional rewrite illustration can be removed according to the skill before rerendering, without treating its placeholder as a deliverable.

Comic character-reference images currently pass through the Codex image route; do not assume every provider uses the same mechanism. Whiteboards need the source inventory retained to check where each original paragraph went and its source hash.

09Complete suggested example

Owned Markdown to cards and WeChat

Prepare Traditional Chinese Markdown you have the right to use, with a title, paragraphs, subheadings and a list, and save it as owned-notes.md in the current directory. This example uses the original-text route to deliver 3:4 cards and quiet-themed WeChat layout, without model-generated illustrations or narration.

Install all skills with the earlier skills CLI command, then run these commands from the directory containing owned-notes.md. They use the global Codex skills root; Claude plugin users must use their actual plugin installation location instead of assuming the same path.

bash
ARTICLE2MEDIA_SKILLS="$HOME/.agents/skills"
ARTICLE2MEDIA_WORK="./article2media-out/owned-notes"
node "$ARTICLE2MEDIA_SKILLS/article-fetch/scripts/doctor.mjs"
node "$ARTICLE2MEDIA_SKILLS/article-fetch/scripts/fetch.mjs" ./owned-notes.md --out "$ARTICLE2MEDIA_WORK"
node "$ARTICLE2MEDIA_SKILLS/image-cards/scripts/cards.mjs" "$ARTICLE2MEDIA_WORK/article.md" --ratio 3:4
node "$ARTICLE2MEDIA_SKILLS/wechat-layout/scripts/wechat.mjs" "$ARTICLE2MEDIA_WORK/article.md" --check
node "$ARTICLE2MEDIA_SKILLS/wechat-layout/scripts/wechat.mjs" "$ARTICLE2MEDIA_WORK/article.md" --theme quiet
  1. Check the extracted content

    Open article.md and meta.json in the working directory and confirm the title, body and source; retain the local original separately and do not modify source content inside rendered artifacts.

  2. Inspect the original-text cards

    Open overview.jpg, every card image, ledger.json and qa.json in full-3x4 to check text comparison, pagination and image scope.

  3. Inspect the WeChat layout

    View article.html, both covers, ledger.json and qa.json in quiet-wechat; --check is only a preliminary check, while the final command performs full rendering.

  4. Preview on the target platform

    Use article.html's copy button to copy rich text into the WeChat Official Account editor, then check images, styles and the mobile preview; this step does not mean the content is publicly published.

StageExpected files
Extractionarticle2media-out/owned-notes/article.md, meta.json
Original-text cardsfull-3x4/card-01.png and subsequent cards, cards.html, overview.jpg, caption.md, ledger.json, qa.json
WeChatquiet-wechat/article.html, article-body.html, cover-2.35x1.png, cover-1x1.png, wechat.md, images, ledger.json, qa.json

This is a suggested procedure; this research did not execute the commands or publish content. For a summary, have the agent write content.json first; for translation, write and structurally check the translation, review it manually, then pass the appropriate file to the layout capability.

10Exit codes, warnings and actual outputs

QA reports and manual acceptance

RouteProgram checksManual confirmation still needed
Original-text long images/cards/WeChatSource-file SHA, parse coverage, text blocks and DOM read-backExtraction completeness, actual pagination and target-platform paste results
Rewritten long images/cardsSchema, geometry and layout reportsRewrite facts, chart interpretation and error entries in qa.json
TranslationBlock types, structure, code, figure and number warningsSuspected omissions, terminology, ordinary links and semantic comparison
WhiteboardCoverage and hash when a source inventory existsValidity of reasoning and justified omissions
ComicPanel and text-boundary checksCorrespondence between characters, plot and text
VideoStructure, timing, captions, audio and review.jsonEvery warning, actual sound, omitted speech and visual pacing

See the implementations in render.mjs and the video review code. This guide records the pinned version's behavior without modifying upstream or labeling unexecuted examples as passes.

11Symptoms, causes and next actions

Troubleshooting and known limits

SymptomCheck firstNext action
Shared engine not foundSame-root skills and the presence of article2media/engineFix installation structure or ARTICLE2MEDIA_ENGINE
Chrome cannot startExisting browser path and host environmentFollow doctor output; ARTICLE2MEDIA_CHROME can specify a path
Fonts or line breaks differ from examplesNetwork fonts, fallbacks and QA recordsRerender with available fonts and inspect visually, beyond checking the theme name
Fetching returns only a summary or blocked pageSource accessibility and fetch routeStop inferring the body and provide a complete local file you can use
Video has no readable subtitlesSubtitle tracks, local ASR and cached modelsSupply srt/vtt or prepare a supported recognition environment
Transcription changes to Simplified ChineseBuilt-in cleanup converts Traditional to SimplifiedRetain raw.txt and create and check a separate Traditional Chinese working draft
WeChat rejects JSONInput is not an article fileExport the rewrite to rewrite.md before layout
exit 0 but errors remain in reportsQA issues and review warningsFix content or environment, rerender and check again
Original-text cards exceed count or layout limitsArticle length, ratio and upstream rulesPreserve the body and plan separate posts or a suitable long-image route
Comics lack image-generation capabilityProvider, login, model access and quotaStop that route without delivering placeholders

12Optional engineering route

Development, self-tests and bug reports

When researching or changing the engine, run official self-tests in a separate repository. They generate files and perform the corresponding rendering, requiring a browser and prepared environment; this research did not run these upstream tests.

bash
node tests/run-all.mjs --quick
node tests/run-all.mjs --themes quiet
claude plugin validate .

Change source content through article.md/content.json and layouts through layout/theme; manual edits to generated HTML are not reproducible fixes. Retain program reports and previews and explain any unfinished checks.

When reporting an issue, provide the following and remove credentials and private content unrelated to the problem.

  • Commit.

  • Machine.

  • Agent host.

  • Input route.

  • Commands run.

  • Relevant QA files.

Diagnose incomplete sources, model output and rendered layout separately.

13Complete one verifiable workflow first

Next steps

Use owned Markdown to complete original-text cards or WeChat layout and check both files and the actual platform preview. Add the corresponding agent work, models and tools when you need rewriting, translation, video or comics.

References