afv-library/skills/fetching-salesforce-docs
Rob Alexander 14c5adeaf2 feat: prefer raw-Markdown (.html->.md) over Playwright for developer.salesforce.com docs
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) <noreply@anthropic.com>
2026-06-24 13:05:26 -07:00
..
scripts feat: @W-22444026@ Introducing Core Skills, Datacloud Skills, Industries and Utility Skills. (#268) 2026-05-14 19:32:15 +05:30
README.md feat: prefer raw-Markdown (.html->.md) over Playwright for developer.salesforce.com docs 2026-06-24 13:05:26 -07:00
requirements.txt feat: @W-22444026@ Introducing Core Skills, Datacloud Skills, Industries and Utility Skills. (#268) 2026-05-14 19:32:15 +05:30
SKILL.md feat: prefer raw-Markdown (.html->.md) over Playwright for developer.salesforce.com docs 2026-06-24 13:05:26 -07:00

fetching-salesforce-docs

What it is

fetching-salesforce-docs is a prompt-only skill.

It gives a practical retrieval playbook for official Salesforce docs on the public web, especially when:

  • developer.salesforce.com pages are JS-heavy
  • help.salesforce.com pages return shell content
  • architect.salesforce.com / admin.salesforce.com pages need browser-rendered extraction
  • lightningdesignsystem.com pages contain official SLDS guidance
  • the real answer is on a child page, not the guide homepage

What it is not

This skill does not include:

  • local corpus workflows
  • indexing
  • benchmark workflows
  • any required helper CLI dependency
  • PDF fallback guidance

Use it for

  • official Salesforce docs lookup
  • hard-to-fetch Help articles
  • Apex / API / LWC / Agentforce documentation grounding
  • 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:

python3 skills/fetching-salesforce-docs/scripts/extract_salesforce_doc.py \
  --url "https://help.salesforce.com/s/articleView?id=service.miaw_security.htm&type=5" \
  --pretty

Behavior:

  • automatically routes help.salesforce.com URLs into the dedicated Help extractor
  • supports official Salesforce-owned doc hosts such as developer.salesforce.com, architect.salesforce.com, admin.salesforce.com, lightningdesignsystem.com, and other official Salesforce documentation pages
  • supports optional best-effort stealth mode via --stealth

Dependencies for the helper scripts live in:

  • skills/fetching-salesforce-docs/requirements.txt

The installer sets up an isolated runtime under ~/.claude/.fetching-salesforce-docs-runtime, installs those Python packages there, and installs the Playwright Chromium browser automatically during install/update.

The underlying Help extractor is also available directly at:

python3 skills/fetching-salesforce-docs/scripts/extract_help_salesforce.py \
  --url "https://help.salesforce.com/s/articleView?id=service.miaw_security.htm&type=5" \
  --pretty

Key idea

Keep retrieval:

  • official-source-first
  • HTML-only
  • targeted
  • child-link aware
  • strict about exact concept matching