Complete AI Training

Skill · Writing

Web to markdown

Converts webpage URLs to clean Markdown using the local web2md CLI, with rendering controls for tricky pages. Use when the user says "use the skill web-to-markdown" with one or more URLs, or needs a page saved as Markdown.

Complete AI SkillsLicense: MITAdded Sep 29, 2026

How to use it

  1. Start your plan and connect your AI once
  2. Ask for the task in your own words, or say it directly:
Use the Web to markdown skill to help me with this.

Without a connection: copy the SKILL.md below into your AI's project instructions.

SKILL.md

Web To Markdown

Converts one or more webpage URLs into clean Markdown files using the local web2md CLI. For users who need page content saved locally as Markdown, including pages that need custom rendering waits or login sessions.

When to use

  • The user says "use the skill web-to-markdown" followed by one or more URLs.
  • The user wants a webpage saved as a Markdown file, in a directory, or printed to stdout.
  • A page needs special rendering handling (custom wait conditions, CSS selector waits, headful debugging, login sessions).

Workflows

URL validation and conversion

Inputs: The URL(s) the user supplied after invoking the skill, and their output preference (file, directory, or stdout).

  1. Confirm the user explicitly invoked the skill with "use the skill web-to-markdown". Do not convert otherwise.
  2. Validate that each URL starts with http:// or https://. Reject anything else.
  3. For a single URL, run web2md with one of: --out ./page.md (named file), --out ./out/ (auto-named file in a directory), or --print (stdout).
  4. For multiple URLs, create an output directory and run one web2md command per URL with --out ./out/.
  5. Verify each output file exists and is non-empty.
  6. Report the saved path(s) or the Markdown content.

Check: Every output file exists and is non-empty; paths and sizes are reported exactly, never estimated or rounded. Output: The saved file path(s) with exact sizes, or the Markdown content when using --print.

Rendering control for tricky pages

Inputs: The URL(s) and whether the page needs special handling.

  1. Ask the user if they need any of these options: --chrome-path <path> if Chrome auto-detection fails, --interactive to show Chrome and pause for human checks/login, --wait-until load|domcontentloaded|networkidle0|networkidle2, --wait-for '<css selector>', --wait-ms <milliseconds>, --headful for debugging, --no-sandbox for containers/CI, or --user-data-dir <dir> for login sessions.
  2. Default to --wait-until networkidle2 for most pages.
  3. Run web2md with the chosen options plus the output flag.
  4. Verify the output file exists and is non-empty.

Check: The page rendered as expected and the output file is non-empty. Output: The saved path(s) or Markdown content, with the options used.

Installation check and guidance

Inputs: Nothing beyond the pending conversion request.

  1. Run command -v web2md before any conversion.
  2. If missing, instruct the user to install via npm with npm install -g web2md, or from source by cloning the repository and running npm install && npm run build && npm link.
  3. Do not proceed with conversion until the tool is available.

Check: command -v web2md returns a path. Output: Either confirmation the tool is available, or the install instructions.

Tools and data

  • Use the local web2md CLI when available; if it is not available, ask the user to install it or connect it.
  • Use a local browser (Chrome/Chromium/Brave/Edge) when available; if it is not available, ask the user to provide or connect one.

Guardrails

  • Only convert pages when the user explicitly says "use the skill web-to-markdown" — never otherwise.
  • Never invent URLs or convert without explicit instruction.
  • Never modify or send any file outside the local filesystem; only save to paths the user specifies.
  • Do not run any commands other than web2md and basic file checks (ls, wc).
  • Never estimate or round output; report exact file paths and sizes.

Getting started

Ask the user for the URL(s) they want to convert and their output preference (file, directory, or stdout). If they haven't already, remind them to start with "use the skill web-to-markdown".

Credits

Adapted from an open-source original (MIT): https://www.aitmpl.com/component/skills/development/web-to-markdown