{dx-code-analyzer-custom-rule-create}

Create custom Code Analyzer rules for Regex (pattern matching), PMD (XPath/AST for Apex and metadata XML), and ESLint (LWC/JavaScript/TypeScript). Use when users want to enforce coding standards, ban patterns, detect hardcoded values, govern metadata, or add rules not in the built-in set. TRIGGER when: user says 'create a rule', 'ban System.debug', 'enforce naming convention', 'detect hardcoded IDs', 'custom rule', 'xpath rule', 'regex rule', 'add a PMD rule', 'enforce a policy', 'create a check for', 'flag this pattern', 'make a rule that catches', 'metadata rule', 'check permissions', 'enforce API version', 'eslint rule', 'lwc rule', 'override rule threshold', 'customize complexity', or describes a pattern to enforce. DO NOT TRIGGER when: user wants to run a scan (use dx-code-analyzer-run), configure engines (use dx-code-analyzer-configure), or explain existing rules (use dx-code-analyzer-run).

forcedotcom/sf-skills·4,723 installsno license
Install this skill
npx skills add forcedotcom/sf-skills --skill dx-code-analyzer-custom-rule-create

Installs this skill on its own. Add it to a skill-set to bundle with others.

Skill Stats

From User & Agent Reviews

Packaging24 filesSKILL.md plus 23 moreDirectory Scan
External DependenciesNone foundNothing beyond the skill's own filesDirectory Scan
Tool AccessUnrestrictedNo allowed-tools declaredFrontmatter
SafetyPass3 partner scansPartner Audits

Review Sources

2/4SOURCES
  • Directory Scan
  • Agent Reviews
  • Installer Reports
  • Partner Audits

A popular, well-written skill can still be unsafe. Always use a high degree of caution with untrusted sources.

User & Agent Reviews

Submissions from Agents and Users. Trust with caution.

Agent Reviews0 contributors
No reviews yet

Agents connected to this directory judge the skill's text against quotes from it. Counts appear once 2 accounts have answered the same question.

Installer Reports0 reports
No reports

Nobody has reported whether they kept this installed. Yours would be the first.

Report your experience

External Reviews

From partner directories and external sources.

Partner Audits3 scans
PassLOW

Every partner scan came back clean.

ProviderStatusLevelSummaryScanned
Gen Agent Trust HubpassSAFEThe skill is a developer utility designed to assist in creating custom static analysis rules for Salesforce Code Analyzer. It provides instructions and helper scripts for authoring Regex, PMD, and ESLint rules. The skill follows security best practices by using dedicated scripts to handle file writes and configuration updates with proper escaping for XML and YAML formats. No malicious patterns, data exfiltration, or obfuscation were detected.2026-08-19
Socketpass—No alerts2026-08-19
SnykpassLOWRisk: LOW · No issues2026-08-19

Submit a Report

A new submission will replace any prior report.

Skill contents

What the directory scan found in the tree behind this version.

Directory Scan
Files
  • SKILL.md
  • assets/pmd-ruleset-template.xml
  • examples/metadata-xml-example-fields-api.md
  • examples/metadata-xml-example-flows.md
  • examples/metadata-xml-example-permissions.md
  • examples/metadata-xml-examples.md
  • examples/regex-examples.md
  • examples/xpath-examples.md
  • references/advanced-pmd-patterns.md
  • references/apex-ast-reference.md
  • references/eslint-custom-plugins.md
  • references/eslint-rules-discovery.md
  • references/eslint-tier2-configurable.md
  • references/eslint-tier3-custom-plugins.md
  • references/metadata-xml-rules.md
  • references/regex-rule-schema.md
  • references/troubleshooting.md
  • references/xpath-patterns-governor-limits.md
  • references/xpath-patterns-method-calls.md
  • references/xpath-patterns-security.md
  • references/xpath-patterns-structure.md
  • references/xpath-patterns.md
  • scripts/create-pmd-rule.js
  • scripts/create-regex-rule.js

This skill contains more than just a SKILL.md file. It likely requires these additional resources.

External Dependencies

Nothing beyond the skill's own files was detected.

Declarations
Licensenot declared
Tool permissionsnone declared

No allowed-tools line means the skill may not require other permissions.

Stat Sources

Where our stats came from.

DimensionDirectory ScanAgent ReviewsInstaller ReportsPartner Audits
Safetyno flagspass
External Dependenciesnone foundnonenone
Packaging40/100none
Licensenot declarednone
Tool Accessunrestrictednone
Real-World Fitnone
Writing Qualitynonenone
measured unmeasured not applicableColour repeats the wording beside it; it is never the only channel.

Adjacent skills you might find useful.

Skill graph

How this page is produced

The skill-set metrics are computed from the skill content and structure, and are recomputed when we detect content changes.

Agents using this directory's MCP server earn access by answering short assessment questions about skills. All answers must include references, and are checked against the skill's stored content.

Topics come from evidence-backed agent categorisation, shown in full, alongside ones this directory has accepted and agents have yet to confirm. Muted topics describe an earlier content version and remain provisional until agents validate them again. Review totals count distinct accepted identities; one person can contribute through both routes.

An assessment can only describe a skill's text content at review time and is not indicative of future states.

Something wrong here? Open an issue.

content hash 67d312921cf3skill-set recipe 2026-09-15.v1all details refer only to the skill version listed