platform-docs-get
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineseplatform-docs-get
platform-docs-get
Use this skill to retrieve and ground answers in official Salesforce documentation on the public web.
This skill provides a reliable online retrieval playbook for Salesforce docs that are hard to fetch, especially , JS-heavy , Lightning Design System docs on , and other official Salesforce-owned doc pages such as and .
help.salesforce.comdeveloper.salesforce.comlightningdesignsystem.comarchitect.salesforce.comadmin.salesforce.comOptional extraction scripts are available in — see the Reference File Index below.
scripts/使用此技能可检索并基于公开网络上的官方Salesforce文档生成回答。
本技能为难以抓取的Salesforce文档提供了一套可靠的在线检索方案,尤其是、包含大量JS的、上的Lightning Design System文档,以及其他Salesforce自有官方文档页面,如和。
help.salesforce.comdeveloper.salesforce.comlightningdesignsystem.comarchitect.salesforce.comadmin.salesforce.comscripts/Scope
适用范围
| In scope | Official Salesforce doc retrieval: Apex, API, LWC, metadata, Agentforce, setup articles, SLDS, architect/admin guidance |
| Out of scope | Third-party blogs, PDF fallback, local corpus indexing, benchmark workflows, generating code or metadata |
| 适用场景 | 官方Salesforce文档检索:Apex、API、LWC、元数据、Agentforce、设置文章、SLDS、架构师/管理员指南 |
| 不适用场景 | 第三方博客、PDF备用方案、本地语料库索引、基准测试工作流、生成代码或元数据 |
Required Inputs
必要输入
Before fetching, identify:
- The exact concept, identifier, class, method, or feature name being requested
- The likely doc family (developer docs, help articles, design system, architect/admin)
No additional setup is required to use the retrieval playbook in this skill. The optional extraction scripts require — see .
playwrightrequirements.txt在抓取前,请明确:
- 所请求的确切概念、标识符、类、方法或功能名称
- 文档所属的可能类别(开发者文档、帮助文章、设计系统、架构师/管理员文档)
使用本技能中的检索方案无需额外设置。可选提取脚本需要依赖——详见。
playwrightrequirements.txtOfficial Sources Only
仅使用官方来源
Prefer Salesforce-owned documentation sources:
developer.salesforce.comhelp.salesforce.comarchitect.salesforce.comadmin.salesforce.comlightningdesignsystem.com- other 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.
优先选择Salesforce自有文档来源:
developer.salesforce.comhelp.salesforce.comarchitect.salesforce.comadmin.salesforce.comlightningdesignsystem.com- 其他被Salesforce用作事实来源的官方文档页面
除非用户明确要求,否则避免使用第三方博客、视频或摘要文章。
请勿退而求其次使用PDF。
Retrieval Workflow
检索工作流
1. Classify the request first
1. 先对请求进行分类
Before fetching anything, identify the likely doc family.
| Family | Typical Source | Use For |
|---|---|---|
| Developer docs | | Apex, APIs, LWC, metadata, Agentforce developer docs |
| Help docs | | setup, admin, product configuration |
| Architect/Admin docs | | best practices, patterns, well-architected guidance, admin enablement |
| Design system docs | | SLDS, Cosmos, design tokens, component and styling guidance |
| Legacy atlas docs | | older official guide and reference docs |
在开始抓取前,先确定文档所属的可能类别。
| 类别 | 典型来源 | 适用场景 |
|---|---|---|
| 开发者文档 | | Apex、API、LWC、元数据、Agentforce开发者文档 |
| 帮助文档 | | 设置、管理员操作、产品配置 |
| 架构师/管理员文档 | | 最佳实践、模式、架构设计指南、管理员赋能 |
| 设计系统文档 | | SLDS、Cosmos、设计令牌、组件与样式指南 |
| 旧版atlas文档 | | 较旧的官方指南与参考文档 |
2. Identify the exact concept
2. 明确确切概念
Extract the real target before you search:
- exact API/class/method name
- exact feature name
- exact product phrase
- exact setup concept
Examples:
Lightning Message ServiceWire ServiceSystem.StubProviderAgentforce ActionsMessaging for In-App and Web allowed domains
在搜索前提取真正的目标:
- 准确的API/类/方法名称
- 准确的功能名称
- 准确的产品术语
- 准确的设置概念
示例:
Lightning Message ServiceWire ServiceSystem.StubProviderAgentforce ActionsMessaging for In-App and Web allowed domains
3. Prefer targeted official retrieval
3. 优先使用针对性官方检索
Do not broad-crawl Salesforce docs.
Instead:
- identify the most likely official guide root or article
- if search is needed, restrict it to official Salesforce domains only
- fetch that official page
- check whether the exact concept actually appears on the page
- if not, inspect and follow the most relevant 1–3 official child links
- stop once you have grounded evidence
请勿对Salesforce文档进行广泛爬取。
正确做法:
- 确定最可能的官方指南根页面或文章
- 若需要搜索,仅限制在Salesforce官方域名内
- 抓取该官方页面
- 检查页面上是否确实包含确切概念
- 若未找到,检查并跟随最相关的1–3个官方子链接
- 找到可作为依据的内容后停止
4. Do not stop at broad landing pages
4. 不要停留在宽泛的着陆页
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
指南着陆页不足以作为回答依据,除非页面明确包含所请求的确切概念。
这一点在以下场景中尤为重要:
- LWC文档
- Agentforce文档
- 宽泛的平台指南首页
- 链接到实际文章的帮助着陆页
5. For developer.salesforce.com
developer.salesforce.com5. 针对developer.salesforce.com
的处理方案
developer.salesforce.comUse 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
使用以下方案:
- 从最可能的官方指南根页面开始
- 若页面包含大量JS,优先使用浏览器渲染提取内容
- 检查页面上是否包含确切概念
- 若未找到概念,检查官方子链接并跟随最匹配的1–3个链接
- 优先选择包含确切概念的页面,而非宽泛的指南根页面
- 若旧版atlas页面是该概念的真正官方参考,则可使用
6. For help.salesforce.com
help.salesforce.com6. 针对help.salesforce.com
的处理方案
help.salesforce.comHelp pages often fail with naive fetching.
Use this playbook:
- prefer exact URLs when available
articleView?id=... - use browser-rendered extraction when plain fetch returns shell content
- treat outputs like ,
Loading,Sorry to interrupt, or mostly chrome/navigation text as failed extraction, not evidenceCSS Error - 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
帮助页面通常无法通过普通抓取方式获取内容。
使用以下方案:
- 若有可用的精确URL,优先使用
articleView?id=... - 当普通抓取返回shell内容时,使用浏览器渲染提取
- 将、
Loading、Sorry to interrupt等输出,或主要为导航/框架文本的内容视为提取失败,而非有效依据CSS Error - 寻找真正的文章主体,而非仅标题、导航或页脚文本
- 拒绝shell页面和软404页面,例如:
- "We looked high and low but couldn't find that page"(我们四处查找但未找到该页面)
- 通用空帮助shell页面
- 若从相关指南或枢纽页面开始,跟随链接的帮助文章直到找到真正的文章主体
- 若经过针对性重试后提取仍失败,返回找到的最佳官方帮助URL,并明确说明文章主体提取未成功
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
只有满足以下至少一个条件的页面,才足以作为回答依据:
- 页面上包含确切标识符
- 页面上包含确切概念术语
- 多个与查询相关的术语出现在正确的官方语境中
以下情况的页面不足以作为依据:
- 仅为宽泛的着陆页
- 为shell页面,几乎没有实际文章文本
- 来自错误的产品领域
- 不包含所请求的标识符或概念
- 在官方页面存在的情况下使用第三方解释
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
以下内容不得作为最终依据:
- 不包含确切概念的宽泛指南首页
- 在需要概念/参考页面时使用发布说明
- 在需要开发者文档时使用管理员博客文章
- 在官方文档可用时使用第三方博客
- 无实际文章主体的shell渲染页面
- 标题看似匹配但主体不包含所请求概念的页面
Grounding Requirements
落地要求
When answering, include:
- guide/article title
- exact official URL
- source type:
- developer doc page
- atlas reference page
- help article page
- any caveat if extraction was partial or browser-rendered
If evidence is weak, say so plainly.
回答时需包含:
- 指南或文章标题
- 精确的官方URL
- 来源类型:
- 开发者文档页面
- atlas参考页面
- 帮助文章页面
- 若提取为部分内容或通过浏览器渲染,需注明相关说明
若依据不足,请直接说明。
Examples
示例
Example: Lightning Message Service
示例: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.
请勿停留在通用LWC指南根页面。
找到Lightning Message Service的精确LWC页面,或从LWC文档中跟随最相关的子链接直到找到确切概念。
Example: Wire Service
示例:Wire Service
Do not answer from the LWC homepage unless is actually present there.
Follow the relevant child doc page for wire service or wire adapters.
Wire Service除非确实出现在LWC首页,否则请勿从该页面获取回答。
跟随wire service或wire适配器的相关子文档页面。
Wire ServiceExample: Agentforce Actions
示例: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.
请勿从宽泛的Agentforce着陆页或博客文章获取回答。
找到Agentforce官方开发者页面中关于actions的内容,或从官方Agentforce文档中跟随最匹配的子页面。
Example: Messaging for In-App and Web allowed domains
示例: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.
优先使用官方帮助文章和浏览器渲染提取。
拒绝通用帮助shell页面。必要时从相关官方消息文档中跟随链接的帮助文章。
Example: System.StubProvider
示例: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.
优先选择包含确切标识符的官方Salesforce参考/开发者页面。
若标识符不存在,请勿使用更宽泛的Apex着陆页替代。
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
本技能不应:
- 维护本地文档语料库
- 依赖本地索引
- 使用PDF备用方案
- 运行基准测试工作流
- 依赖仓库特定脚本才能生效
Output Expectations
输出期望
For each retrieval, include:
- Guide or article title
- Exact official URL
- Source type (developer doc page / atlas reference page / help article page)
- Any caveat if extraction was partial or browser-rendered
If evidence is weak, say so plainly rather than forcing an answer.
每次检索需包含:
- 指南或文章标题
- 精确的官方URL
- 来源类型(开发者文档页面 / atlas参考页面 / 帮助文章页面)
- 若提取为部分内容或通过浏览器渲染,需注明相关说明
若依据不足,请直接说明,而非强行生成回答。
Reference File Index
参考文件索引
| File | When to read |
|---|---|
| Use to fetch any official Salesforce doc URL; automatically routes |
| Use directly when targeting |
| Imported by the extraction scripts to resolve the isolated platform-docs-get Python runtime and Playwright browser path; not called directly |
| Lists Python dependencies ( |
| 文件 | 阅读场景 |
|---|---|
| 用于抓取任何官方Salesforce文档URL;自动将 |
| 直接用于定位 |
| 由提取脚本导入,用于解析独立的platform-docs-get Python运行时和Playwright浏览器路径;不直接调用 |
| 列出运行提取脚本所需的Python依赖( |