visualforce-patterns

Provide best-practice patterns for building and migrating Visualforce pages with secure controllers and ViewState handling.

2|Updated Mar 18, 2026
One-click install
npx skills add https://github.com/bhanu91221/claude-sfdx-iq --skill visualforce-patterns
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: visualforce-patterns
Source: https://github.com/bhanu91221/claude-sfdx-iq/tree/main/skills/visualforce-patterns
Command: npx skills add https://github.com/bhanu91221/claude-sfdx-iq --skill visualforce-patterns

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Visualforce-patterns tackles the complexity of building consistent Visualforce pages and migrating them to Lightning Web Components, reducing architectural drift and security risk across projects.

Core Features & Use Cases

  • Page structure patterns for Visualforce pages using Apex controllers and standard extensions.
  • ViewState management and performance optimizations including transient data and pagination.
  • VF-to-LWC migration strategy using a shared service layer to reuse business logic.
  • Security-focused practices for CSRF, access control, and error handling during migration.

Quick Start

Outline a plan to migrate a representative Visualforce page to a Lightning Web Component using the shared AccountService.

Frequently Asked Questions about visualforce-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I migrate Visualforce pages to Lightning Web Components?

Visualforce to LWC migration uses a shared service layer to reuse existing Apex business logic. This strategy ensures consistent architecture and safe transitions while reducing architectural drift across projects.

How do I optimize ViewState in Visualforce controllers?

Optimizing ViewState in Visualforce involves using transient data and pagination techniques to minimize the state payload. These patterns reduce page load times and improve overall controller performance.

What security patterns should I apply to Apex controllers in Visualforce?

Security patterns for Apex controllers in Visualforce focus on CSRF protection, access control, and robust error handling. These practices ensure safe page architecture and mitigate risks during VF-to-LWC migration.

Can I reuse Apex business logic when migrating Visualforce to LWC?

Reusing Apex business logic during VF-to-LWC migration is possible by structuring a shared service layer. This pattern allows both legacy Visualforce pages and new Lightning Web Components to access the same backend rules.

What is the best way to structure Visualforce pages with Apex controllers?

Structuring Visualforce pages effectively means applying best-practice patterns using Apex controllers and standard extensions. This ensures consistent architecture across admin and developer scenarios before initiating any LWC migration.