Agent skill

Platform Validation Rule Generate

by forcedotcom in forcedotcom/sf-skills

A skill your agent uses when users need to create, modify, or validate Salesforce Validation Rules.

Apache-2.0Auto-check passedSales & Support

Install Platform Validation Rule Generate

skills CLI
$ npx skills add forcedotcom/sf-skills --skill platform-validation-rule-generate -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install forcedotcom/sf-skills platform-validation-rule-generate --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/forcedotcom/sf-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/platform-validation-rule-generate .claude/skills/platform-validation-rule-generate && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
platform-validation-rule-generate
GitHub stars
1.1k
Token cost
~979 tokens
SKILL.md length
486 words
Files
1
Skills in repo
248
Repo updated
First seen
Licence
Apache-2.0

At a glance

A skill your agent uses when users need to create, modify, or validate Salesforce Validation Rules.

  • Works in 3 steps: Formula XML Handling(MOST COMMON ERROR) → Interpretation of "Update" Instructions.… → File Format Requirement
  • Users need to create
  • SKILL.md covers When to Use This Skill and Specification
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Platform Validation Rule Generate is an agent skill from forcedotcom/sf-skills. Use this skill when users need to create, modify, or validate Salesforce Validation Rules. Trigger when users mention validation rules, field validation, data quality rules, formula validation, error messages, or validation logic. Also use when users encounter validation errors, need to update formulas, or want to enforce business rules at the data layer. Always use this skill for any validation rule work.

Its SKILL.md is about 980 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Sales & Support, covering CRM management and Data cleaning. It works with Salesforce. The repository describes itself as: Salesforce's curated collection of agent skills for building applications. Optimized for Agentforce Vibes, compatible with all AI tools. The licence is Apache-2.0.

When your agent uses it

  • Users need to create
  • Validate Salesforce Validation Rules
  • Users mention validation rules
  • Field validation

Example prompts

  • “/platform-validation-rule-generate”

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. Formula XML Handling(MOST COMMON ERROR)
  2. Interpretation of "Update" Instructions. When receiving instructions to modify a formula, distinguish between a replacement and an addition
  3. File Format Requirement

What it can do on your machine

Read from SKILL.md and the folder at commit 3c15867. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Platform Validation Rule Generate loads about 979 tokens when it runs. Until then it costs about 111 tokens; SKILL.md has 486 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~111
When it runs · the whole SKILL.md, loaded when a task matches
~979

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from forcedotcom/sf-skills at commit 3c15867, republished under its Apache-2.0 licence (© forcedotcom). 486 words, ~979 tokens.

Download SKILL.mdSave it as .claude/skills/platform-validation-rule-generate/SKILL.md (or your agent's skills folder).
name
platform-validation-rule-generate
description
Use this skill when users need to create, modify, or validate Salesforce Validation Rules. Trigger when users mention validation rules, field validation, data quality rules, formula validation, error messages, or validation logic. Also use when users encounter validation errors, need to update formulas, or want to enforce business rules at the data layer. Always use this skill for any validation rule work.
metadata.version
1.0
metadata.domains
Platform
metadata.minApiVersion
60.0

When to Use This Skill

Use this skill when you need to:

  • Create validation rules to enforce data quality
  • Prevent invalid records from being saved
  • Generate validation rule metadata with formulas
  • Add business logic validation to objects
  • Troubleshoot deployment errors related to validation rules

Specification

ValidationRule Metadata Specification

Overview

Validation Rules are declarative metadata components used to enforce data quality and business logic in Salesforce. They evaluate a formula expression when a record is saved and prevent the save operation if the expression returns TRUE.

Purpose

-Enforce business rules at the data layer -Prevent invalid or incomplete records from being saved -Display meaningful error messages to guide users

Required Properties
Core Validation Rule Properties
  • fullName

    • The unique API name of the validation rule
    • Must start with a letter
      • Can contain letters, numbers, and underscores
    • Cannot end with an underscore
    • Cannot contain consecutive underscores
    • Cannot exceed 40 character.
  • active -Indicates whether the validation rule is enabled true → Rule is enforced false → Rule is inactive

  • errorConditionFormula

  • The logical formula that evaluates record data

  • Must return TRUE or FALSE

  • If TRUE, the validation rule triggers an error

  • errorMessage

    • The message displayed to the user when validation fails
  • Maximum length: 255 characters

Specific Function Guidelines
  • TEXT - TEXT() function MUST NOT be used with Text fields, to fix this you can just remove the TEXT() function.
  • CASE - In salesforce CASE() function, last parameter is the default value. Admins often miss to provide this and number of parameters to CASE() function are always even.
  • VALUE - VALUE() function should only be used with Text fields. If a number is being used as a parameter to the VALUE() function, remove the VALUE() function.
  • DAY - DAY() function should only be used with Date fields. If a Datetime field is being used as a parameter to the DAY() function, convert it into a Date first.
  • MONTH - MONTH() function should only be used with Date fields. If a Datetime field is being used as a parameter to the MONTH() function, convert it into a Date first.
  • DATEVALUE - DATEVALUE() function should only be used with DateTime fields. If a Date is being used as a parameter to the DATEVALUE() function, remove the DATEVALUE() function.
  • ISPICKVAL - If checking equality of a picklist type field, the function ISPICKVAL() MUST be used.
  • ISCHANGE - Use ISCHANGE() function to check the value of a record has changed.
Show full SKILL.md (96 more words)Show less
Critical Rules
  1. Formula XML Handling(MOST COMMON ERROR)

    • ANY errorConditionFormula containing XML tags MUST be inside a CDATA section in the metadata XML.
  2. Interpretation of "Update" Instructions. When receiving instructions to modify a formula, distinguish between a replacement and an addition:

    • "Update the formula to [Action]": Completely replace the existing formula logic with the new requirement.
    • "Update the formula to also [Action]": Keep the existing logic and append the new requirement (usually by wrapping the logic in an AND() or OR() function).
  3. File Format Requirement

    • Validation rule files MUST always use the .validationRule-meta.xml extension.

© forcedotcom, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/platform-validation-rule-generate of forcedotcom/sf-skills.

Open the folder on GitHubat commit 3c15867

Compare with similar skills

Platform Validation Rule Generate next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Platform Validation Rule Generate compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Platform Validation Rule Generate this skillforcedotcom/sf-skills1.1k—~979Automated safety check: PassApache-2.0
Lead Importindranilbanerjee/digital-marketing-pro8541 repos~3.3kAutomated safety check: PassMIT
CRM Data CleanerLeoYeAI/openclaw-master-skills2.2k—~7.3kAutomated safety check: PassMIT
CRM Data CleanupOneWave-AI/claude-skills322—~2.5kAutomated safety check: PassMIT
Soql Lib Query Builderbeyond-the-cloud-dev/soql-lib154—~4.3kAutomated safety check: PassMIT
Sf DatacloudJaganpro/sf-skills424—~2.7kAutomated safety check: PassMIT

Similar skills

  • Lead Import

    indranilbanerjee/digital-marketing-pro

    Import leads into Salesforce, HubSpot, Zoho, or Pipedrive with validation, deduplication against existing CRM records, lead scoring, consent and compliance checks, and source attribution — then push…

    854 GitHub starsUsed in 1 repo~3.3k tokens
    Sales & SupportAuto-check passed
  • CRM Data Cleaner

    LeoYeAI/openclaw-master-skills

    Deduplicate, normalize, and enrich CRM contacts and companies.

    2.2k GitHub stars~7.3k tokensUpdated 2 mo ago
    Sales & SupportAuto-check passed
  • CRM Data Cleanup

    OneWave-AI/claude-skills

    Finds duplicate and junk records in a CRM CSV export with fuzzy matching, normalizes fields and writes a reviewable merge plan plus import-ready files without touching the live CRM.

    322 GitHub stars~2.5k tokensUpdated 5 days ago
    Sales & SupportAuto-check passed
  • Soql Lib Query Builder

    beyond-the-cloud-dev/soql-lib

    Builds Salesforce SOQL queries using the SOQL Lib fluent builder API (SOQL.cls).

    154 GitHub stars~4.3k tokensUpdated 4 days ago
    Sales & SupportAuto-check passed
  • Sf Datacloud

    Jaganpro/sf-skills

    Salesforce Data Cloud product orchestrator for connect→prepare→harmonize→segment→act workflows.

    424 GitHub stars~2.7k tokensUpdated 5 mo ago
    Sales & SupportAuto-check passed
  • Soql Lib Selector

    beyond-the-cloud-dev/soql-lib

    Creates Salesforce Apex selector classes using the SOQL Lib selector pattern.

    154 GitHub stars~2k tokensUpdated 4 days ago
    Sales & SupportAuto-check passed

More from forcedotcom/sf-skills

All 248 skills in this repo
  • Agentforce Architecture Analyze

    forcedotcom/sf-skills

    Declared architecture snapshot for one Agentforce agent: planner, topics, actions, flows, Apex, prompt templates, and NGA plugins.

    1.1k GitHub stars~3.6k tokensUpdated 4 days ago
    Auto-check passed
  • Agentforce D360 Analyze

    forcedotcom/sf-skills

    Data Cloud 360° view of a single Agentforce session. An agent skill from forcedotcom/sf-skills.

    1.1k GitHub stars~2.9k tokensUpdated 4 days ago
    Auto-check passed
  • Apply a Salesforce sandbox post-copy automation JSON config against a target org.

    1.1k GitHub stars~5.3k tokensUpdated 4 days ago
    Auto-check: notes
  • Apply a Salesforce sandbox post-copy automation JSON config against a target org.

    1.1k GitHub stars~5.4k tokensUpdated 4 days ago
    Auto-check: notes
  • Design Systems Slds Apply

    forcedotcom/sf-skills

    Apply SLDS-compliant UI using the correct blueprints, styling hooks, utility classes, and icons.

    1.1k GitHub stars~3.7k tokensUpdated 4 days ago
    Auto-check passed
  • Experience Lwc Generate

    forcedotcom/sf-skills

    Lightning Web Components with PICKLES methodology and 165-point scoring.

    1.1k GitHub stars~2.4k tokensUpdated 4 days ago
    Auto-check passed

Works with

Questions about Platform Validation Rule Generate

What does Platform Validation Rule Generate do?

A skill your agent uses when users need to create, modify, or validate Salesforce Validation Rules. Platform Validation Rule Generate is an agent skill from forcedotcom/sf-skills. Use this skill when users need to create, modify, or validate Salesforce Validation Rules.

When should I use Platform Validation Rule Generate?

Platform Validation Rule Generate fits situations like: users need to create; validate Salesforce Validation Rules; users mention validation rules; field validation.

How do I install Platform Validation Rule Generate in Claude Code?

Run `npx skills add forcedotcom/sf-skills --skill platform-validation-rule-generate -a claude-code`. Or copy the skill folder (skills/platform-validation-rule-generate in forcedotcom/sf-skills) into .claude/skills/platform-validation-rule-generate in your project. Claude Code loads it when a task matches its description.

How do I install Platform Validation Rule Generate in Codex?

Run `npx skills add forcedotcom/sf-skills --skill platform-validation-rule-generate -a codex`. Or copy the skill folder (skills/platform-validation-rule-generate in forcedotcom/sf-skills) into .agents/skills/platform-validation-rule-generate in your project. Codex loads it when a task matches its description.

Can I use Platform Validation Rule Generate in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add forcedotcom/sf-skills --skill platform-validation-rule-generate -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/platform-validation-rule-generate, .gemini/skills/platform-validation-rule-generate, .github/skills/platform-validation-rule-generate and .opencode/skills/platform-validation-rule-generate in your project.

What does Platform Validation Rule Generate need to run?

SKILL.md names no scripts, command-line tools or credentials: Platform Validation Rule Generate is instructions for the agent only.

Does Platform Validation Rule Generate access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Platform Validation Rule Generate safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Platform Validation Rule Generate use?

Platform Validation Rule Generate is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Platform Validation Rule Generate use?

About 979 tokens (SKILL.md is roughly 3.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Platform Validation Rule Generate?

Skills that share tags, products or a category with Platform Validation Rule Generate: Lead Import (indranilbanerjee/digital-marketing-pro, 854 stars), CRM Data Cleaner (LeoYeAI/openclaw-master-skills, 2.2k stars), CRM Data Cleanup (OneWave-AI/claude-skills, 322 stars) and Soql Lib Query Builder (beyond-the-cloud-dev/soql-lib, 154 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Platform Validation Rule Generate?

forcedotcom (a GitHub organization) maintains it in forcedotcom/sf-skills, which has 1,058 GitHub stars. The repository holds 248 skills in this directory. The repository was last updated on October 3, 2026.

Source: forcedotcom/sf-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.