Defuddle

From aicodedecode/awesome-muse-skills · View interactive version

Defuddle is an AI agent skill from the GitHub repository aicodedecode/awesome-muse-skills. Extract the main content of any web page as clean Markdown or HTML (Obsidian Web Clipper's engine). Use when you need article extraction in a Node/JS runtime, on math-heavy pages, when you want rich metadata (author, published date, schema.org), or as a quick CLI one-liner. The Python-side equivalen

How to use this skill

Skill file

defuddle

Article-extraction library by Stephan Ango (kepano, Obsidian CEO) — the engine

behind Obsidian Web Clipper. Takes a URL or HTML, finds the main content,

returns cleaned HTML or Markdown. A more forgiving Mozilla Readability

replacement: removes fewer uncertain elements, standardizes footnotes / code

blocks / math / callouts, and extracts rich metadata. MIT licensed.

Verified working in this environment 2026-09-30 via npx defuddle.

When to use defuddle vs trafilatura

Default article extraction stays trafilatura (Python, in the local-scrape

skill). Reach for defuddle when:

extensions. Native TS, three bundles: defuddle (browser, zero deps),

defuddle/full (math + Markdown), defuddle/node (Node, accepts any DOM).

LaTeX preserved in data-latex. (Relevant: KaTeX is in the test-series

stack.)

published date, site, domain, favicon, image, language, word count, raw

schema.org data, meta tags.

CLI (no install needed)

# URL → Markdown with YAML frontmatter (title, author, source, published…)
npx defuddle parse https://example.com/article --markdown --frontmatter

# JSON with metadata + content
npx defuddle parse page.html --json

# Single property
npx defuddle parse page.html --property title

# Local file / stdin
npx defuddle parse page.html --markdown
cat page.html | npx defuddle parse --markdown

# Debug a bad extraction
npx defuddle parse https://example.com/article --debug

Node.js

import { parseHTML } from 'linkedom';      // or jsdom / happy-dom
import { Defuddle } from 'defuddle/node';

const { document } = parseHTML(html);
const result = await Defuddle(document, 'https://example.com/article', {
  markdown: true,
  useAsync: false,   // IMPORTANT: see below
});
console.log(result.content);   // Markdown
console.log(result.title, result.author, result.published);

(package.json needs "type": "module" for defuddle/node.)

Standing caution: `useAsync`

parseAsync() falls back to third-party APIs (e.g. FxTwitter) when the

HTML has no usable content (client-side-rendered pages). That breaks the

free-tier-only posture — always pass useAsync: false in our usage. For

JS-heavy pages, use the browser tools instead (per the Firecrawl rule:

local/bare fetch first, browser second, Firecrawl last resort).

Output notes

footnotes normalized; callouts (GitHub alerts, Bootstrap alerts, asides)

become Obsidian-style > [!info] blocks in Markdown.

container's CSS selector.

on a new domain before batching.


Provenance (system note, 2026-09-30)

--markdown --frontmatter` returned clean Markdown + full frontmatter.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.