sf-code-analyzer
Run static code analysis on Salesforce projects using sf code-analyzer.
Skill by jterratsdev
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/jterratsdev-sf-code-analyzer
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: testing, devops, security, sales
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/sf-code-analyzer
What's inside
- Skill name
sf-code-analyzer- Description
- Run static code analysis on Salesforce projects using sf code-analyzer. Supports Apex (PMD), LWC (ESLint), RetireJS, and CPD engines with configurable rule selectors, severity thresholds, and output formats. USE FOR: code analysis, static analysis, code quality, PMD, ESLint, code review, code scan, lint, apex analysis, lwc analysis, security scan. Reusable by Developer, QA, Architect, and DevOps profiles.
- License
- BSD-3-Clause
- Instructions
- 195 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Salesforce Code Analyzer ## Prerequisites | Tool | Check | Install | |------|-------|---------| | Salesforce CLI | `sf --version` | [https://developer.salesforce.com/tools/salesforcecli](https://developer.salesforce.com/tools/salesforcecli) | | Code Analyzer plugin | `sf plugins inspect @salesforce/plugin-code-analyzer` | `sf plugins install @salesforce/plugin-code-analyzer` | Before proceeding, ensure the plugin is installed: ```bash sf plugins inspect @salesforce/plugin-code-analyzer 2>/dev/null || sf plugins install @salesforce/plugin-code-analyzer ``` --- ## Active Job Monitoring (CRITICAL) When you execute `sf code-analyzer run`, you MUST wait for it to complete. **Never** ask the user to check the result or suggest reviewing later. Report the full results including violation count, severity breakdown, and affected files. If the analysis is long-running, monitor its progress. --- ## 1. Running Analysis (`sf code-analyzer run`) ### Basic Usage ```bash # Analyze entire project sf code-analyzer run --target force-app # Analyze specific files (comma-separated) sf code-analyzer run --target "force-app/main/default/classes/MyClass.cls,force-app/main/default/classes/MyService.cls" # Analyze a directory sf code-analyzer run --target force-app/main/default/classes ``` ### Rule Selectors Use `--rule-selector` to pick which engines and rule categories to apply: | Engine | Selector | Covers | |--------|----------|--------| | PMD | `pmd:Recommended` | Best practices, code style | | PMD | `pmd:Security` | SOQL injection, CRUD/FLS, XSS | | PMD | `pmd:Performance` | SOQL/DML in loops, large queries | | PMD | `pmd:Design` | Complexity, coupling, class size | | ESLint | `eslint:Recommended` | JS best practices for LWC | | ESLint | `eslint:Security` | DOM XSS, eval, unsafe patterns | | RetireJS | `retire-js:Recommended` | Known vulnerable JS libraries | | CPD | `cpd:Recommended` | Copy-paste / duplicate code detection | ```bash # Apex: security + performance rules only sf code-analyzer run --target force-app/main/default/classes \ --rule-selector "pmd:Security,pmd:Performance" # LWC: recommended + security sf code-analyzer run --target force-app/main/default/lwc \ --rule-selector "eslint:Recommended,eslint:Security" # Full scan: all engines sf code-analyzer run --target force-app \ --rule-selector "pmd:Recommended,pmd:Security,pmd:Performance,pmd:Design,eslint:Recommended,eslint:Security,retire-js:Recommended,cpd:Recommended" ``` ### Severity Threshold Control which severity level blocks (returns exit code 2): ```bash # Block only on HIGH/critical violations sf code-analyzer run --target force-app --severity-threshold 1 # Block on HIGH and MEDIUM sf code-analyzer run --target force-app --severity-threshold 2 # Block on any violation (HIGH, MEDIUM, LOW) sf code-analyzer run --target force-app --severity-threshold 3 ``` | Exit Code | Meaning | |-----------|---------| | 0 | No violations above threshold | | 2 | Violations found at or above threshold severity | | Other | Analyzer error (treat as non-blocking) | ### Output Formats ```bash # Table (default, best for terminal) sf code-analyzer run --target force-app --output-format table # JSON (for programmatic processing) sf code-analyzer run --target force-app --output-format json # CSV (for spreadsheet analysis) sf code-analyzer run --target force-app --output-format csv --output-file report.csv # HTML (for sharing with stakeholders) sf code-analyzer run --target force-app --output-format html --output-file report.html ``` --- ## 2. Listing Rules (`sf code-analyzer rules list`) Inspect available rules before running analysis: ```bash # List all available rules sf code-analyzer rules list # Filter by engine sf code-analyzer rules list --rule-selector "pmd:Security"
From jterratsdev/smart-deployment, BSD-3-Clause.
More from jterratsdev/smart-deployment
- 0.570score
elements-sync
jterratsdev
Create and update Requirements and Stories in Elements.cloud from story maps, backlog documents, or free-form descriptions.
SkillAFreshness: AClaude Code +9 - 0.565score
backlog-sync
jterratsdev
Push user stories from story maps to issue trackers.
SkillAFreshness: AClaude Code +9 - 0.565score
refine-story-functionally
jterratsdev
ADP Phase 1 — functional story refinement.
SkillAFreshness: AClaude Code +9 - 0.565score
refine-story-technically
jterratsdev
ADP Phase 2 — technical story refinement.
SkillAFreshness: AClaude Code +9 - 0.565score
sf-deploy
jterratsdev
Deploy and validate Salesforce metadata using @jterrats/profiler for complete profile retrieval and @jterrats/smart-deployment for dependency-aware wave…
SkillAFreshness: AClaude Code +9 - 0.565score
org-health-assessment
jterratsdev
Assess the health of a Salesforce org across security, automation, permissions, data model, schema limits, license utilization, and large data volumes —…
SkillAFreshness: AClaude Code +9 - 0.565score
project-knowledge-bootstrap
jterratsdev
Scan a Salesforce project structure and populate .setup-agents/project-knowledge.md with architecture decisions, naming conventions, label language, and…
SkillAFreshness: AClaude Code +9 - 0.565score
prompt-registry
jterratsdev
Maintain the .generated-prompts/ register: read before creating any artifact to infer project conventions, write/update after creation.
SkillAFreshness: AClaude Code +9 - 0.565score
qa-evidence-pack
jterratsdev
Build reviewable QA evidence packs that map acceptance criteria to observable outcomes, command results, screenshots, traces, videos, API contracts…
SkillAFreshness: AClaude Code +9 - 0.565score
record-adr
jterratsdev
Record an Architecture Decision Record (ADR).
SkillAFreshness: AClaude Code +9 - 0.564score
transcription-evidence
jterratsdev
Transcribe audio/video files and record as workflow evidence
SkillAFreshness: AClaude Code +9 - 0.561score
generate-rom
jterratsdev
Produce a Rough Order of Magnitude (ROM) effort baseline for a story or epic and record it against the local backlog task.
SkillAFreshness: AClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 14
- Last commit (this folder)
- Aug 5, 2026 (2 months ago)
- Last release
- Sep 29, 2026 (29 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- BSD-3-Clause
- Repository
- github.com/jterratsdev/smart-deployment
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from jterratsdev
- 0.570score
elements-sync
jterratsdev
Create and update Requirements and Stories in Elements.cloud from story maps, backlog documents, or free-form descriptions.
SkillAFreshness: AClaude Code +9 - 0.565score
qa-evidence-pack
jterratsdev
Build reviewable QA evidence packs that map acceptance criteria to observable outcomes, command results, screenshots, traces, videos, API contracts…
SkillAFreshness: AClaude Code +9 - 0.565score
org-health-assessment
jterratsdev
Assess the health of a Salesforce org across security, automation, permissions, data model, schema limits, license utilization, and large data volumes —…
SkillAFreshness: AClaude Code +9 - 0.565score
project-knowledge-bootstrap
jterratsdev
Scan a Salesforce project structure and populate .setup-agents/project-knowledge.md with architecture decisions, naming conventions, label language, and…
SkillAFreshness: AClaude Code +9 - 0.565score
prompt-registry
jterratsdev
Maintain the .generated-prompts/ register: read before creating any artifact to infer project conventions, write/update after creation.
SkillAFreshness: AClaude Code +9 - 0.565score
record-adr
jterratsdev
Record an Architecture Decision Record (ADR).
SkillAFreshness: AClaude Code +9
Cite this page
sf-code-analyzer skill. Agent Mart. https://agentmart.dev/skills/jterratsdev-sf-code-analyzer (last updated 2026-10-24)