
Trigger Refactor Pipeline
This does exactly what Salesforce developers dread: takes your legacy triggers with DML in loops and other anti-patterns, then refactors them into bulk-safe code with proper separation of concerns. It's from Salesforce's official forcedotcom org, so it follows their architecture patterns. You'll need the Salesforce CLI and Python 3.9+ to run it. The workflow deploys a baseline anti-pattern trigger, analyzes it, then generates refactored code with test coverage. If you've inherited a org with triggers from 2012 that make you wince, this automates the cleanup work you'd otherwise spend days doing manually.
- skills.sh installs
- 470
- GitHub stars
- 449
- last updated
- Jun 3, 2026
Install
$ npx -y skills add forcedotcom/afv-library --skill trigger-refactor-pipeline --agent claude-codeInstalls into .claude/skills of the current project.
Files
This does exactly what Salesforce developers dread: takes your legacy triggers with DML in loops and other anti-patterns, then refactors them into bulk-safe code with proper separation of concerns. It's from Salesforce's official forcedotcom org, so it follows their architecture patterns. You'll need the Salesforce CLI and Python 3.9+ to run it. The workflow deploys a baseline anti-pattern trigger, analyzes it, then generates refactored code with test coverage. If you've inherited a org with triggers from 2012 that make you wince, this automates the cleanup work you'd otherwise spend days doing manually.
Browse the repository on GitHubSponsors
Details
- Repository
- github.com/forcedotcom/afv-library
- Categories
- DevOps & CI/CD, Code Review & Quality, Automation & Workflows, Sales & Marketing
- First seen
- Jun 3, 2026
More from forcedotcom/afv-library
All 58- Generating Apex1.6K
- Generating Apex Test1.6K
- Generating Custom Field1.6K
- Generating Custom Object1.6K
- Generating Flow1.6K
- Generating Permission Set1.6K
- Building Ui Bundle App1.5K
- Building Ui Bundle Frontend1.5K
- Deploying Ui Bundle1.5K
- Developing Agentforce1.5K
- Generating Custom Application1.5K
- Generating Custom Lightning Type1.5K
- Generating Custom Tab1.5K
- Generating Flexipage1.5K
- Generating Lightning App1.5K
- Generating List View1.5K
- Generating Ui Bundle Features1.5K
- Generating Ui Bundle Metadata1.5K
- Generating Ui Bundle Site1.5K
- Generating Validation Rule1.5K
- Implementing Ui Bundle Agentforce Conversation Client1.5K
- Implementing Ui Bundle File Upload1.5K
- Observing Agentforce1.5K
- Searching Media1.5K