extract-article

Extract article content from local HTML files into clean Markdown.

4.7k|260|Updated Dec 29, 2021
One-click install
npx skills add https://github.com/beatai-org/beatai --skill extract-article
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: extract-article
Source: https://github.com/beatai-org/beatai/tree/main/.claude/skills_bak/extract-article
Command: npx skills add https://github.com/beatai-org/beatai --skill extract-article

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Converts locally saved article HTML into clean, readable Markdown by extracting only the main article content while preserving structure, headings, links, lists, code blocks, and images.

Core Features & Use Cases

  • Platform-aware extraction: Detects common sources like WeChat, Zhihu, Medium, or generic blogs from the HTML and targets the correct content region.
  • Markdown-preserving output: Keeps title hierarchy, block elements, inline emphasis, code fences, links, tables, and image URLs in the right order.
  • Medium-safe structured parsing: For Medium, prefers the structured parsing path via window.APOLLO_STATE and falls back to DOM extraction only when needed.
  • Math de-duplication guardrails: Avoids duplicate extraction for KaTeX/MathJax/MathML-rendered formulas by skipping redundant math DOM layers.

Quick Start

Ask to extract the article content from your local HTML file path, and then use the skill’s output Markdown directly.

Frequently Asked Questions about extract-article

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I convert a saved WeChat or Medium HTML file to Markdown?

To convert saved WeChat or Medium HTML to Markdown, this skill performs platform-aware extraction on your local HTML file. It detects the source and returns clean Markdown by preserving structure, headings, links, lists, and image URLs in their original order.

Why does my HTML to Markdown conversion duplicate math formulas?

HTML to Markdown conversion duplicates math formulas due to redundant KaTeX or MathML DOM layers. This skill applies math de-duplication guardrails to skip these redundant layers, ensuring your extracted output contains each formula only once.

What is the best way to extract article正文 content from a local HTML file?

The best way to extract article正文 content from a local HTML file is using an extraction tool that removes navigation and boilerplate. This skill targets the correct content region across generic blogs and specific platforms, yielding clean Markdown suitable for reuse.

How does structured parsing for Medium articles work?

Structured parsing for Medium articles works by extracting data from the window.__APOLLO_STATE__ object. This skill prioritizes that path for accurate content retrieval and falls back to standard DOM extraction only when the structured data is unavailable.

Can I extract images and links in order when converting HTML to Markdown?

Yes, you can extract images and links in order when converting HTML to Markdown. The skill preserves block elements, inline emphasis, code fences, and restores images as Markdown URLs sequentially as they appeared in the original article HTML.