- Home
- Skills
- Agents & Orchestration
- Salesforce code review
Salesforce code review
Automated Salesforce code reviews for Apex and metadata via GitLab/GitHub CLI with strict PMD and documentation checks.
$5
/moSubscription · cancel anytime
Secure checkout via Stripe
- Always the latest version
- Delivered live to your agent via MCP
- Cancel anytime, access ends at period end
Works with the AI Agents you already use
Salesforce code review
Example session with this skill installed
Review GitLab MR 402 for case management
- Read your context and instructions
- Compiled the salesforce code review
I have retrieved the diff for GitLab MR 402 ("Feature: Case Management Updates"). The changes include two Apex classes and one Custom Field metadata file.
Salesforce Code Review Summary
| File | Line | Severity | Finding |
|---|---|---|---|
force-app/main/default/classes/CaseService.cls | 42 | BLOCKING | @SuppressWarnings('PMD.AvoidDeeplyNestedIfStmts') detected. Suppression requires documented team consensus. |
force-app/main/default/classes/CaseService.cls | 108 | WARNING | SOQL query inside for loop. Move query to a collection outside the loop to ensure bulkification. |
force-app/main/default/classes/CaseService.cls | 155 | BLOCKING | Hardcoded 18-character Salesforce ID 0018c00002E7v9aAAB detected. Use a Label or Custom Setting. |
force-app/main/default/objects/Case/fields/Priority_Reason__c.field-meta.xml | 4 | BLOCKING | Missing <description> field. All new or modified Custom Fields must include a functional description. |
app.yaml | 12 | NOTE | CaseServiceTest was modified but is already present in apex_test_classes. |
Verdict: Reject
There are 3 BLOCKING findings related to PMD suppressions, hardcoded IDs, and missing metadata documentation.
Next steps
- Would you like me to post this summary as a comment to GitLab MR 402?
- Address the hardcoded ID and the missing field description in the next commit.
- Obtain team lead approval if the PMD suppression is genuinely necessary.
Subscription · always the latest version
- Secure checkout via Stripe
- Cancel anytime
- Delivered live via MCP (optional)
About this skill
Manual code reviews for Salesforce projects often miss critical metadata documentation or skip over hidden PMD suppressions. This skill automates the inspection of Apex and Salesforce metadata within your GitLab MRs or GitHub PRs, ensuring every change meets strict organizational standards before it reaches production.
What it does
- Enforce Apex Standards flags bulkification issues, SOQL in loops, hardcoded IDs, and incorrect sharing keywords.
- Strict PMD Governance identifies and blocks any
@SuppressWarningsannotations to prevent bypassing quality gates. - Metadata Documentation Audit checks for missing or placeholder
Descriptionfields in Flows, Custom Fields, and Validation Rules. - REST API Validation ensures HTTP status codes in
@RestResourceclasses match the response body logic. - Deployment Safety verifies that changed test classes are correctly registered in
app.yamlfor specified test runs.
How it works
- Context Discovery detects whether the project uses GitLab or GitHub by inspecting git remotes and CLI auth status.
- Metadata Retrieval fetches the MR/PR title, description, and the full diff against the
masterormainbranch. - Automated Analysis runs a multi-pass check across Apex classes, triggers, and XML metadata files.
- Interactive Reporting generates an inline-style review showing file names, line numbers, and severity levels.
- Human-in-the-Loop Posting asks for permission before using the
glaborghCLI to post the final verdict to the remote platform.
Frameworks & tools
Built for Salesforce development environments using Apex and Salesforce Metadata API. It requires git and either the GitLab CLI (glab) or GitHub CLI (gh) to be installed and authenticated.
Why this beats prompting it yourself
Generic prompts often fail to parse complex XML metadata or miss subtle Apex-specific anti-patterns like inherited sharing nuances. This skill implements a specific, multi-step workflow that cross-references app.yaml and reference rule files for consistent enforcement that a basic chat prompt cannot maintain.
Use cases
- Pre-deployment Audits to catch missing Flow documentation that breaks maintenance cycles.
- Security Reviews to identify dynamic SOQL injection risks or improper sharing declarations.
- Standardization to block developers from silencing PMD alerts without team consensus.
Known limitations
Requires local CLI authentication and repository access; cannot review private PRs without active glab or gh sessions. Inline comments are posted as a summary note rather than line-anchored threads.
How to use
Skills on Agensi run inside your AI agent. Copy the prompt, paste it into your agent, and it connects to Agensi and installs this skill for you. If a payment is needed, your agent shows it to you first.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill passes our trust checks below.
Security scanned
Passed our 8-point scan before listing
Fresh listing
Recently published to Agensi
Free forever
No account required to browse
Trust & safety
Security scanned
Verified clean 2 days ago
Requires