dx-code-analyzer-custom-rule-create

Installation
SKILL.md

dx-code-analyzer-custom-rule-create: Custom Code Analyzer Rule Authoring

Ecosystem: This skill is part of a 3-skill Code Analyzer suite — dx-code-analyzer-run (scans & results) · dx-code-analyzer-configure (setup, config, CI/CD) · dx-code-analyzer-custom-rule-create (custom rule authoring).

Use this skill when the user needs to create a custom rule that enforces a pattern not covered by Code Analyzer's built-in rules. Supports Regex engine (text pattern matching) and PMD engine (structural XPath queries against the AST).

When This Skill Owns the Task

Use dx-code-analyzer-custom-rule-create when the work involves:

  • Creating a new custom rule for Code Analyzer (any engine)
  • Enforcing team-specific coding standards via static analysis
  • Banning specific patterns (System.debug, hardcoded IDs, TODOs)
  • Writing XPath expressions for PMD rules (Apex or metadata XML)
  • Writing regex patterns for the Regex engine
  • Setting up custom ESLint rules/plugins for LWC/JavaScript
  • Enforcing metadata governance (API versions, field descriptions, dangerous permissions)
  • Overriding built-in rule thresholds (CyclomaticComplexity, ExcessiveParameterList, etc.)
  • Organizing multiple rules into shared rulesets
  • Iterating on a custom rule that isn't matching correctly
Installs
924
GitHub Stars
713
First Seen
14 days ago
dx-code-analyzer-custom-rule-create — forcedotcom/sf-skills