running-code-analyzer

Official

Find and fix issues with static code scans.

Authorforcedotcom
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill turns natural-language requests into repeatable Salesforce Code Analyzer scans, then summarizes violations so you can quickly focus on security, quality, and best-practice problems.

Core Features & Use Cases

  • Smart scan command construction: Selects engines (PMD, ESLint, CPD, RetireJS, Flow, SFGE, ApexGuru) and builds the correct sf code-analyzer run invocation with proper rule selectors and targets.
  • Deterministic report + parsing: Always writes results to timestamped files, then summarizes top findings by severity, rule frequency, and files.
  • Safe, engine-provided fixes workflow: Discovers fixable violations, asks for explicit confirmation, applies deterministic fixes, and produces a post-fix summary.
  • Diff-aware and format-flexible scanning: Supports scanning changed files (via git diff filtering logic) and emits JSON/HTML/SARIF/CSV/XML using --output-file extension.
  • Vendor-file handling: Filters likely third-party/vendor violations before applying fixes to reduce risk and avoid modifying libraries.

Quick Start

Ask the AI to scan your code for security and run deterministic auto-fixes when available by telling it: "Scan my code for security issues and apply the fixes you can."

Dependency Matrix

Required Modules

None required

Components

scriptsreferences

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: running-code-analyzer
Download link: https://github.com/forcedotcom/sf-skills/archive/main.zip#running-code-analyzer

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.