/vibe:ghcopilot-instr-power-apps-canvas-yamlfrom vibe
Guides writing and reviewing Power Apps Canvas Apps YAML using Microsoft schema v3.0 and Power Fx formulas. Covers app root, screens, controls, and source control best practices.
Ships in vibe. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
This document provides comprehensive instructions for working with YAML code for Power Apps canvas apps based on the official Microsoft Power Apps YAML schema (v3.0) and Power Fx documentation.
Official Schema Source: https://raw.githubusercontent.com/microsoft/PowerApps-Tooling/refs/heads/master/schemas/pa-yaml/v3.0/pa.schema.yaml
Power Fx is the formula language used throughout Power Apps canvas apps. It follows these core principles:
Power Fx promotes:
Every Power Apps YAML file follows this top-level structure:
App:
Properties:
# App-level properties and formulas
StartScreen: =Screen1
Screens:
# Screen definitions
ComponentDefinitions:
# Custom component definitions
DataSources:
# Data source configurations
EditorState:
# Editor metadata (screen order, etc.)
The App section defines application-level properties and configuration.
App:
Properties:
StartScreen: =Screen1
BackEnabled: =false
# Other app properties with Power Fx formulas
=)StartScreen property is commonly specifiedDefines all screens in the application as an unordered map.
Screens:
Screen1:
Properties:
# Screen properties
Children:
- Label1:
Control: Label
Properties:
Text: ="Hello World"
X: =10
Y: =10
- Button1:
Control: Button
Properties:
Text: ="Click Me"
X: =10
Y: =100
ControlName:
Control: ControlType # Required: Control type identifier
Properties:
PropertyName: =PowerFxFormula
# Optional properties:
Group: GroupName # For organizing controls in Studio
Variant: VariantName # Control variant (affects default properties)
MetadataKey: Key # Metadata identifier for control
Layout: LayoutName # Layout configuration
IsLocked: true/false # Whether control is locked in editor
Children: [] # For container controls (ordered by z-index)
You can specify control versions using the @ operator:
MyButton:
Control: [email protected] # Specific version
Properties:
Text: ="Click Me"
MyLabel:
Control: Label # Uses latest version by default
Properties:
Text: ="Hello World"
Common first-party controls include:
Label, Button, TextInput, HTMLTextSlider, Toggle, Checkbox, Radio, Dropdown, Combobox, DatePicker, ListBoxImage, Icon, Video, Audio, PDF viewer, Barcode scannerContainer, Rectangle, Circle, Gallery, DataTable, FormColumn chart, Line chart, Pie chartTimer, Camera, Microphone, Add picture, Import, ExportSpecial attention for container controls and their children:
MyContainer:
Control: Container
Properties:
Width: =300
Height: =200
Fill: =RGBA(240, 240, 240, 1)
Children:
- Label1:
Control: Label
Properties:
Text: ="Inside Container"
X: =10 # Relative to container
Y: =10 # Relative to container
- Button1:
Control: Button
Properties:
Text: ="Container Button"
X: =10
Y: =50
MyCustomControl:
Control: Component
ComponentName: MyComponent
Properties:
X: =10
Y: =10
# Custom component properties
MyPCFControl:
Control: CodeComponent
ComponentName: publisherprefix_namespace.classname
Properties:
X: =10
Y: =10
Define reusable custom components:
ComponentDefinitions:
MyComponent:
DefinitionType: CanvasComponent
Description: "A reusable component"
AllowCustomization: true
AccessAppScope: false
CustomProperties:
InputText:
PropertyKind: Input
DataType: Text
Description: "Input text property"
Default: ="Default Value"
OutputValue:
PropertyKind: Output
DataType: Number
Description: "Output number value"
Properties:
Fill: =RGBA(255, 255, 255, 1)
Height: =100
Width: =200
Children:
- Label1:
Control: Label
Properties:
Text: =Parent.InputText
Text, Number, BooleanDateAndTime, Color, CurrencyRecord, Table, ImageVideoOrAudio, ScreenConfigure data connections:
DataSources:
MyTable:
Type: Table
Parameters:
TableLogicalName: account
MyActions:
Type: Actions
ConnectorId: shared_office365users
Parameters:
# Additional connector parameters
Maintains editor organization:
EditorState:
ScreensOrder:
- Screen1
- Screen2
- Screen3
ComponentDefinitionsOrder:
- MyComponent
- AnotherComponent
=null (without quotes)Text: ="Hello World"
X: =10
Visible: =Toggle1.Value
OnSelect: =Navigate(Screen2, ScreenTransition.Fade)
OptionalProperty: null # Represents no value
# Static values
Text: ="Static Text"
X: =50
Visible: =true
# Control references
Text: =TextInput1.Text
Visible: =Toggle1.Value
# Parent references (for controls in containers/galleries)
Width: =Parent.Width - 20
Height: =Parent.TemplateHeight # In gallery templates
# Functions
OnSelect: =Navigate(NextScreen, ScreenTransition.Slide)
Text: =Concatenate("Hello ", User().FullName)
# Conditional logic
Visible: =If(Toggle1.Value, true, false)
Fill: =If(Button1.Pressed, RGBA(255,0,0,1), RGBA(0,255,0,1))
# Data operations
Items: =Filter(DataSource, Status = "Active")
Text: =LookUp(Users, ID = 123).Name
Children array are ordered by z-indexButton1, Label2)Group propertyControl propertyDefinitionTypeType^([A-Z][a-zA-Z0-9]*/)?[A-Z][a-zA-Z0-9]*(@\d+\.\d+\.\d+)?$^([a-z][a-z0-9]{1,7})_([a-zA-Z0-9]\.)+[a-zA-Z0-9]+$=ComponentName matches definitionComponentDefinitions:
MyLibraryComponent:
DefinitionType: CanvasComponent
AllowCustomization: true
ComponentLibraryUniqueName: "pub_MyComponentLibrary"
# Component definition details
Parent.Width and Parent.Height for responsive sizingMyGallery:
Control: Gallery
Properties:
Items: =DataSource
TemplateSize: =100
Children:
- GalleryTemplate: # Template for each gallery item
Children:
- TitleLabel:
Control: Label
Properties:
Text: =ThisItem.Title
Width: =Parent.TemplateWidth - 20
MyForm:
Control: Form
Properties:
DataSource: =DataSource
DefaultMode: =FormMode.New
Children:
- DataCard1:
Control: DataCard
Properties:
DataField: ="Title"
Children:
- DataCardValue1:
Control: TextInput
Properties:
Default: =Parent.Default
Properties:
Text: =IfError(LookUp(DataSource, ID = 123).Name, "Not Found")
Visible: =!IsError(DataSource)
OnSelect: =IfError(
Navigate(DetailScreen, ScreenTransition.Cover),
Notify("Navigation failed", NotificationType.Error)
)
Power Apps YAML files can be obtained through several methods:
Power Platform CLI:
# List canvas apps in environment
pac canvas list
# Download and extract YAML files
pac canvas download --name "MyApp" --extract-to-directory "C:\path\to\destination"
Manual Extraction from .msapp:
# Extract .msapp file using PowerShell
Expand-Archive -Path "C:\path\to\yourFile.msapp" -DestinationPath "C:\path\to\destination"
Dataverse Git Integration: Direct access to source files without .msapp files
\src\App.pa.yaml - Represents the main App configuration\src\[ScreenName].pa.yaml - One file for each screen\src\Component\[ComponentName].pa.yaml - Component definitionsImportant Notes:
\src folder are intended for source controlProperties:
Text: =Concatenate("Hello ", User().FullName)
X: =Sum(10, 20, 30)
Items: =Filter(DataSource, Status = "Active")
Properties:
Text: =Location.Latitude & ", " & Location.Longitude
Visible: =Connection.Connected
Color: =If(Acceleration.X > 5, Color.Red, Color.Blue)
Properties:
Fill: =Color.Blue
Transition: =ScreenTransition.Fade
Align: =Align.Center
Properties:
Text: =ThisItem.Title # In galleries
Width: =Parent.Width - 20 # In containers
Height: =Self.Height / 2 # Self-reference
OnSelect: =Navigate(NextScreen, ScreenTransition.Cover)
OnSelect: =Back()
OnSelect: =Exit()
OnSelect: =Launch("https://example.com")
Items: =Filter(DataSource, Category = "Active")
Text: =LookUp(Users, ID = 123).Name
OnSelect: =Patch(DataSource, ThisItem, {Status: "Complete"})
OnSelect: =Collect(LocalCollection, {Name: TextInput1.Text})
Visible: =If(Toggle1.Value, true, false)
Text: =Switch(Status, "New", "🆕", "Complete", "✅", "❓")
Fill: =If(Value < 0, Color.Red, Color.Green)
Text: =Concatenate("Hello ", User().FullName)
Text: =Upper(TextInput1.Text)
Text: =Substitute(Label1.Text, "old", "new")
Text: =Left(Title, 10) & "..."
Text: =Sum(Sales[Amount])
Text: =Average(Ratings[Score])
Text: =Round(Calculation, 2)
Text: =Max(Values[Number])
Text: =Text(Now(), "mm/dd/yyyy")
Text: =DateDiff(StartDate, EndDate, Days)
Text: =Text(Today(), "dddd, mmmm dd, yyyy")
Visible: =IsToday(DueDate)
=+ or = sign (unlike Excel)="Hello World"ControlName.PropertyName# Literal values
Text: ="Static Text"
X: =42
Visible: =true
# Control property references
Text: =TextInput1.Text
Visible: =Checkbox1.Value
# Function calls
Text: =Upper(TextInput1.Text)
Items: =Sort(DataSource, Title)
# Complex expressions
Text: =If(IsBlank(TextInput1.Text), "Enter text", Upper(TextInput1.Text))
# Property formulas (calculate values)
Properties:
Text: =Concatenate("Hello ", User().FullName)
Visible: =Toggle1.Value
# Behavior formulas (perform actions - use semicolon for multiple actions)
Properties:
OnSelect: =Set(MyVar, true); Navigate(NextScreen); Notify("Done!")
Properties:
Items: =Filter(MyCollection, Status = "Active")
OnSelect: =ClearCollect(MyCollection, DataSource)
OnSelect: =Collect(MyCollection, {Name: "New Item", Status: "Active"})
Properties:
Text: =IfError(Value(TextInput1.Text), 0)
OnSelect: =IfError(
Patch(DataSource, ThisItem, {Field: Value}),
Notify("Error updating record", NotificationType.Error)
)
Properties:
Fill: =ColorValue("#" & HexInput.Text)
Height: =Parent.Height * (Slider1.Value / 100)
X: =If(Alignment = "Center", (Parent.Width - Self.Width) / 2, 0)
=true, =false=123, =45.67="Hello World"=Date(2024, 12, 25)=Time(14, 30, 0)=Now()=Color.Red, =RGBA(255, 128, 0, 1)={Name: "John", Age: 30}=Table({Name: "John"}, {Name: "Jane"})=GUID()Properties:
Text: =Text(123.45, "#,##0.00") # Number to text
Text: =Value("123.45") # Text to number
Text: =DateValue("12/25/2024") # Text to date
Visible: =Boolean("true") # Text to boolean
Properties:
Visible: =Not(IsBlank(OptionalField))
Visible: =Not(IsError(Value(TextInput1.Text)))
Visible: =IsNumeric(TextInput1.Text)
Properties:
Items: =Table(
{Name: "Product A", Price: 10.99},
{Name: "Product B", Price: 15.99}
)
Items: =["Option 1", "Option 2", "Option 3"] # Single-column table
Properties:
Items: =Filter(Products, Price > 10)
Items: =Sort(Products, Name, Ascending)
Items: =SortByColumns(Products, "Price", Descending, "Name", Ascending)
Properties:
Items: =AddColumns(Products, "Total", Price * Quantity)
Items: =RenameColumns(Products, "Price", "Cost")
Items: =ShowColumns(Products, "Name", "Price")
Items: =DropColumns(Products, "InternalID")
Properties:
Text: =Sum(Products, Price)
Text: =Average(Products, Rating)
Text: =Max(Products, Price)
Text: =CountRows(Products)
Properties:
OnSelect: =Set(MyGlobalVar, "Hello World")
Text: =MyGlobalVar
Properties:
OnSelect: =UpdateContext({LocalVar: "Screen Specific"})
OnSelect: =Navigate(NextScreen, None, {PassedValue: 42})
Properties:
OnSelect: =ClearCollect(MyCollection, DataSource)
OnSelect: =Collect(MyCollection, {Name: "New Item"})
Items: =MyCollection
DataSources:
SharePointList:
Type: Table
Parameters:
TableLogicalName: "Custom List"
Office365Users:
Type: Actions
ConnectorId: shared_office365users
Properties:
Items: =Filter(SharePointList, Status = "Active")
OnSelect: =Office365Users.SearchUser({searchTerm: SearchInput.Text})
Properties:
# Delegable operations (executed server-side)
Items: =Filter(LargeTable, Status = "Active") # Efficient
# Non-delegable operations (may download all records)
Items: =Filter(LargeTable, Len(Description) > 100) # Warning issued
# Handle blank values
Properties:
Text: =If(IsBlank(OptionalText), "Default", OptionalText)
# Handle errors gracefully
Properties:
Text: =IfError(RiskyOperation(), "Fallback Value")
# Validate input
Properties:
Visible: =And(
Not(IsBlank(NameInput.Text)),
IsNumeric(AgeInput.Text),
IsMatch(EmailInput.Text, Email)
)
# Efficient data loading
Properties:
Items: =Filter(LargeDataSource, Status = "Active") # Server-side filtering
# Use delegation-friendly operations
Properties:
Items: =Sort(Filter(DataSource, Active), Name) # Delegable
# Avoid: Sort(DataSource, If(Active, Name, "")) # Not delegable
# Clear unused collections
Properties:
OnSelect: =Clear(TempCollection)
# Limit data retrieval
Properties:
Items: =FirstN(Filter(DataSource, Status = "Active"), 50)
Remember: This guide provides comprehensive coverage of Power Apps Canvas Apps YAML structure and Power Fx formulas. Always validate your YAML against the official schema and test formulas in the Power Apps Studio environment.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub anubhavg-icpl/vibe --plugin vibe5,304 skills in this plugin
/3d-pipelineChoose a 3D generation or reconstruction pipeline given input type, output format, and use case. Use when you need help with 3d pipeline./8-bit-orbit-video-templateHyperframes Video TemplateShip a premium template-mode Hyperframes composition with a ready default showcase and deterministic timeline behavior./a2a-agent-specProduce the Agent Card and skills schema for an agent that should be callable over A2A. Use when you need help with a2a agent spec.Other plugins' skills for the same job