SuperAPI AI Directory

article-fetch

Writing & research

View repository

Updated 11-10 04:23

About this skill

Article fetching (article-fetch)

Turn any article into article.md: all downstream capabilities (rewriting, translation, long images, cards, WeChat official account, voiceover, whiteboard, comics) start from this file. Video is not handled here; use video-transcript。

Parameters:$ARGUMENTS

1. Environment check (first time in this session)

node ${CLAUDE_SKILL_DIR}/scripts/doctor.mjs

Requires Node 22+; web pages and WeChat official accounts need local Chrome. On failure, relay the fix suggestions to the user, then stop.

2. Fetch

node ${CLAUDE_SKILL_DIR}/scripts/fetch.mjs "<url 或文件>"            # 默认输出到 ./article2media-out/<slug>/
node ${CLAUDE_SKILL_DIR}/scripts/fetch.mjs "<url>" --out <目录>      # 指定目录
  • X / Twitter: via the public FxTwitter API; long posts, posts and threads are all supported, no login required.x.com/i/article/… internal links like this cannot be resolved; ask the user for the link to the tweet that published the article.
  • Regular web pages: try r.jina.ai, then defuddle.md, and finally extract with local Chrome. Add --no-proxy to avoid third-party services.
  • WeChat official accounts: extract directly with local Chrome.
  • Local files: Markdown / text are read directly; for HTML, use Chrome to extract the body text.--title、--author can supply the title and author.
  • User pastes the body directly: no fetching needed; write ./article2media-out/<简短英文 slug>/article.mdyourself title、author、platform、date: front matter writes # 标题, paste the rest as-is without changing any words.
  • When given a video link, audio/video, or subtitle file, the script will refuse and prompt: switch to video-transcript。

Output:<目录>/article.md、meta.json; the terminal prints a JSON object (directory, title, author, platform, word count).

3. Check

Read through it completely article.md:

  • When the body is clearly incomplete (only an abstract, truncated by a login wall, only comments captured), tell the user and ask them to paste the body;
  • Marked with <!-- 未识别的内容块 --> may be missing content; state this when delivering.
  • When the script warns "⚠ The body is only N characters; the main content may be in the video / images" (common in image-explainer posts and short-video posts): X posts' videos are written as "cover image + ▶ video link". Look at the images first; for videos, use ffmpeg to extract frames (the first frame is often the complete annotated explainer image) and look at the visuals. Those with voiceover go to video-transcript; for those with only on-screen text, transcribe the text verbatim in the original language into article.md(placed after the corresponding image / video, using the original grouping as subheadings), and state when delivering which content came from the visuals.

4. Deliver

When used alone: give the absolute path of article.md , the title, author, platform, word count, and any gaps found above. In a combination: hand the directory to the next capability (see ../article2media/references/pipeline.md)。