home / skills / am-will / codex-skills / markdown-url

markdown-url skill

/skills/markdown-url

This skill rewrites website URLs through markdown.new to extract clean Markdown content for notes and summaries.

npx playbooks add skill am-will/codex-skills --skill markdown-url

Review the files below or copy the command above to add this skill to your agents.

Files (2)
SKILL.md
3.4 KB
---
name: markdown-url
description: |
  Route any website you need to visit through markdown.new by prefixing the URL.

  **WHEN TO USE:**
  - You would normally open a website link to read content (docs, blog posts, changelogs, GitHub issues, etc.)
  - You need a cleaner, Markdown-friendly view for copying notes or summarizing
---

# markdown.new URL Prefix

Whenever you need to visit a website URL, you must:
1) rewrite it to go through `https://markdown.new/`, then
2) visit the rewritten URL, and
3) pull the Markdown content from that page for use in your answer/notes.

## Rewrite Rule

1. Normalize the destination into an absolute URL with a scheme (`https://` preferred).
2. Prefix it with `https://markdown.new/` (do not drop the original scheme).

### Examples

- `https://example.com` -> `https://markdown.new/https://example.com`
- `https://example.com/docs?a=1#b` -> `https://markdown.new/https://example.com/docs?a=1#b`
- `example.com` -> `https://markdown.new/https://example.com`

## Agent Workflow (Required)

When you would normally open a website to read it:

1. Produce the rewritten `markdown.new` URL.
2. Visit the rewritten URL first (not the original), but only when it is likely to work (see Policy below).
3. Extract the page content from the Markdown view (the rendered Markdown and/or the raw Markdown).
4. Use that extracted Markdown as the source for summaries, quotes, checklists, or copy/pasteable notes.

If the `markdown.new` view fails to load or breaks critical functionality, fall back to the original URL for browsing, but still prefer `markdown.new` for any content extraction if possible.

## Policy: When To Use markdown.new (Required)

Do NOT route every site through `markdown.new`. Use it primarily for "read-only" pages where you want clean, extractable text:

- Documentation pages
- Blog posts / announcements / changelogs
- GitHub issues/PR discussions (when you just need readable text)
- Articles and guides

Skip `markdown.new` and go straight to the original URL when the destination is likely to be blocked or requires the original site behavior:

- Login, OAuth, checkout, payment, or any authenticated workflow
- Sites that gate content behind JS apps, CAPTCHAs, bot detection, or paywalls
- File uploads, forms, editors, dashboards, interactive widgets
- Anything where cookies/session state must be preserved

### Block/Failure Signals (Treat As Blocked)

If you try `markdown.new` and see any of the below, stop retrying and fall back to the original URL:

- HTTP `401/403/429`, "Access denied", "Forbidden", "rate limited"
- CAPTCHA / "verify you are human"
- Empty/partial content that clearly does not match the page
- Redirect loops or repeated navigation failures

### Fallback Behavior

1. Attempt `markdown.new` once when appropriate.
2. On block/failure, immediately switch to the original URL for browsing.
3. If you still need extractable text, try to extract from the original page (reader mode / copy text) and clearly note that `markdown.new` was blocked.

## Notes / Exceptions

- Keep this for reading/browsing. For API endpoints, OAuth flows, file uploads, or anything that depends on cookies/login state, use the original URL if the proxy breaks functionality.
- Do not rewrite local paths (`./README.md`) or non-HTTP(S) schemes.

## Optional CLI Helper

Convert a URL into its markdown.new-prefixed form:

```bash
node skills/markdown-url/scripts/markdown-url.js "https://example.com/docs"
```

Overview

This skill routes any target website through https://markdown.new/ so you get a clean, Markdown-friendly view for reading and extraction. It rewrites a URL into the markdown.new-prefixed form, visits that proxy when appropriate, and pulls rendered or raw Markdown for use in summaries, notes, or quoting. The approach prioritizes read-only pages and falls back to the original URL if the proxy is blocked or breaks key functionality.

How this skill works

When given a destination URL, the skill first normalizes it to an absolute URL with an explicit scheme (https:// preferred). It then prefixes the normalized URL with https://markdown.new/ and attempts to load that rewritten URL. If the markdown.new view loads, the skill extracts the rendered or raw Markdown and uses it as the authoritative text source; if the proxy fails (blocked, CAPTCHAs, or partial content), the skill falls back to the original site and uses reader mode or direct text extraction.

When to use it

  • Reading public documentation pages to extract clean copyable text.
  • Summarizing blog posts, changelogs, or long-form articles for notes or briefings.
  • Pulling readable content from GitHub issues, PR discussions, or read-only code docs.
  • Creating shareable excerpts, checklists, or meeting notes from web content.
  • When you need a Markdown-formatted source for downstream processing or conversion.

Best practices

  • Only use markdown.new for read-only pages; avoid for logins, payments, or interactive workflows.
  • Normalize to an absolute URL with scheme before prefixing (e.g., example.com -> https://example.com).
  • Try markdown.new once; on any block signal (401/403/429, CAPTCHA, empty content), switch immediately to the original URL.
  • When falling back, note that markdown.new was blocked and extract text via reader mode or direct copy if needed.
  • Do not rewrite local file paths or non-HTTP(S) schemes.

Example use cases

  • Convert a docs page to markdown.new, extract the content, and paste formatted release notes into a changelog.
  • Open a blog post through markdown.new to copy headings and code snippets into a knowledge base.
  • Load a long GitHub issue via markdown.new to summarize discussion points for a stand-up note.
  • Fetch a public API guide through markdown.new to generate a quick checklist for integration tasks.
  • When markdown.new fails due to rate limits, load the original URL and note the fallback in the summary.

FAQ

What if markdown.new returns a CAPTCHA or access denied?

Stop using markdown.new for that page and open the original URL. Note the failure and extract text via reader mode or direct copy if possible.

Should I route all sites through markdown.new by default?

No. Use it selectively for read-only content. Avoid it for authenticated workflows, payment, uploads, or heavily interactive pages.