Skip to main content
World Tour Tokyo: Registration Open! Join us for TDX, DataFam, and the SFUG CUP—all in one place.

Seamlessly Interact with Agentforce as You Code

Learning Objectives

After completing this unit, you’ll be able to:

  • Navigate to Agentforce Vibes chat in VS Code.
  • Explain how Agentforce Vibes helps you write and deploy code.
  • Explain how Rules maintain consistent coding standards across your project.
  • Describe how Skills and Abilities support repeatable development workflows.

Get to Know Agentforce Vibes

Stop asking your AI questions and start giving it tasks. Agentforce Vibes is more than a chatbot—it’s an active development partner that doesn't just surface data; it takes the wheel to build, refine, and deploy on the Salesforce platform. Through agentic chat powered by Model Context Protocol (MCP), Skills, Rules and Workflows, Agentforce Vibes can execute commands and perform complex workflows automatically, right from within Visual Studio Code.

Agentforce Vibes represents the evolution of AI-powered development assistance. When you chat with Agentforce Vibes, you’re not just getting code suggestions—you’re getting a coding partner that can understand your project context, execute tools on your behalf, and help you complete entire development workflows through natural language conversations.

To get to the chat screen, click the Agentforce Vibes icon in the Activity Bar. Once you’re in, Agentforce Vibes knows what you're working on and keeps up with the conversation. It even suggests code based on what you write and the file you’re working on in your VS Code editor. If you need more help, just continue chatting with Agentforce Vibes to get an even better response.

VS Code window with Agentforce

Try These Sample Conversation Starters

Here are simple prompts that showcase how Agentforce Vibes uses the Salesforce DX MCP server to take action and understand your org context.

Org-Aware Development

  • Create an Apex class for Account management that follows my org's existing patterns
  • Generate a Lightning web component for Contact search using my org's custom fields
  • Build a trigger for Opportunity that matches my org's naming conventions

Smart Code Generation

  • Create comprehensive unit tests for my AccountService class
  • Build an Apex method that validates data based on my org's validation rules

Context-Aware Assistance

  • Explain why this SOQL query might be slow in my org and suggest improvements
  • Review my Apex class and suggest security improvements based on my org's sharing model
  • Help me understand the relationships between my custom objects

These prompts show how Agentforce Vibes uses your org's metadata and structure to provide intelligent, contextual assistance.

Use Rules and Workflows

Agentforce Vibes Rules allow you to establish consistent coding standards and project-specific preferences that Agentforce follows throughout your development sessions. Rules work as persistent instructions that help maintain consistency across your development work and ensure your team follows the same patterns.

Key Benefits of Rules

  • Enforce coding patterns and architectural decisions automatically
  • Maintain consistent naming conventions and code structure
  • Share development practices across your team
  • Ensure adherence to security and documentation standards

Suggested Rules

  • Use PascalCase for Apex class names (for example, AccountService, OpportunityTriggerHandler)
  • Use kebab-case for Lightning web component names (for example, account-detail, product-search)
  • Follow your org's specific trigger naming patterns and error handling approaches

You can create rules through Agentforce Vibes' interface or by using the /newrule command in chat.

Use Skills and Abilities

Agentforce Vibes helps you move from one-off prompts to repeatable execution by combining Skills and Abilities. Skills are modular instruction sets for specific tasks. They include guidance, workflows, and optional resources, and they load on demand only when relevant. Abilities are the concrete things Agentforce Vibes can do in a workflow (for example, generate code, analyze files, create tests, and use connected tools) to help complete development tasks.Together, Skills and Abilities help teams deliver customer value faster by improving consistency, reducing context switching, and accelerating task completion.

Key Benefits of Skills and Abilities

  • Package repeatable development guidance so common tasks are handled consistently.
  • Activate only relevant Skill instructions, which improves focus and token efficiency.
  • Execute practical workflows faster through Agentforce Vibes’ built-in and connected capabilities.
  • Help teams ship customer-facing improvements with fewer retries and less rework.

Example Skills and Abilities

  • Skill: apex-class-generator that defines naming, structure, and required validation steps for Apex services
  • Skill: lwc-component-creator that standardizes component scaffolding and testing expectations
  • Ability in action: Use Agentforce Vibes to generate implementation code, produce draft tests, and refine output against project context and standards.
  • Ability in action: Use connected tooling context to improve relevance of generated code and recommendations.

Unlike always-on Rules, Skills activate when the request matches the Skill description, which keeps unrelated instructions out of context. Skills are enabled by default and can be managed in the Agentforce Vibes Skills UI.

Add Context for Better Results

To get the most out of Agentforce Vibes, provide relevant context about your project, requirements, and coding standards. You can reference existing artifacts (type @ in the chat to see an allowed list of context), describe business logic, mention specific Salesforce features you’re working with, and explain the intended functionality. The more context you provide, the more accurate and relevant the generated code will be. Agentforce Vibes can understand your project structure and maintain consistency with your existing codebase when given proper context.

Resources

Share your Trailhead feedback over on Salesforce Help.

We'd love to hear about your experience with Trailhead - you can now access the new feedback form anytime from the Salesforce Help site.

Learn More Continue to Share Feedback