download-website-to-markdown
Skill2 starsChanged 22 days agoMITView on GitHub
Downloads a website URL and saves its content as a local markdown file. Uses a headless browser (Playwright) to handle JS-rendered pages. Also includes a PDF-to-Markdown converter using Docling. Use when the user wants to archive a webpage or PDF, save documentation locally, or convert web/PDF content to markdown for offline reading.
In this repository14 other files it gives its agents.
- AGENTS.mdAGENTS.md
- confluence-operationsSkill
- devto-articleSkill
- english-tech-blog-structureSkill
- linkedin-articleSkill
- llm-evaluationSkill
- md-deckSkill
- pdf-to-markdownSkill
- repo-security-auditSkill
- sales-agentSkill
- threat-model-attack-reviewSkill
- visual-colorSkill
- visual-diagramSkill
- zenn-articleSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 4 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 13
Run the download script from the agent_skills/ directory.
- Distinctive: line 53
If the URL is unreachable or times out (30 s), the script exits with an error and does not create a file.
- Distinctive: line 55
If the derived filename already exists, a numeric suffix is appended rather than overwriting silently.
- Distinctive: line 83
If a URL is given, the PDF is downloaded to a temporary file.
- Distinctive: line 111
If the output path already exists, a numeric suffix is appended rather than overwriting silently.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Instructions
Run the download script from the agent_skills/ directory.
Usage
cd agent_skills
npx tsx download-website-to-markdown/scripts/download.ts <url> [output]| Argument | Required | Description |
url | Yes | The URL to download |
output | No | Output file path. Derived from the URL if omitted. |
Steps
- Run the script with the URL and optional output path.
- The script fetches the page using a headless Chromium browser (waits for network idle to handle JS-rendered content).
- HTML is converted to Markdown using Turndown. Navigation, footers, scripts, and styles are stripped automatically.
- A YAML front matter block is prepended:
--- source: <original URL> fetched: <YYYY-MM-DD> --- - The file is saved. If the output path already exists, a numeric suffix is appended (e.g.
page-2.md).
Examples
# Derive filename from URL → saves to: ai-observability.md
npx tsx download-website-to-markdown/scripts/download.ts https://docs.snowflake.com/en/user-guide/snowflake-cortex/ai-observability
# Save to a specific path
npx tsx download-website-to-markdown/scripts/download.ts https://example.com outputs/reference-docs/example.mdEdge cases
- If the URL is unreachable or times out (30 s), the script exits with an error and does not create a file.
- Query strings and fragments are ignored when deriving the output filename.
- If the derived filename already exists, a numeric suffix is appended rather than overwriting silently.
PDF to Markdown (pdf-to-markdown.py)
Converts a remote or local PDF to Markdown using Docling, which preserves document structure (headings, tables, lists, code blocks).
Requirements
- Python 3.10+
uv— dependencies (docling,requests) are declared inline and installed automatically on first run.
Usage
cd agent_skills
uv run download-website-to-markdown/scripts/pdf-to-markdown.py <pdf-url-or-path> [output]| Argument | Required | Description |
pdf-url-or-path | Yes | Remote URL (https://…) or local file path to a PDF |
output | No | Output .md path or directory. Derived from the PDF filename if omitted. |
Steps
- Run the script with the PDF URL or local path and an optional output path.
- If a URL is given, the PDF is downloaded to a temporary file.
- Docling converts the PDF to Markdown, preserving structure (headings, tables, code blocks).
- A YAML front matter block is prepended:
--- source: <original URL or path> fetched: <YYYY-MM-DD> --- - The file is saved. If the output path already exists, a numeric suffix is appended (e.g.
paper-2.md).
Examples
# Remote PDF — filename derived from URL → saves to: 2310.06825.md
uv run download-website-to-markdown/scripts/pdf-to-markdown.py https://arxiv.org/pdf/2310.06825
# Save to a specific path
uv run download-website-to-markdown/scripts/pdf-to-markdown.py https://example.com/spec.pdf outputs/spec.md
# Save into a directory (filename derived automatically)
uv run download-website-to-markdown/scripts/pdf-to-markdown.py report.pdf outputs/Edge cases
- Remote PDFs are downloaded to a temp file and deleted after conversion.
.pdfis stripped from the derived filename so the output ispaper.md, notpaper.pdf.md.- If the output path already exists, a numeric suffix is appended rather than overwriting silently.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

