Dx Code Analyzer Run
Run Salesforce Code Analyzer scans across PMD, ESLint, CPD, RetireJS, Flow, SFGE, and ApexGuru engines.
- CCM score
- 67 of 100
- skills.sh installs
- 6.9K
- GitHub stars
- 1.2K
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers scanning files, folders, and git diffs, filtered by engine, category, and severity, plus post-scan result exploration
- Includes bundled scripts for parsing, filtering, ranking, describing rules, and applying engine-provided auto-fixes
- Enforces Bash-only script use for reading results, and rejects inline parsing or direct reads of large result files
- Designed for security reviews, AppExchange checks, and static analysis of Apex, LWC, Flow, and library code
Install
$ npx -y skills add forcedotcom/sf-skills --skill dx-code-analyzer-run -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Running Code Analyzer Skill
CRITICAL: Mandatory Script Usage
Every interaction with Code Analyzer results MUST go through the bundled scripts in <skill_dir>/scripts/. No exceptions.
WRONG — never do this:
# WRONG: inline Python to parse results
python3 -c "import json; data = json.load(open('results.json'))..."
# WRONG: inline Node.js to parse results
node -e "const data = require('./results.json')..."
# WRONG: jq to filter results
cat results.json | jq '.violations[] | select(.engine=="pmd")'
# WRONG: reading the results file directly (it can be 10MB+)
Read tool → code-analyzer-results-*.json
Also forbidden: run_code_analyzer and any mcp__* tool — Bash only.
RIGHT — always do this:
# Summarize scan results
node "<skill_dir>/scripts/parse-results.js" "./code-analyzer-results-TIMESTAMP.json"
# Filter/rank/query results (by engine, severity, file, rule, category)
node "<skill_dir>/scripts/query-results.js" "./code-analyzer-results-TIMESTAMP.json" --engine pmd --summary
# List/browse available rules (by engine, category, language, severity)
node "<skill_dir>/scripts/list-rules.js" "Security" --top 10
Details
- Repository
- github.com/forcedotcom/sf-skills
- Categories
- Code Review & Quality, Security
- First seen
- Jul 14, 2026
Questions
What does the dx-code-analyzer-run skill do?
It runs Salesforce Code Analyzer to scan code for security, performance, best practice, and code style violations across engines such as PMD, ESLint, CPD, RetireJS, Flow, SFGE and ApexGuru. It also filters scan results by engine, severity, category or file and explains what a rule means.
How do I install the dx-code-analyzer-run skill?
Run npx -y skills add forcedotcom/sf-skills --skill dx-code-analyzer-run -y in a project. Once installed, the agent can scan your code, explore results and look up rules for you.
What do I need before running a scan with this skill?
You need the Salesforce CLI (sf) with the code analyzer plugin version 5.x or later, Java 11 or later for PMD, CPD and SFGE, and Node.js 18 or later for ESLint and RetireJS. ApexGuru also requires an authenticated org, and Flow analysis needs Python 3.
Which skills lead the Code Review & Quality category, and where does this one stand?
This skill ranks in the top 100 of the Code Review & Quality category, alongside improve-codebase-architecture, codebase-design, code-review, setup-ts-deep-modules and caveman-review. It stands apart by focusing on Salesforce-specific static analysis across Apex, Flows, LWC and Salesforce security rules.
More from forcedotcom/sf-skills
All 78- Platform Custom Object Generate6.9K
- Automation Flow Generate6.8K
- Experience Lwc Generate6.7K
- Platform Validation Rule Generate6.5K
- Platform Flexipage Generate6.5K
- Dx Org Manage6.4K
- Platform Data Manage6.4K
- Platform Sharing Rules Generate6.4K
- Platform Metadata Api Context Get6.3K
- Design Systems Slds Apply6.3K
- Design Systems Slds Validate6.1K
- Platform Custom Tab Generate6.1K
- Agentforce Generate6.1K
- Dx Code Analyzer Configure6K
- Platform Custom Application Generate6K
- Platform List View Generate6K
- Agentforce Architecture Analyze5.9K
- Dx Org Switch5.9K
- Dx Org Permission Set Assign5.9K
- Platform Custom Lightning Type Generate5.9K
- Agentforce Test5.8K
- Agentforce Observe5.8K
- Platform Lightning App Coordinate5.8K
- Design Systems Slds2 Migrate5.8K
Similar to Dx Code Analyzer Run
More Code Review & Qualitysalesforce-code-qualityPluginforcedotcom/sf-skills1.2K starsAnalyze and govern Salesforce code quality with Salesforce Code Analyzer and the Well-Architected framework: set up and troubleshoot Code Analyzer, run security
SemgrepMCP serversemgrep688 starsStatic analysis for finding security vulnerabilities through Semgrep scans, rule checks, and AppSec Platform findings.
code-reviewSkillanthropics/knowledge-work-plugins10.4K installsStructured code review covering security, performance, correctness, and maintainability, with severity-ranked findings and a merge verdict.
codeqlSkillgithub/awesome-copilot2K installsGuide for configuring CodeQL code scanning through GitHub Actions workflows and the standalone CLI.
open-code-reviewSkillalibaba/open-code-review9.3K installsNative-mode code review of Git changes via the ocr CLI, with optional automatic fixes on request.