trigger-refactor-pipeline

trigger-refactor-pipeline

Popular

Refactor Salesforce triggers into handler patterns with automated test generation and deployment. Use when modernizing legacy triggers with DML/SOQL in loops or inconsistent patterns.

1.1Kstars
354forks
Updated 10/3/2026
SKILL.md
read-only
name
trigger-refactor-pipeline
description

Refactor Salesforce triggers into handler patterns with automated test generation and deployment. Use when modernizing legacy triggers with DML/SOQL in loops or inconsistent patterns.

When to Use This Skill

Use this skill when you need to:

  • Modernize legacy triggers with DML/SOQL operations inside loops

  • Refactor triggers that lack clear separation of concerns

  • Implement bulk-safe patterns in existing trigger code

  • Generate comprehensive test coverage for refactored triggers

Prerequisites

Before starting, ensure you have:

  • Salesforce CLI installed and authenticated to your target org

  • Python 3.9 or higher installed

  • The baseline trigger deployed (see Setup section)

Setup

Deploy the baseline anti-pattern trigger to analyze and refactor: