From 14c5adeaf2af23990fcf354673e9928bf9c42a36 Mon Sep 17 00:00:00 2001 From: Rob Alexander <7397327+rob-alexa@users.noreply.github.com> Date: Wed, 24 Jun 2026 13:05:26 -0700 Subject: [PATCH] feat: prefer raw-Markdown (.html->.md) over Playwright for developer.salesforce.com docs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Modern developer.salesforce.com guide pages now publish a raw-Markdown twin — swap the .html extension for .md on the same URL (the page's "Copy/View as Markdown" links expose it) and a plain web fetch returns clean Markdown with no JS shell. That's faster and lighter than browser-rendered extraction, so the fetching-salesforce-docs playbook should try it first for those pages. Documents the scope: it's confirmed for modern guide pages under /docs/platform/.../guide/*, does NOT work for legacy atlas.* pages (which return an HTML shell), and help.salesforce.com still needs the Playwright extractor — fall back to the existing playbook in those cases. Co-Authored-By: Claude Opus 4.8 (1M context) --- skills/fetching-salesforce-docs/README.md | 8 ++++++++ skills/fetching-salesforce-docs/SKILL.md | 14 +++++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/skills/fetching-salesforce-docs/README.md b/skills/fetching-salesforce-docs/README.md index adadd03..7bcce4d 100644 --- a/skills/fetching-salesforce-docs/README.md +++ b/skills/fetching-salesforce-docs/README.md @@ -28,6 +28,14 @@ This skill does not include: - deciding when to follow child links from broad official guide pages - rejecting weak results such as shells, landing pages, and third-party summaries +## Markdown shortcut (developer.salesforce.com) + +Modern developer-guide pages publish a raw-Markdown twin: swap `.html` → `.md` on the same URL +and fetch it with a **plain web fetch** — no Playwright needed. The page's "Copy as Markdown" / +"View as Markdown" links expose this. Try it **first** for `developer.salesforce.com/docs/platform/.../guide/*` +pages. It does **not** work for legacy `atlas.*` pages (those return an HTML shell), and +`help.salesforce.com` still needs the renderer — use the extractor below for those. + ## Optional utility A tiny wrapper is available for official Salesforce doc URLs: diff --git a/skills/fetching-salesforce-docs/SKILL.md b/skills/fetching-salesforce-docs/SKILL.md index 3cd54d3..c75974f 100644 --- a/skills/fetching-salesforce-docs/SKILL.md +++ b/skills/fetching-salesforce-docs/SKILL.md @@ -95,7 +95,19 @@ This is especially important for: ### 5. For `developer.salesforce.com` -Use this playbook: +**Try the Markdown variant first — it needs no browser.** Modern developer-guide pages now +publish a raw-Markdown twin: swap the `.html` extension for `.md` on the same URL and fetch it +with a **plain web fetch** (the "Copy/View as Markdown" links on the page expose this). It returns +clean Markdown (headings, fenced code, links) with no JS shell, so it's faster and lighter than +Playwright. Example: `…/guide/js-dynamic-components.html` → `…/guide/js-dynamic-components.md` +(verified 2026-06-24). +- **Scope:** confirmed for modern guide pages under `developer.salesforce.com/docs/platform/.../guide/*`. + It does **not** work for legacy **`atlas.*`** pages — `.md` there returns an HTML shell, so fall + back to browser-rendered extraction for those. +- If the `.md` fetch 404s or returns a shell ("Salesforce Developers" with no body), drop to the + Playwright playbook below. + +Otherwise use this playbook: - start with the most likely official guide root - if the page is JS-heavy, prefer browser-rendered extraction - check whether the exact concept appears on the page