sf-docs

jaganpro/sf-skills · updated Apr 8, 2026

MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.

$npx skills add https://github.com/jaganpro/sf-skills --skill sf-docs
0 commentsdiscussion
summary

Use this skill to retrieve and ground answers in official Salesforce documentation on the public web.

skill.md

sf-docs

Use this skill to retrieve and ground answers in official Salesforce documentation on the public web.

This skill is intentionally simple:

  • no local corpus
  • no indexing
  • no benchmark workflow
  • no helper CLI dependency
  • no PDF fallback

Its job is to provide a reliable online retrieval playbook for Salesforce docs that are hard to fetch, especially help.salesforce.com, JS-heavy developer.salesforce.com, Lightning Design System docs on lightningdesignsystem.com, and other official Salesforce-owned doc pages such as architect.salesforce.com and admin.salesforce.com.

An optional wrapper script is available at:

  • skills/sf-docs/scripts/extract_salesforce_doc.py

It automatically routes help.salesforce.com URLs into the dedicated Help extractor and supports other official documentation pages such as *.salesforce.com and lightningdesignsystem.com through a generic browser-rendered path. For bot-sensitive pages, it also supports best-effort optional stealth mode via --stealth when playwright-stealth is installed.

The dedicated Help extractor is also available directly at:

  • skills/sf-docs/scripts/extract_help_salesforce.py

Core Goal

Find the best official Salesforce HTML page online and extract enough real content to answer confidently.

If the evidence is weak, say so clearly instead of forcing a weak answer.

When to Use

Use sf-docs when a user asks for:

  • official Salesforce documentation
  • Apex, API, LWC, metadata, Agentforce, setup, or help articles
  • docs from developer.salesforce.com
  • docs from help.salesforce.com
  • pages that look JS-heavy, shell-rendered, or difficult to read with ordinary fetches

Official Sources Only

Prefer Salesforce-owned documentation sources:

  • developer.salesforce.com
  • help.salesforce.com
  • architect.salesforce.com
  • admin.salesforce.com
  • lightningdesignsystem.com
  • other relevant official Salesforce documentation pages when Salesforce uses them as the source of truth

Avoid third-party blogs, videos, or summary articles unless the user explicitly asks for them.

Do not fall back to PDFs.

Retrieval Workflow

1. Classify the request first

Before fetching anything, identify the likely doc family.

Family Typical Source Use For
Developer docs developer.salesforce.com/docs/... Apex, APIs, LWC, metadata, Agentforce developer docs
Help docs help.salesforce.com/... setup, admin, product configuration
Architect/Admin docs architect.salesforce.com/..., admin.salesforce.com/... best practices, patterns, well-architected guidance, admin enablement
Design system docs lightningdesignsystem.com/... SLDS, Cosmos, design tokens, component and styling guidance
Legacy atlas docs developer.salesforce.com/docs/atlas.en-us.* older official guide and reference docs

2. Identify the exact concept

Extract the real target before you search:

  • exact API/class/method name
  • exact feature name
  • exact product phrase
  • exact setup concept

Examples:

  • Lightning Message Service
  • Wire Service
  • System.StubProvider
  • Agentforce Actions
  • Messaging for In-App and Web allowed domains

3. Prefer targeted official retrieval

Do not broad-crawl Salesforce docs.

Instead:

  1. identify the most likely official guide root or article
  2. if search is needed, restrict it to official Salesforce domains only
  3. fetch that official page
  4. check whether the exact concept actually appears on the page
  5. if not, inspect and follow the most relevant 1–3 official child links
  6. stop once you have grounded evidence

4. Do not stop at broad landing pages

A guide landing page is not enough unless it clearly contains the exact requested concept.

This is especially important for:

  • LWC docs
  • Agentforce docs
  • broad platform guide homepages
  • help landing pages that link to the real article

5. For developer.salesforce.com

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
  • if the concept is missing, inspect official child links and follow the best matching 1–3 links
  • prefer exact concept pages over broad guide roots
  • legacy atlas pages are valid if they are the real official reference for the concept

6. For help.salesforce.com

Help pages often fail with naive fetching.

Use this playbook:

  • prefer exact articleView?id=... URLs when available
  • use browser-rendered extraction when plain fetch returns shell content
  • treat outputs like Loading, Sorry to interrupt, CSS Error, or mostly chrome/navigation text as failed extraction, not evidence
  • look for the real article body, not just header, nav, or footer text
  • reject shell pages and soft-404 pages such as:
    • "We looked high and low but couldn't find that page"
    • generic empty help shells
  • if starting from a nearby guide or hub page, follow linked Help articles until you reach the real article body
  • if extraction still fails after targeted retries, return the best official Help URLs you found and explicitly say that article-body extraction was unsuccessful

Acceptance Rules

A page is good enough to answer from only when at least one of these is true:

  • the exact identifier appears on the page
  • the exact concept phrase appears on the page
  • multiple query-specific phrases appear in the correct official context

A page is not good enough when:

  • it is only a broad landing page
  • it is a shell page with little real article text
  • it is from the wrong product area
  • it does not contain the requested identifier or concept
  • it is a third-party explanation when an official page should exist

Rejection Rules

Reject these as final evidence:

  • broad guide homepages without the exact concept
  • release notes when a concept/reference page is expected
  • admin blog posts when developer docs are requested
  • third-party blogs when official docs are available
  • shell-rendered pages with no real article body
  • pages whose titles sound right but whose body does not contain the requested concept

Grounding Requirements

When answering, include:

  1. guide/article title
  2. exact official URL
  3. source type:
    • developer doc page
    • atlas reference page
    • help article page
  4. any caveat if extraction was partial or browser-rendered

If evidence is weak, say so plainly.

Examples

Example: Lightning Message Service

Do not stop at the general LWC guide root. Find the exact LWC page for Lightning Message Service or follow the most relevant child links from the LWC docs until the exact concept appears.

Example: Wire Service

Do not answer from the LWC homepage unless Wire Service is actually present there. Follow the relevant child doc page for wire service or wire adapters.

Example: Agentforce Actions

Do not answer from a broad Agentforce landing page or a blog post. Find the official Agentforce developer page for actions, or follow the best matching child pages from the official Agentforce docs.

Example: Messaging for In-App and Web allowed domains

Prefer official Help articles and browser-rendered extraction. Reject generic help shells. Follow linked Help articles from nearby official messaging docs if needed.

Example: System.StubProvider

Prefer the official Salesforce reference/developer page where the exact identifier appears. Do not substitute a broader Apex landing page if the identifier is absent.

Non-Goals

This skill should not:

  • maintain a local documentation corpus
  • rely on a local index
  • use PDF fallback
  • run benchmark workflows
  • depend on repo-specific scripts to be useful

Cross-Skill Role

Other sf-* skills should use sf-docs when they need authoritative Salesforce documentation instead of relying on generic search alone.

how to use sf-docs

How to use sf-docs on Cursor

AI-first code editor with Composer

1

Prerequisites

Before installing skills in Cursor, ensure your development environment meets these requirements:

  • Cursor installed and configured on your development machine
  • Node.js version 16.0+ with npm package manager (verify with node --version)
  • Active project directory or workspace where you want to add sf-docs
2

Execute installation command

Execute the skills CLI command in your project's root directory to begin installation:

$npx skills add https://github.com/jaganpro/sf-skills --skill sf-docs

The skills CLI fetches sf-docs from GitHub repository jaganpro/sf-skills and configures it for Cursor.

3

Select Cursor when prompted

The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:

◆ Which agents do you want to install to?
│ ── Universal (.agents/skills) ── always included ────
│ • Amp
│ • Antigravity
│ • Cline
│ • Codex
│ ●Cursor(selected)
│ • Cursor
│ • Windsurf
4

Verify installation

Confirm successful installation by checking the skill directory location:

.cursor/skills/sf-docs

Reload or restart Cursor to activate sf-docs. Access the skill through slash commands (e.g., /sf-docs) or your agent's skill management interface.

Security & Verification Notice

We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.

Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.

List & Monetize Your Skill

Submit your Claude Code skill and start earning

GET_STARTED →

Use Cases

Task Automation & Efficiency

Automate repetitive workflows and reduce manual effort

Example

Generate reports, summarize documents, draft communications

Save 3-5 hours per week on routine tasks

Knowledge Enhancement

Learn new skills, understand complex topics, get expert guidance

Example

Explain concepts, provide examples, suggest learning resources

Accelerate learning and skill development by 2x

Quality Improvement

Enhance output quality through reviews, suggestions, and refinements

Example

Review drafts, suggest improvements, catch errors

Improve work quality by 30-40% with less effort

Implementation Guide

Prerequisites

  • Claude Desktop or compatible AI client with skill support
  • Clear understanding of task or problem to solve
  • Willingness to iterate and refine outputs

Time Estimate

15-45 minutes depending on use case complexity

Installation Steps

  1. 1.Install skill using provided installation command
  2. 2.Test with simple use case relevant to your work
  3. 3.Evaluate output quality and relevance
  4. 4.Iterate on prompts to improve results
  5. 5.Integrate into regular workflow if valuable

Common Pitfalls

  • Expecting perfect results without iteration
  • Not providing enough context in prompts
  • Using skill for tasks outside its intended scope
  • Accepting outputs without review and validation

Best Practices

✓ Do

  • +Start with clear, specific prompts
  • +Provide relevant context and constraints
  • +Review and refine all outputs before using
  • +Iterate to improve output quality
  • +Document successful prompt patterns

✗ Don't

  • Don't use without understanding skill limitations
  • Don't skip validation of outputs
  • Don't share sensitive information in prompts
  • Don't expect skill to replace human judgment

💡 Pro Tips

  • Be specific about desired format and style
  • Ask for multiple options to choose from
  • Request explanations to understand reasoning
  • Combine AI efficiency with human expertise

When to Use This

✓ Use When

Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.

✗ Avoid When

Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.

Learning Path

  1. 1Familiarize yourself with skill capabilities and limitations
  2. 2Start with low-risk, non-critical tasks
  3. 3Progress to more complex and valuable use cases
  4. 4Build expertise through regular use and experimentation

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.544 reviews
  • Lucas Sethi· Dec 28, 2024

    Useful defaults in sf-docs — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Chaitanya Patil· Dec 20, 2024

    Useful defaults in sf-docs — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Fatima Brown· Dec 8, 2024

    We added sf-docs from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • Evelyn Farah· Dec 8, 2024

    Solid pick for teams standardizing on skills: sf-docs is focused, and the summary matches what you get after install.

  • Pratham Ware· Dec 4, 2024

    sf-docs reduced setup friction for our internal harness; good balance of opinion and flexibility.

  • Amina Sethi· Dec 4, 2024

    sf-docs is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Olivia Yang· Nov 27, 2024

    Keeps context tight: sf-docs is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • Sakura Sanchez· Nov 27, 2024

    sf-docs reduced setup friction for our internal harness; good balance of opinion and flexibility.

  • Noah Li· Nov 27, 2024

    I recommend sf-docs for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

  • Lucas Brown· Nov 23, 2024

    sf-docs fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

showing 1-10 of 44

1 / 5