URL To Markdown
Overview
Use this skill to fetch a public URL, convert it to Markdown, and save the result as a timestamped Markdown file for later agent use.
Conversion priority is fixed:
- (primary)
- (fallback only when is unavailable)
This skill is execution-oriented. Prefer running the bundled script instead of manually recreating the workflow.
When To Use
Use this skill when the user asks for any of the following:
- convert a URL or webpage to Markdown
- save an article, doc page, or blog post as
- ingest a public webpage for later summarization or extraction
- preserve page content in a machine-friendly text format
- pull a documentation page into a local Markdown file
Do not use this skill for:
- private pages that require browser login
- sites the user is not authorized to access
- tasks that require full site crawling rather than a single page fetch
Inputs
Decide these inputs before running the script:
- : required; must be a public URL
- : optional; one of , , ; default ; used by fallback
- : optional; default ; used by fallback
- : optional; one of , , ; default ; used by fallback
- : optional; default
- : optional; default ; when , skip and call directly
- : default (current directory + ); if the user explicitly provides an output path in the prompt, use that path instead
If the user does not specify these options, keep the defaults.
Output path rule:
- Always pass when invoking .
- If user prompt explicitly specifies an output path, use that exact path.
- Otherwise use (relative to current working directory).
Run The Script
From the skill directory, run:
bash
python scripts/url_to_md.py "<url>" --output "output/"
Common variants:
bash
python scripts/url_to_md.py "<url>" --output "output/"
python scripts/url_to_md.py "<url>" --method browser --retain-images --output "output/"
python scripts/url_to_md.py "<url>" --transport post --timeout 45 --output "output/"
python scripts/url_to_md.py "<url>" --force-markdown-new --output "output/"
python scripts/url_to_md.py "<url>" --output "<user_explicit_path>"
Behavior notes:
- The script always attempts first.
- If is set, the script skips and uses directly.
- It falls back to only when is unavailable (for example timeout, network failure, 5xx, or rate limit).
- Skill-level default output directory is , and the invocation should always include .
- If is a filename, the script appends a timestamp before the extension.
- If is a directory, the script creates a slug-based filename with a timestamp.
Required Output Behavior
Prefer producing both:
- A saved Markdown file.
- A short conversational summary.
The summary should include:
- source URL
- whether the conversion succeeded
- provider used: or
- saved file path, if a file was written
- key options used if non-default: , , ,
Summary Template
Use this structure:
text
Source URL: <url>
Status: success
Provider: <r.jina.ai|markdown.new>
Saved Markdown: <path>
Options: method=<value>, retain_images=<value>, transport=<value>, timeout=<value>
If defaults were used, keep
brief.
Error Handling
If the script fails:
- say that URL-to-Markdown conversion failed
- include the main error briefly
- do not invent page content
- mention likely cause when obvious: network issue, timeout, rate limit, unsupported page access
If both providers fail, report which provider failed first and which provider failed last.
If the service returns rate limiting, report that directly and avoid pretending a retry succeeded.
Notes
- Prefer saved Markdown over raw stdout because agents can reuse local files more reliably.
- The bundled script uses only the Python standard library.
- The script supports both importable usage and CLI execution, but this skill should normally use the CLI path.