
Dx Code Analyzer Custom Rule Create
This is the rule authoring companion to the Code Analyzer suite. It walks you through creating custom rules when the built-in set doesn't cover your org's patterns: banning System.debug, catching hardcoded IDs, enforcing metadata standards, or writing XPath queries against the Apex AST. The skill is opinionated about process (always dump the AST before writing XPath, never hand-edit the YAML after the scripts run) because the failure modes are specific and painful. It handles regex rules, PMD rules for Apex and metadata XML, and ESLint setup for LWC. If you're enforcing team-specific guardrails beyond what ships with Code Analyzer, this is the one that gets you there without trial-and-error escaping hell.
- skills.sh installs
- 4.9K
- GitHub stars
- 1.2K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add forcedotcom/sf-skills --skill dx-code-analyzer-custom-rule-create --agent claude-codeInstalls into .claude/skills of the current project.
Files
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
Sponsors
Details
- Repository
- github.com/forcedotcom/sf-skills
- Categories
- Backend & APIs, Documentation, Code Review & Quality, Release Management, Debugging
- First seen
- Jul 14, 2026
More from forcedotcom/sf-skills
All 158- Platform Agentsetup Categories Fetch4.9K
- Omnistudio Datamapper Generate4.9K
- Omnistudio Omniscript Generate4.9K
- Omnistudio Dependencies Analyze4.9K
- Omnistudio Integration Procedure Generate4.8K
- Omnistudio Callable Apex Generate4.8K
- Omnistudio Flexcard Generate4.8K
- Omnistudio Datapacks Deploy4.8K
- Omnistudio Epc Catalog Generate4.8K
- Mobile Apps Create4.8K
- Experience Content Media Search4.8K
- Mobile Platform Native Capabilities Integrate4.7K
- Mobile Platform Offline Validate4.7K
- Commerce B2b Store Create4.7K
- Commerce B2b Open Code Components Integrate4.6K
- Commerce B2b Open Code Components Replace4.6K
- Generating Apex4.2K
- Generating Apex Test4.2K
- Generating Flow4.1K
- Generating Custom Field4K
- Generating Custom Object4K
- Generating Permission Set4K
- Generating Flexipage4K
- Generating Custom Tab3.9K