| name | uipath-automation |
| tags | ["uipath-dev","xaml","rpa","workflow","studio","master"] |
| description | Master UiPath Studio orchestration skill: classify the task, load progressive modules under references/orchestration/, then generate XAML, project.json, expressions, and dependencies. Covers all major activity areas (UI automation, Excel/Office, Web API, database, system files, Orchestrator, Invoke Code, REFramework notes, long-running, coded workflows, error handling, deploy/publish, debugging, expressions, best practices, code review). Triggers on UiPath Studio, workflow, XAML, sequence, flowchart, state machine, REFramework, LRW, selector, queue, asset, invoke code, REST, RPA, publish, robot, or any Studio developer task. Delegates verticals (Integration Service setup, DU training, deep persistence) to sibling skills when appropriate.
|
UiPath Automation Development (Studio) — Master orchestration
Generate production-ready UiPath Studio artifacts: XAML workflows, project.json, package dependencies, Invoke Code snippets, and—where appropriate—coded workflow entry points. Align generated projects with official UiPath documentation for the Studio version and activity packs in use.
Combined body of knowledge: The master pack lives under references/orchestration/ (not a separate Cursor skill). The single table of contents is references/UNIFIED-INDEX.md.
Canonical content (read each topic once)
| Topic | Primary reference | Notes |
|---|
| Control-flow and activity XAML catalog (Assign, If, For Each, Try-Catch, …) | references/activities.md | Do not duplicate long templates in chat; open this file. |
| Try-Catch, retries, GEH, exception strategy | references/orchestration/error-handling.md | Deep patterns here, not repeated in SKILL.md. |
| UI automation (modern scope, waits, selectors practice) | references/orchestration/activities/ui-automation.md | Narrative + Studio-oriented rules. |
| Excel / Office / DataTable | references/orchestration/activities/excel-office.md | Modern Use Excel File, ranges, loops. |
| HTTP / REST / JSON | references/orchestration/activities/web-api.md | Aligns with WebAPI activities. |
| Invoke Code (snippet depth) | references/orchestration/invoke-code.md + references/invoke-code-and-expressions.md | SKILL.md keeps only a short summary. |
| Coded workflows (C#) | references/orchestration/coded-automations.md; long guide: references/coded-automations.md | Orchestration module first for patterns. |
| This SKILL.md | — | Canvas/planning rules, single-line <Activity> root, escaping, variables/arguments, minimal modern Excel/browser examples for quick alignment. |
| Org overlay (SALES02 / HITL) | references/org-overlays/sales02-hitl-patterns.md | Optional NetHttpRequest, Graph mail, Adaptive Cards, LRW ProcessDiagram; use when the user needs that stack. |
Orchestration README (topic → file): references/orchestration/README.md.
Master orchestration (read modules before heavy codegen)
Default entry for Studio work. Beyond a one-line answer: classify → read the matching module(s) from the table above → implement.
- Route with UNIFIED-INDEX.md or orchestration/README.md.
- Load
references/orchestration/**/*.md as needed (often multiple files, e.g. Excel + web-api + xaml-generator.md).
- Standards: Valid XAML and namespaces; expression language matches the project; naming and error handling by default; state Windows vs Windows - Legacy vs cross-platform when it matters.
- Out of scope: Platform admin, Mining hubs, Apps, Studio Web, Test Manager depth, DU training — docs or vertical skills (
uipath-document-understanding, etc.).
- Canvas vs ad hoc: If a canvas/SDD exists, follow CRITICAL: Canvas first; otherwise use modules for how to build snippets or small projects.
CRITICAL: Canvas Context Required
BEFORE generating ANY UiPath code, you MUST:
- Do not generate any XAML or project files until planning is complete. If the user has or references a canvas/SDD/flow, planning comes first.
- Locate the canvas/flow file - Search for
solution-flow.json, *canvas*.json, or *flow*.json
- Run the uipath-workflow-planning skill - Read and follow it to extract all arguments, data flows, and visibility rules; produce workflow-plan.md or equivalent.
- Validate the execution plan - Ensure all fields from canvas are mapped to workflow arguments. Only then proceed to generate code.
┌─────────────────────────────────────────────────────────────────┐
│ MANDATORY WORKFLOW │
│ │
│ 1. FIND CANVAS ──> 2. RUN PLANNING ──> 3. GENERATE CODE │
│ solution-flow.json uipath-workflow-planning uipath-automation│
│ skill skill │
└─────────────────────────────────────────────────────────────────┘
Canvas Location Search
**/solution-flow*.json
**/*canvas*.json
**/*flow*.json
**/docs/*.json
Required Canvas Data Extraction
For EACH workflow to generate, extract from canvas:
- drillDown.inputArguments - All input parameters with types and sources
- drillDown.outputArguments - All output parameters with types
- drillDown.fields - Form fields with visibility rules
- drillDown.visibilityLevel - LIMITED, FULL, FULL + CHAIN EDITOR, etc.
- drillDown.hiddenFields - Fields NOT to include in this workflow
Pre-Generation Checklist
DO NOT PROCEED if canvas data is missing or incomplete. Do not generate XAML until the plan exists.
When there is no canvas / SDD
If the user explicitly asks for a standalone snippet (e.g. one Sequence, one Invoke Code example, or a small project.json fragment) and no solution-flow or spec exists, you may generate only what they asked for and state any assumptions (arguments, file paths, package versions). Do not block on a fictional canvas.
Official documentation (verify in product)
Prefer documented activity names and compatibility (Windows vs Windows - Legacy vs cross-platform) over guesswork.
Quick Reference
Project Types (Studio)
- Process / Background process: Standard server or unattended automation (see Studio About automation projects).
- Library: Reusable components published for other projects.
- Test automation / coded test: Testing project types with Testing activities.
- Orchestration process, REFramework, Attended automation templates: use when the user asks for those patterns (see Project templates).
- Coded automation: C#-first workflows (
CodedWorkflow); pair with references/coded-automations.md.
Workflow Types (file kinds in Studio)
| Type | Use Case | Container / notes |
|---|
| Sequence | Linear steps | <Sequence> |
| Flowchart | Branching, connectors | <Flowchart> |
| State machine | States and transitions | <StateMachine> |
| Forms | Form designer workflows | See Studio Forms workflow type |
| Global Exception Handler | Top-level error handler | Dedicated workflow file |
| Coded workflow | C# body | .cs + project.json expressionLanguage / entry points |
| Long-running / BPMN | Interrupting events, persistence | Often ProcessDiagram + dedicated packages (see long-running skill) |
From request to artifacts (single path)
- With canvas / SDD: Complete CRITICAL: Canvas (find flow JSON →
uipath-workflow-planning → validated plan). Then: project type → workflow type → project.json → Main + modules → error handling → validate against canvas.
- Without canvas: User-specified snippet or small project; load orchestration modules for patterns; no fictional canvas.
- Always: Pull detailed activity XML from activities.md or
references/orchestration/ instead of inventing duplicate templates in isolation.
Regression smoke expectations (tests.yaml)
Automated skill tests (tests.yaml) look for substring matches in model output. When generating answers that mirror those prompts, prefer including these type / token hints so smoke checks stay green (see test id):
- basic-sequence:
UseExcelFile, ReadRange, ForEach, LogMessage, <Sequence, DataTable (aliases allowed via expected_element_groups in YAML).
- browser-automation-modern:
UseApplicationBrowser, TypeInto, Click, BrowserType=, Url=, Selector=.
- error-handling-trycatch:
TryCatch, Catch, BusinessRuleException, Exception, LogMessage, Level="Error".
- project-json-generation:
projectVersion or schemaVersion, dependencies, project name string, UiPath, "targetFramework", "Windows".
- queue-operations:
GetQueueItem, SetTransactionStatus, QueueItem, QueueName=, Status=, TransactionItem=.
- datatable-operations:
BuildDataTable, WriteRange, DataTable, plus filtering (e.g. FilterDataTable or equivalent).
For release gates, run the skill tester with a capable model (e.g. Claude Sonnet on Bedrock) and optionally --temperature 0; see skill-tester/SKILL.md.
Project Structure
ProjectName/
├── project.json # Project metadata (required)
├── Main.xaml # Entry point (required)
├── Workflows/ # Additional workflows
│ ├── ProcessTransaction.xaml
│ └── InitAllSettings.xaml
├── Data/ # Config and data files
│ └── Config.xlsx
└── .screenshots/ # UI element screenshots
XAML Generation Essentials
Namespace Declarations
Every XAML file requires these namespaces at the root.
CRITICAL: The entire opening <Activity> tag with all namespaces MUST be on a SINGLE LINE. UiPath Studio's XAML parser requires this format. Multi-line formatting will cause parsing errors.
<Activity mc:Ignorable="sap sap2010" x:Class="Main" xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:s="clr-namespace:System;assembly=System.Private.CoreLib" xmlns:sap="http://schemas.microsoft.com/netfx/2009/xaml/activities/presentation" xmlns:sap2010="http://schemas.microsoft.com/netfx/2010/xaml/activities/presentation" xmlns:scg="clr-namespace:System.Collections.Generic;assembly=System.Private.CoreLib" xmlns:sco="clr-namespace:System.Collections.ObjectModel;assembly=System.Private.CoreLib" xmlns:this="clr-namespace:" xmlns:ui="http://schemas.uipath.com/workflow/activities" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
Key Requirements:
- All namespaces on ONE LINE (no line breaks within the Activity tag)
xmlns:mc must be declared before or on same line as mc:Ignorable
- Include
xmlns:this="clr-namespace:" for argument default values
- Include
VisualBasic.Settings and TextExpression.NamespacesForImplementation after x:Members
String Escaping in XAML
CRITICAL: When embedding HTML or JSON in XAML string values:
- NEVER use multiline strings with
xml:space="preserve" for HTML/JSON content
- Use XML entities for HTML tags:
< for <, > for >
- Keep JSON on single lines - No line breaks in JSON content
- For nested JSON in Action.Http bodies, follow XAML String Escaping Rules below (
\"" pattern, not doubled backslashes)
See also references/xaml-syntax.md for structure; escaping for HTML/JSON in attributes is summarized in this SKILL under XAML String Escaping Rules.
Common Error: 'Content-Type' is an unexpected token - This occurs when HTML attributes are embedded in multiline XAML strings without proper escaping.
Variable Declaration Pattern
Variables are declared within the workflow container:
<Sequence.Variables>
<Variable x:TypeArguments="x:String" Name="strInput" Default="" />
<Variable x:TypeArguments="x:Int32" Name="intCounter" Default="0" />
<Variable x:TypeArguments="sd:DataTable" Name="dtResults" />
<Variable x:TypeArguments="x:Boolean" Name="boolSuccess" Default="False" />
</Sequence.Variables>
Argument Declaration Pattern
Arguments enable workflow input/output:
<x:Members>
<x:Property Name="in_ConfigPath" Type="InArgument(x:String)" />
<x:Property Name="in_TransactionItem" Type="InArgument(ui:QueueItem)" />
<x:Property Name="out_Result" Type="OutArgument(x:String)" />
<x:Property Name="io_DataTable" Type="InOutArgument(sd:DataTable)" />
</x:Members>
Control flow and common activities