
forcedotcom/afv-library
29 skills39.4k installs14.9k starsGitHub
Install
npx skills add https://github.com/forcedotcom/afv-librarySkills in this repo
1Generating ApexGenerating-apex is a template-oriented agent skill from the AFV library that helps solo and small teams produce consistent Salesforce Apex abstract base classes for integration families. The stub encodes with sharing, a default HTTP timeout, protected configuration state, and abstract methods subclasses must implement for endpoints and headers, plus inline examples for Salesforce API callouts. Use it when you are standardizing multiple integration services so each extension shares error handling, timeout policy, and documentation structure instead of one-off classes. The readme fragment includes placeholder tokens such as {ClassName} and example merge markers, so the agent fills in domain-specific names and behavior while preserving the architectural pattern. It fits builders on Agentforce or custom Salesforce backends who want generator-assisted Apex rather than copying stale snippets from old projects.1.4kinstalls2Generating Apex TestGenerating Apex Test is an agent skill from the Salesforce AFV library that scaffolds private @isTest classes for a named class under test. Solo builders and small teams shipping on Salesforce use it when they need consistent structure for bulk scenarios (251+ records), happy-path behavior, and negative or exception cases without rewriting the same boilerplate each sprint. The skill emits a comment-header test class, TestSetup that bulk-creates accounts, positive methods with Test.startTest/stopTest boundaries, and stubbed negative tests ready for your agent to wire to real methods and SOQL assertions. It does not run tests or deploy metadata; it accelerates compliant test authoring so agents and humans share one pattern for governor-limit-sensitive bulk coverage and readable failure messages.1.4kinstalls3Generating FlowGenerating-flow is an agent skill that turns natural-language automation requests into deployable Salesforce Flow metadata XML. Solo builders and small teams on Salesforce use it when they need screen-guided processes, background autolaunched logic, record-triggered updates, or scheduled jobs without writing Apex. The workflow is opinionated: the agent must run the three-step MCP pipeline against grounded object metadata, select flow elements, then emit generation output rather than inventing XML by hand. It fits early-to-mid Build when you are wiring CRM processes, approval paths, notifications, and field automation. Because it depends on Salesforce MCP tooling and org metadata, it is narrower than generic workflow skills but deeper on Flow types, triggers, and metadata constraints that block deployment.1.4kinstalls4Generating Custom FieldGenerating Custom Field is a Salesforce-focused agent skill from the AFV library that produces CustomField metadata XML only after enforced constraint checks, with extra rigor on roll-up summaries and master-detail relationships that commonly fail Metadata API deploys. Solo builders extending Salesforce for a B2B SaaS or internal ops tool use it when chat-generated XML would otherwise break on relationship cardinality or summary field format. The skill is phase-specific to build integrations: you already chose Salesforce as the system of record and now need reliable field definitions, relationship wiring, and formula fields. Pair outputs with your org’s change management—sandbox deploy, peer review, and regression tests on dependent automations. Prism lists it for agents that must treat field generation as validated infrastructure code, not free-form snippets.1.4kinstalls5Generating Custom ObjectGenerating Custom Object is an agent skill for solo and indie builders shipping on Salesforce who need correct CustomObject metadata without repeated deploy failures. Install it when users mention custom objects, `.object` or `.object-meta.xml` files, sharing models, validation rules on objects, or errors around Master-Detail relationships. The skill encodes mandatory constraints the agent must verify before emitting XML, aligning API name with filename and required elements so the Metadata API accepts the package. It fits the build phase as platform integration work: configuring object capabilities, security and sharing settings, and troubleshooting deployment-specific object errors rather than ad-hoc XML from chat. Compared with guessing field XML from memory, it foregrounds spec-driven checks that map directly to common Salesforce CLI and CI deploy pain points for small teams maintaining orgs or ISV packages.1.4kinstalls6Generating Permission SetGenerating Permission Set is a Salesforce-focused agent skill for creating and editing PermissionSet metadata that deploys through the Metadata API (v60.0+). It walks builders from core properties—API name, label, and purpose description—through object permissions with explicit CRUD and record visibility flags, then into field-level security and related permission constructs using copy-paste XML templates aligned to Salesforce SOAP metadata shapes. Solo developers and small SI teams use it when standing up least-privilege access for personas, fixing FLS gaps, or packaging permission sets for CI deploys instead of clicking through Setup. The skill emphasizes correct, deployable XML and administrator-readable labels rather than hand-waving security advice. Pair it with your org’s object model and deployment pipeline; it does not replace org-wide permission set group strategy or manual verification in a full sandbox.1.4kinstalls7Developing AgentforceDeveloping Agentforce is an agent skill for solo builders and small teams shipping on Salesforce who need a repeatable spec before touching Agent Builder or backing services. It walks you through documenting purpose and scope, behavioral rules (what the agent must know, guardrails, escalation), a subagent routing diagram, mutable variables with set/read semantics, and each action’s target URI plus implementation status. The template aligns implementation work with EXISTS versus stub versus full build so your coding agent does not invent missing Apex or Flow. Use it when you are defining a new Agent_API_Name, splitting topics into subagents, or handing a human-readable contract to developers and reviewers. It matters because Agentforce agents fail silently when routing, variables, and action inputs are underspecified; this skill forces those decisions into one citable document.1.4kinstalls8Generating FlexipageGenerating-flexipage is an agent skill for Salesforce builders who need trustworthy Lightning page metadata. It walks agents through creating RecordPage, AppPage, and HomePage FlexiPages, modifying existing pages, and fixing deployment failures when working with flexipage-meta.xml. The guide stresses a hard rule: new pages must start from the CLI template command so regions, components, and XML structure match what deployments expect. Solo and indie developers on Salesforce—or small teams shipping managed packages—use it whenever users mention Lightning pages, adding components to pages, or customizing record experiences. It reduces guesswork around FlexiPage structure and pairs procedural knowledge with platform-specific integration steps so agents do not invent invalid metadata.1.4kinstalls9Generating Custom Tabgenerating-custom-tab is an agent skill for Salesforce builders who need correct CustomTab metadata without guessing XML shape or deployment rules. It triggers on mentions of tabs, navigation tabs, object tabs, web tabs, Visualforce tabs, Lightning component tabs, app page tabs, or tab visibility—and the skill text instructs agents to always use it for custom tab work. You get a specification-oriented walkthrough of required properties such as customObject flags, semantically appropriate motifs, labels for non-object tabs, web URLs, and Visualforce page bindings, plus guidance for adding navigation to custom objects and external content. Solo developers shipping on Salesforce often lack a dedicated admin on call; this skill keeps Claude Code or Cursor agents inside the platform contract so tab changes deploy cleanly alongside the rest of your metadata API project.1.4kinstalls10Generating Custom Lightning Typegenerating-custom-lightning-type is an advanced agent skill for Salesforce teams building Einstein Agent experiences that need rigorous structured types instead of loose JSON blobs. The skill fires on CLT, Custom Lightning Types, JSON schemas for agents, type definitions, lightning__objectType, or editor and renderer configuration—and documentation states to always use this skill for CLT work because the metadata model is easy to miswire. It explains how CLTs describe inputs and outputs on the Lightning Platform, when to reference separate CLTs for nested shapes versus inline standard Lightning types, and how registered identifiers relate to deployment packaging. For solo builders shipping agent features on Salesforce, this compresses a dense metadata area into agent-checklisted steps so action schemas, nested type references, and UI bindings stay consistent before you deploy to an org.1.4kinstalls11Generating Lightning AppGenerating Lightning App is an orchestration skill for solo builders and consultants who need a whole Salesforce Lightning Experience solution from a scenario description—not one custom object or flexipage in isolation. It interprets requests for complete apps, business solutions, and management systems, then defines a Custom Application and sequences dependent metadata (custom objects and fields, tabs, flexipages, flows, validation rules, list views, permission sets, and related types) in an order that respects Salesforce dependencies. When granular AFV library skills exist, it delegates to them; otherwise it generates metadata directly so the agent still reaches a deployable target. The primary journey moment is Build integrations work on a Salesforce org, with a natural handoff to Ship when you validate and push the metadata set. It assumes familiarity with Salesforce concepts and is aimed at agent-assisted metadata authoring rather than hand-clicking Setup for dozens of related items.1.4kinstalls12Generating Custom ApplicationGenerating Custom Application is a focused Salesforce metadata skill for solo builders and admins who need a Lightning app shell—not the entire data model in one shot. It targets CustomApplication records that group tabs, control Lightning Experience navigation (Standard for general business apps or Console for multi-tab service workflows), apply branding, and set overrides so users land in the right experience. Agents should trigger it when users mention custom apps, application metadata, app navigation, or organizing tabs, and stop when the goal is hosting a React bundle in the App Launcher, which belongs to a different UI-bundle skill. The workflow emphasizes deployable XML metadata and professional, role-specific app identity rather than one-off Setup clicks. Pair it with object, tab, and flexipage generators when building larger solutions, or use generating-lightning-app when the user wants the full orchestrated stack.1.4kinstalls13Generating Validation RuleGenerating Validation Rule is an agent skill for solo and indie builders shipping on Salesforce who need declarative data-quality guardrails without Apex. It walks through ValidationRule metadata—API names, formula expressions, and error messaging—so agents can create or update rules that prevent invalid records at save time. Use it when users mention validation rules, field validation, formula validation, error messages, validation logic, or deployment failures tied to rules. The skill frames validation as a data-layer enforcement tool: business logic that returns TRUE blocks the transaction and guides users with clear errors. It fits builders integrating CRM workflows, tightening ops data entry, or hardening prototypes before wider rollout. Compared to ad-hoc formula help in chat, it stays anchored to the official metadata shape and deployment constraints, which reduces broken deploys and inconsistent naming.1.4kinstalls14Generating List ViewGenerating List View is an agent skill for solo and indie builders shipping on Salesforce who need curated, filtered record lists without hand-writing brittle metadata. It triggers when you mention list views, filtered record lists, column setup, visibility, ListView XML, or phrases like “a view that shows…” or “filter records by…”. The skill walks through where files live on disk, key XML elements, and when to nest views inside object metadata versus separate list view files. It fits the Build phase while you wire CRM objects and admin experiences, and it pairs well with other AFV-library skills for a consistent metadata story. Use it to reduce deployment surprises and keep list definitions consistent across sandboxes and pipelines.1.4kinstalls15Observing Agentforceobserving-agentforce documents how solo Salesforce builders instrument and query Agentforce through the Session Trace Data Model in Data Cloud. The skill centers on AgentforceOptimizeService Apex deployed once per org, exposing JSON-oriented methods to list sessions in a date range, pull full conversation payloads, batch-fetch LLM step diagnostics, retrieve moment insights, and roll up aggregated metrics with optional agent filters. Every entry point accepts dataSpaceName so multi-space orgs stay portable. It pairs with the broader agentforce-optimize setup (Phase 1) and an Invocable method for packaging observability inputs inside Salesforce automation. Builders use it when production agents mis-route, hallucinate tools, or show regressions—you trace real sessions instead of guessing from logs. Expect Salesforce platform fluency: sharing rules, Data Cloud connectivity, and Apex deployment. The readme fragment is implementation-heavy; agents should generate guarded queries and respect row limits (maxRows) when scanning noisy periods.1.3kinstalls16Testing Agentforcetesting-agentforce is an AFV Library skill that gives indie Salesforce builders a copy-paste basic test specification for Agentforce bots. The template aligns with Salesforce CLI flows: sf agent test create --spec basic-test-spec.yaml --api-name and sf agent test run with JSON results, and it stresses that parsing is done by @salesforce/agents—not a generic AiEvaluationDefinition—so apiVersion, kind, metadata, and settings must stay out. Tests focus on topic routing: utterances paired with expectedTopic, where Testing Center says topic while Agent Script uses subagent blocks in the .agent file. Required fields include name, subjectType AGENT, and subjectName as the BotDefinition DeveloperName. Use it when you are hardening an Agentforce deployment with explicit routing expectations before wider rollout.1.3kinstalls17Building Ui Bundle Frontendbuilding-ui-bundle-frontend is an agent skill for solo builders and small teams shipping Salesforce AFV Library UI bundle surfaces. It states non-negotiable frontend conventions: import buttons, inputs, cards, and related controls exclusively from @/components/ui (shadcn), style only with Tailwind utilities and semantic tokens, compose classes with cn() from @/lib/utils, and structure every component as a typed functional React module that accepts an optional className. The skill also maps where code belongs—shared primitives under src/components/ui with barrel exports, feature widgets under src/components/<feature>, and shell elements under src/components/layout. Following it keeps bundle UI consistent with the design system and avoids one-off CSS approaches that break review and theming.1.3kinstalls18Using Ui Bundle Salesforce DataUsing UI Bundle Salesforce Data is an agent skill from the Salesforce AFV library for indie and solo builders shipping on Salesforce DX. It teaches how to bind UI bundles to org data using the project’s GraphQL schema as the source of truth, so queries, where clauses, ordering, and create/update payloads match what the platform actually exposes. The workflow assumes you work from an SFDX project root where schema.graphql lives, and it encourages validating entities with the bundled graphql-search helper before you hard-code SOQL-like assumptions into components. That upfront schema pass reduces rework when filters, relationship fields, or mutation wrappers do not match generated types. Use it while you are implementing customer-facing or internal Lightning experiences that must list, sort, filter, create, or update standard or custom objects. It is less about visual design and more about data plumbing correctness for Salesforce-hosted SaaS and agent-assisted integrations.1.3kinstalls19Building Ui Bundle Appbuilding-ui-bundle-app is the Salesforce UI bundle orchestrator for solo builders and small teams who want a complete React web application from natural language, not a fragmented sequence of partial steps. It must run when you are creating or generating a React app, SPA, or frontend application—including before project files exist—and when the repo already has uiBundles source trees or sfdx-project.json and the ask is to build a new app, site, or page from scratch. It also applies when styling is part of the brief but the real work still requires scaffolding plus features, Salesforce data access, frontend composition, Agentforce conversation client, file upload, site generation, and deployment. The skill enforces the correct dependency order across specialized companion skills so metadata, features, and UI do not land in an order that leaves the bundle undeployable. Skip it for Lightning Experience apps that center on custom objects, and skip it for narrow edits to one existing page where building-ui-bundle-frontend alone is enough.1.3kinstalls20Switching Orgswitching-org is a procedural Salesforce CLI skill for solo builders and admins who juggle sandboxes, scratch orgs, and production aliases. It walks through resolving an org identifier, applying `sf config set target-org` at project-local or global scope per user intent, and verifying the result so subsequent deploy, retrieve, and query commands hit the intended tenant. The flow covers the common failure mode of an unauthorized org and nudges toward web login. Triggers match natural language like switch org, change default org, or point CLI to an alias. It is narrow by design: one integration concern, repeatable steps, no metadata deployment logic. Install it when your agent keeps running `sf` against the wrong sandbox after you authenticated multiple orgs on one machine.1.3kinstalls21Generating Ui Bundle MetadataGenerating UI Bundle Metadata is a phase-specific Salesforce AFV Library skill that teaches agents how to author Content Security Policy trusted site records for UI bundle projects. Solo builders shipping Experience Cloud or Lightning-adjacent React bundles often hit blocked fonts, images, or fetch calls until each HTTPS origin is declared under force-app/main/default/cspTrustedSites with a matching fullName and .cspTrustedSite-meta.xml filename. The guide standardizes directory layout, PascalCase underscore naming, active context=All records, and which isApplicableTo* toggles apply for connect, font, image, media, and style sources. It is for indie teams on Salesforce who want deterministic metadata instead of clicking through Setup, and for coding agents that must emit deployable XML alongside uiBundles code. Use it whenever you add a new external CDN, weather API, or tile server to a bundle; pair with UI bundle feature installs when those features call the same origins.1.3kinstalls22Generating Ui Bundle FeaturesGenerating UI Bundle Features is a phase-specific Salesforce AFV skill that routes agents through the official ui-bundle-features CLI whenever a project contains uiBundles/*/src/ and the user asks for authentication or search. Rather than reinventing OAuth flows, session cookies, or indexed search UI, the skill enforces a four-step ritual: confirm nothing already lives in src/, list available packages with keyword filters, describe components and copy operations, then install into the named bundle directory. The catalog spans foundational UI libraries through Agentforce-oriented capabilities, but this skill’s contract narrows to the two highest-friction product features—sign-in and find-anything search—where bespoke code usually drifts from tested templates. Solo builders on Salesforce UI bundles get faster parity with enterprise patterns and fewer security mistakes. After install, continue with CSP trusted site metadata if new auth or search endpoints call external HTTPS origins.1.3kinstalls23Deploying Ui Bundledeploying-ui-bundle is an agent skill that encodes the mandatory order of operations for shipping a Salesforce UI Bundle app from a repo to a live org. Solo builders and small teams on the AFV library pattern often stall when they deploy metadata before building dist/, skip permission sets, or fetch GraphQL schema before the org reflects new objects. This skill activates when the tree contains uiBundles source, uibundle metadata, or sfdx-project.json and the user mentions deploy, push, org setup, or post-deploy tasks. It walks authentication first, runs the UI bundle build when needed, chooses manifest-based or full metadata deployment, then completes post-deploy steps such as data import and codegen tied to the org schema. Treat it as the release runbook for Salesforce-hosted UI—not a substitute for local feature development or Apex unit tests, but the bridge that makes configured metadata actually runnable for users in the target org.1.3kinstalls24Generating Ui Bundle SiteGenerating UI Bundle Site is a template-oriented agent skill from the Salesforce AFV library that scaffolds a default CustomSite metadata file for a brand-new Digital Experience React Site. Solo builders exporting metadata-driven Experience Cloud projects get a ready-made sites/{siteName}.site-meta.xml with standard security and routing defaults—active site flag, guest API toggles, standard portal pages, authorization and error pages, and hardening options such as browser XSS protection and SameOrigin clickjack level. The skill is deliberately narrow: it provisions a new record template only and warns against using it to modify an existing CustomSite, which prevents accidental destructive edits during agent-assisted setup. For indie teams combining Salesforce backends with React experiences, it reduces copy-paste errors and keeps file placement consistent with Salesforce DX metadata conventions before deploy or CI packaging steps.1.3kinstalls25Searching MediaSearching Media is a Salesforce-focused agent skill for builders who must reuse approved visuals instead of generating new assets ad hoc. Prism lists it for indie teams on Experience Cloud or CMS-backed products where the agent might otherwise call MCP search tools directly and skip routing rules. The skill states it must activate before any media search or retrieval tool runs, with triggers such as search for logo, find hero image, or retrieve product photos. It handles discovery across channels like Salesforce CMS and electronic media sources while steering clear of net-new AI imagery or edit workflows. For solo developers wearing front-end and integration hats, it reduces wrong-tool calls and keeps compliance with org content libraries. Pair it with your AFV or Salesforce agent setup that exposes the listed MCP tools. Success means the agent follows search-then-select discipline and returns existing assets fit for SLDS or page composition next steps.1.3kinstalls26Uplifting Components To Slds2Uplifting Components to SLDS2 is a design-system agent skill for Salesforce solo builders migrating Lightning Web Components and Aura away from hardcoded hex values toward SLDS 2 color hooks. It functions as a decision guide when linters suggest multiple replacements or when you need theme-aware, dark-mode-ready styling. The workflow insists you read component markup and JavaScript class logic before CSS so interactive roles, nesting, and ARIA context drive semantic hook choice. Semantic families—surface, accent, feedback—should cover the vast majority of cases; palette and system hooks are explicit last resorts. Background and foreground pairing rules help prevent contrast regressions during uplift. Use it during focused refactors of individual components or batch theme compliance passes before release. It does not replace SLDS documentation but compresses hook selection into an agent-followable ritual compatible with Cursor, Claude Code, and similar editors working in Salesforce repos.1.3kinstalls27Implementing Ui Bundle Agentforce Conversation ClientImplementing UI Bundle Agentforce Conversation Client guides agents embedding Agentforce Employee Agent conversations inside Salesforce UI bundle React apps. It specifies how to resolve the correct agent identifier using a BotVersion SOQL query filtered to AgentforceEmployeeAgent and Status, parse the JSON from sf data query, and validate IDs against the documented 15-character pattern. The skill emphasizes operational reality: agents cannot be activated via API, so builders use Setup or Agent Builder activation, with a manual URL fallback when sf CLI is unavailable. A hard rule separates consumer code from library internals—only files that import and render the client may be edited, protecting packaged implementation stability. Anti-patterns and constraint lists reduce invalid SOQL targets, wrong agent types, and destructive edits. Solo builders shipping employee-facing Agentforce experiences use this skill to avoid guesswork on IDs and lifecycle steps while staying within supported integration boundaries.1.3kinstalls28Implementing Ui Bundle File UploadImplementing UI Bundle File Upload is an agent skill for Salesforce AFV UI bundle projects that contain a uiBundles/*/src/ directory. It steers solo and small-team builders away from reinventing file upload with FormData or raw XHR and instead documents the official upload() API with progress callbacks and Salesforce ContentVersion integration. The package is deliberately API-only: you must compose your own React file input, dropzone, and progress UI while the skill walks installation and usage patterns. That constraint matters for agents that might otherwise hunt for nonexistent <FileUpload /> components or hooks. Use it whenever the task involves uploading, attaching, or dropping files inside a UI bundle app. Reference implementations in the repo illustrate UX patterns but are not part of the public export surface, so the skill keeps scope honest and implementation fast for indie builders shipping on Agentforce or Experience Cloud style bundles.1.3kinstalls29Creating B2b Commerce StoreCreating B2B Commerce Store is an agent skill for solo builders and small teams shipping on Salesforce Commerce B2B who need the backend commerce layer standing before storefront or headless work. It treats the Commerce Store as org-resident runtime configuration—buyer segmentation, product entitlements, pricing, payments, tax, shipping, inventory, and search—not as deployable source metadata. The reference stresses ordering: configure the store through Setup → Commerce → Stores first, because storefront experiences depend on those policies and integrations. If you are wiring a B2B portal, proving catalog visibility rules, or connecting Stripe or Avalara without guessing which objects hold what, this skill gives a structured mental model and creation path. It fits the Build phase when you are integrating Salesforce with commerce providers and avoiding failed deploy assumptions.1.3kinstalls