New to Claude Skills? Learn how to install them →

forcedotcom on GitHub

Agentic Setup Categories Fetch

OfficialFree

Retrieve prompt categories from Salesforce effortlessly.

Get this skill

Free · Opens the source repo

What Agentic Setup Categories Fetch does

The Agentic Setup Categories Fetch skill allows you to retrieve prompt categories from a connected Salesforce organization using the Connect API. This skill is particularly useful for developers and designers working with Salesforce who need to access and display available prompt categories for their applications. By calling the GET /agenticsetup/categories endpoint, you can obtain a structured list of categories and their associated prompts, which can facilitate the development of user interfaces or integrations that rely on these categories.

To use this skill, you must have a connected Salesforce org that is authenticated via the Salesforce CLI. The skill supports an optional parameter to include nested prompts within the categories, providing a more detailed view of the available prompts. The response is parsed into a clear format that lists the categories along with their names and labels, and if requested, includes any nested prompts under each category. This structured output can be directly utilized in applications or for reporting purposes.

The skill also includes error handling to manage common issues such as authentication failures or feature availability, ensuring that users receive informative feedback when something goes wrong. This makes it easier to troubleshoot issues related to accessing the API or understanding the limitations of the connected org's setup.

Overall, this skill is designed for Salesforce developers and administrators who need a straightforward way to fetch and utilize prompt categories from the Agentic Setup, streamlining the integration process and enhancing application functionality.

When to use it

Use this skill when you need to retrieve and display prompt categories from a Salesforce org, especially when developing applications that rely on these categories.

When not to use it

Do not use this skill if you need to create or modify prompt categories, as it only supports read operations.

What you can build with it

Integrating Prompt Categories in an App

Use this skill to fetch prompt categories for a Salesforce-based application, enhancing user experience with structured data.

Reporting on Available Prompts

Leverage this skill to generate reports on available prompt categories and their nested prompts for internal documentation or analysis.

Troubleshooting API Connectivity

Utilize the error handling features of this skill to diagnose and resolve issues related to API connectivity and permissions.

How to install Agentic Setup Categories Fetch

View source

1. Install with the skills CLI

npx skills add forcedotcom/sf-skills/platform-agentsetup-categories-fetch --agent claude-code

2. Or install it manually

Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.

Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs

Inside SKILL.md

Written by forcedotcom

platform-agentsetup-categories-fetch

Fetch prompt categories from the Agentic Setup Categories Connect API on a connected Salesforce org.

Scope

In scope:

  • Calling GET /services/data/{apiVersion}/agenticsetup/categories via SF CLI
  • Passing the fetchPrompts query parameter to include nested prompts
  • Parsing and presenting the JSON response (categories, labels, prompts)
  • Handling errors (403 when feature is disabled, auth failures)

Out of scope — delegate elsewhere:

  • Creating or modifying prompt categories → not supported via this API (read-only)
  • Org authentication setup → use sf org login separately
  • Permission set assignment → assigning-permission-set

Required Inputs

The agent needs:

  • A connected org (already authenticated via sf org login)
  • Optionally: whether to include nested prompts (fetchPrompts=true)
  • Optionally: target API version (default: v67.0). Replace v67.0 in the URL with the user-specified version if provided.

Workflow

1. Verify org connectivity

sf org display --json

Confirm the org is authenticated and extract the instance URL. If no default org is set, ask the user which org to target with --target-org.

2. Call the Categories API

Basic call (categories only):

sf api request rest /services/data/v67.0/agenticsetup/categories --method GET

With nested prompts:

sf api request rest "/services/data/v67.0/agenticsetup/categories?fetchPrompts=true" --method GET

3. Parse and present the response

The API returns a JSON object with a categories array. Each category has name, label, and prompts fields. See references/api-response-schema.md for the full response structure and examples for both fetchPrompts=true and fetchPrompts=false.

Present the results clearly:

  • List categories with their name and label
  • If fetchPrompts=true was used, show nested prompts under each category
  • Note any categories with empty prompts arrays (means no prompts exist for that category)

4. Handle errors

ErrorMeaningAction
Success (exit 0)200 OKParse and display results
FUNCTIONALITY_NOT_ENABLEDFeature not enabled for this org/userTell user the Agentic Setup Categories feature needs to be enabled — check Setup > Einstein/Agentforce
INVALID_SESSION_IDSession expiredRe-authenticate with sf org login
NOT_FOUNDEndpoint not foundAPI version too old or feature not deployed to this org

Rules / Constraints

RuleRationale
Always use sf api request rest — never curl or raw HTTPcurl bypasses ~/.sfdx session tokens and requires manual Authorization headers, making it brittle
NEVER use SOQL queriesCategories are NOT in standard objects — only available via this Connect REST API
NEVER generate files (LWC, Apex, XML)This is a data-fetching task, not a code generation task
Default to v67.0 unless user specifiesThis is the min-version where the endpoint was introduced
Don't pass fetchPrompts unless askedReduces payload size; prompts can be large
Categories are sorted by labelThe API returns them alphabetically — don't re-sort
Prompts are sorted by textWithin each category, prompts come alphabetically

Output Expectations

When finishing, present:

  1. Number of categories returned
  2. Category list — name and label for each
  3. Prompts (if requested) — nested under their category
  4. Any errors encountered with suggested fixes

Reference File Index

FileWhen to read
references/api-response-schema.mdWhen you need to understand the full response structure and field descriptions

Frequently asked questions about Agentic Setup Categories Fetch

Similar skills