Salesforce code review

    1

    Automated Salesforce code reviews for Apex and metadata via GitLab/GitHub CLI with strict PMD and documentation checks.

    $5

    /mo

    Subscription · cancel anytime

    Secure checkout via Stripe

    • Always the latest version
    • Delivered live to your agent via MCP
    • Cancel anytime, access ends at period end
    Security scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    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

    FileLineSeverityFinding
    force-app/main/default/classes/CaseService.cls42BLOCKING@SuppressWarnings('PMD.AvoidDeeplyNestedIfStmts') detected. Suppression requires documented team consensus.
    force-app/main/default/classes/CaseService.cls108WARNINGSOQL query inside for loop. Move query to a collection outside the loop to ensure bulkification.
    force-app/main/default/classes/CaseService.cls155BLOCKINGHardcoded 18-character Salesforce ID 0018c00002E7v9aAAB detected. Use a Label or Custom Setting.
    force-app/main/default/objects/Case/fields/Priority_Reason__c.field-meta.xml4BLOCKINGMissing <description> field. All new or modified Custom Fields must include a functional description.
    app.yaml12NOTECaseServiceTest 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

    1. Would you like me to post this summary as a comment to GitLab MR 402?
    2. Address the hardcoded ID and the missing field description in the next commit.
    3. Obtain team lead approval if the PMD suppression is genuinely necessary.
    $5/mo

    Subscription · always the latest version

    • Secure checkout via Stripe
    • Cancel anytime
    • Delivered live via MCP

    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 @SuppressWarnings annotations to prevent bypassing quality gates.
    • Metadata Documentation Audit checks for missing or placeholder Description fields in Flows, Custom Fields, and Validation Rules.
    • REST API Validation ensures HTTP status codes in @RestResource classes match the response body logic.
    • Deployment Safety verifies that changed test classes are correctly registered in app.yaml for specified test runs.

    How it works

    1. Context Discovery detects whether the project uses GitLab or GitHub by inspecting git remotes and CLI auth status.
    2. Metadata Retrieval fetches the MR/PR title, description, and the full diff against the master or main branch.
    3. Automated Analysis runs a multi-pass check across Apex classes, triggers, and XML metadata files.
    4. Interactive Reporting generates an inline-style review showing file names, line numbers, and severity levels.
    5. Human-in-the-Loop Posting asks for permission before using the glab or gh CLI 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.

    Requires local glab or gh CLI authentication. Cannot anchor comments to specific lines via CLI; posts as a summary note. Only reviews diffs against master or main branches.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before any payment.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Free forever

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 1 month ago

    Requires

    Git
    Salesforce CLI
    GitLab
    Github

    Permissions

    Terminal / Shell
    Read Files
    Write Files
    Network Access
    Listed1 month ago

    What's inside

    Frequently Asked Questions

    This skill automates the detection of Apex anti-patterns, missing metadata descriptions, and unauthorized PMD suppressions, ensuring your Salesforce deployments meet strict quality standards without manual oversight.

    It requires the GitLab CLI (`glab`) or GitHub CLI (`gh`) to be installed and authenticated on your local machine, as it uses these tools to securely fetch diffs and post review summaries.

    Yes, the skill is designed to analyze both Apex code and Salesforce XML metadata, specifically auditing Flows, Custom Fields, and Validation Rules for missing documentation.

    The skill performs a local analysis and then asks for your explicit permission before using your CLI to post the review findings back to the repository, keeping you in control of the final output.

    It is compatible with any AI agent that supports file system access and terminal execution, provided the environment has `git` and the necessary Git platform CLIs configured.

    Currently, the skill posts a comprehensive summary note to the MR or PR; it identifies specific line numbers and file names within that summary rather than creating individual line-anchored threads.

    New in Agents & Orchestration