
Fetching Salesforce Docs
Ground agent answers in official Salesforce web docs when developer, Help, Architect, Admin, or SLDS pages need browser-grade extraction.
Install
npx skills add https://github.com/forcedotcom/sf-skills --skill fetching-salesforce-docsWhat is this skill?
- Retrieval playbook for JS-heavy developer.salesforce.com pages
- Dedicated routing for help.salesforce.com shell content via Help extractor
- Official hosts: architect, admin, lightningdesignsystem.com guidance
- Child-link strategy when guide homepages are too broad
- Rejects shells, landing pages, and third-party summaries
Adoption & trust: 736 installs on skills.sh; 513 GitHub stars; 2/3 security scanners passed (skills.sh audits).
Recommended Skills
Entra App Registrationmicrosoft/azure-skills
Azure Aigatewaymicrosoft/azure-skills
Lark Openapi Explorerlarksuite/cli
Supabasesupabase/agent-skills
Firebase Auth Basicsfirebase/agent-skills
Firebase Data Connectfirebase/agent-skills
Journey fit
Primary fit
Build / integrations is the canonical shelf because the playbook targets Apex, APIs, LWC, and Agentforce implementation against official Salesforce sources. Integrations reflects CRM extension work and doc-grounded coding rather than generic idea-stage reading alone.
Common Questions / FAQ
Is Fetching Salesforce Docs safe to install?
skills.sh reports 2 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.
SKILL.md
READMESKILL.md - Fetching Salesforce Docs
# 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 ## Optional utility A tiny wrapper is available for official Salesforce doc URLs: ```bash 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: ```bash 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** playwright playwright-stealth #!/usr/bin/env python3 """ Extract article content from help.salesforce.com using a real browser, deep shadow DOM traversal, and Salesforce Help-specific heuristics. Why this exists: - help.salesforce.com is heavily client-rendered - the real article body often lives inside custom elements and shadow roots - naive HTML fetching often returns shell text like "Loading", "Sorry to interrupt", or CSS/runtime error wrappers instead of the actual documentation This script: - renders the page with Playwright - waits for the Help article app to hydrate - traverses nested shadow roots - prioritizes Salesforce Help article-body containers such as `.slds-text-longform` - returns structured JSON with the extracted article text and official child links Example: python3 skills/fetching-salesforce-docs/scripts/extract_help_salesforce.py \ --url "https://help.salesforce.com/s/articleView?id=service.miaw_security.htm&type=5" """ from __future__ import annotations import argparse import json import re import sys from typing import Any, Dict, List, Tuple from urllib.parse import urlparse from runtime_bootstrap import maybe_reexec_in_sf_docs_runtime maybe_reexec_in_sf_docs_runtime(__file__) from playwright.sync_api import TimeoutError as PlaywrightTimeoutError from playwright.sync_api import sync_playwright try: from playwright_stealth import Stealth except ImportError: Stealth = None try: from playwright_stealth import stealth_sync except ImportError: stealth_sync = None USER_AGENT = ( "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) " "AppleWebKit/537.36 (KHTML, like