forcedotcom avatar

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-code

Installs 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 GitHub

Sponsors

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
1manutej avatarterraform-infrastructure-as-codemanutej/luxor-claude-marketplaceComprehensive Terraform Infrastructure as Code skill covering resources, modules, state management, workspaces, providers, and advanced patterns for cloud-agnos454skills.sh installs
2useai-pro avatarincident-responderuseai-pro/openclaw-skills-securityStep-by-step incident response for OpenClaw security breaches. Guides you through containment, investigation, credential rotation, and recovery after a maliciou445skills.sh installs
3manutej avatarterraform-infrastructuremanutej/luxor-claude-marketplaceComprehensive Terraform infrastructure-as-code skill covering providers, resources, modules, state management, and enterprise patterns for multi-cloud infrastru438skills.sh installs
4aj-geddes avatarsynthetic-monitoringaj-geddes/useful-ai-promptsImplement synthetic monitoring and automated testing to simulate user behavior and detect issues before users. Use when creating end-to-end test scenarios, moni427skills.sh installs
5cobosteven avatarcobo-agentic-wallet-sandboxcobosteven/cobo-agent-wallet-manualCreate and manage agentic wallets with Cobo. Use for autonomous onchain operations via the caw CLI: token transfers, contract calls, pact creation and approval,420skills.sh installs
6terramate-io avatarterraform-best-practicesterramate-io/agent-skillsTerraform and Infrastructure as Code optimization guidelines from Terramate. This skill should be used when writing, reviewing, or refactoring Terraform/OpenTof410skills.sh installs