
Sf Docs
Ground Salesforce Apex, LWC, API, and Agentforce answers in official Salesforce web docs when static fetches return JS shells or empty help pages.
Overview
sf-docs is an agent skill for the Build phase that retrieves and grounds answers in official Salesforce documentation using a web-first playbook for hard-to-fetch Help and Developer pages.
Install
npx skills add https://github.com/jaganpro/sf-skills --skill sf-docsWhat is this skill?
- Prompt-only retrieval playbook for official Salesforce documentation on the public web
- Handles JS-heavy developer.salesforce.com and shell-like help.salesforce.com pages via browser-rendered extraction guida
- Covers architect.salesforce.com, admin.salesforce.com, and lightningdesignsystem.com official guidance
- Instructs agents to follow child links from broad guide homepages and reject weak third-party summaries
- Optional extract_salesforce_doc.py wrapper with automatic Help URL routing
- Optional Python extractor script with dedicated Help URL routing
Adoption & trust: 1.1k installs on skills.sh; 418 GitHub stars; 2/3 security scanners passed (skills.sh audits).
What problem does it solve?
Your agent cites stale blogs or empty Help shells because official Salesforce documentation pages do not return usable text to a simple HTTP fetch.
Who is it for?
Indie developers and consultants implementing Salesforce features who need verified official doc text during agent-assisted coding.
Skip if: Offline corpus search, benchmark workflows, PDF-only doc sets, or non-Salesforce stack documentation—the skill explicitly excludes those paths.
When should I use this skill?
Official Salesforce docs lookup, hard-to-fetch Help articles, or grounding Apex, API, LWC, and Agentforce work on first-party pages.
What do I get? / Deliverables
You get answers anchored to official Salesforce doc hosts with guidance to drill into child pages and optional scripted extraction for Help URLs.
- Official doc excerpts or structured extraction JSON
- Child-page follow-up guidance when homepage is too broad
Recommended Skills
Journey fit
Canonical shelf is Build because the skill supports implementation-time lookups on the Salesforce platform, not idea research or growth SEO. Integrations subphase reflects tying agent work to Salesforce-owned hosts, Help articles, and SLDS—not generic markdown docs in your repo.
How it compares
Use this research playbook instead of generic web-search skills that treat Salesforce Help like normal HTML blogs.
Common Questions / FAQ
Who is sf-docs for?
Solo builders and integrators working in the Salesforce ecosystem who want agent answers tied to developer.salesforce.com, Help, Architect, Admin, or SLDS—not random Medium posts.
When should I use sf-docs?
Use it during Build integrations whenever you need official Apex, API, LWC, Agentforce, or security documentation and pages fail naive fetch or only show JS shells.
Is sf-docs safe to install?
It guides network and browser retrieval of public Salesforce docs only; review the Security Audits panel on this page before letting agents run extraction scripts against URLs you supply.
SKILL.md
READMESKILL.md - Sf Docs
# sf-docs Official Salesforce documentation retrieval guidance for `sf-skills`. ## What it is `sf-docs` is now 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 no longer includes: - 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/sf-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/sf-docs/requirements.txt` The installer now sets up an isolated sf-docs runtime under `~/.claude/.sf-docs-runtime`, installs those Python packages there, and installs the Playwright Chromium browser automatically during install/update. The underlying Help extractor is still available directly at: ```bash python3 skills/sf-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/sf-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 Gecko) " "Chrome/122.0.0.