$npx -y skills add marcelocruzrpa/uipath-ai-skills --skill uipath-tasksGenerates UiPath Tasks workflows — Form Tasks (CreateFormTask, WaitForFormTaskAndResume, GetFormTasks) with form.io schemas and FormData bindings, External Tasks (CreateExternalTask, WaitForExternalTaskAndResume) for system-in-the-loop patterns, and Task Management (CompleteTask,
| 1 | # UiPath Tasks Skill |
| 2 | |
| 3 | Generate Tasks workflows for human-in-the-loop, system-in-the-loop, and task management patterns in UiPath. |
| 4 | |
| 5 | > **Plugin architecture:** This skill's `extensions/` directory is auto-discovered by uipath-core's `plugin_loader.py`. Generators, lint rules, scaffold hooks, namespaces, and known activities are registered at import time — no manual wiring needed. Core's `generate_workflow.py`, `validate_xaml`, and `scaffold_project.py` query the plugin registries at runtime. |
| 6 | |
| 7 | ## Plugin API contract (v2) |
| 8 | |
| 9 | This skill is the canonical example for out-of-tree plugin authors. The contract: |
| 10 | |
| 11 | - **`REQUIRED_API_VERSION = 2`** must be declared at the top of `extensions/__init__.py`. Plugins on v1 (or with no declaration) fail to load with a clear `API version mismatch` error and any partial registrations are rolled back. |
| 12 | - **Registration entry points** added in v2: `register_version_profile(package, profile_version, profile_dict)` and `register_band_profile_mapping(band, package, profile_version)` — used by lint 122 (version-band drift). Call `register_band_profile_mapping` once per `(band, package)` pair. Registering after the lint module is already imported automatically invalidates the lint caches, so the new entries take effect on the next lint pass without any reload. |
| 13 | - **Atomic commit:** every `register_*` call made during a plugin's load (including from submodules imported from `__init__.py`) is captured in the registry snapshot. If `__init__.py` raises before completing, all registrations from that plugin are reverted. The registry is never observed in a partially-loaded state by other plugins or by core. |
| 14 | - **Out of scope for rollback:** non-registry side effects (file writes, env vars, threads spawned at import time, monkey-patches). Confine those to lazy paths invoked after a successful load. |
| 15 | - **Test that load succeeded:** `assert plugin_loader.get_load_failures() == []` after `load_plugins()`. A plugin that raised during load surfaces in that list with its filename and exception. |
| 16 | |
| 17 | Worked example: see `uipath-tasks/extensions/__init__.py:34` (the `REQUIRED_API_VERSION = 2` declaration) and `:310-312` (the Persistence/1.4 profile + band-25/26 mapping calls). |
| 18 | |
| 19 | ## Extensions (Plugin System) |
| 20 | |
| 21 | ``` |
| 22 | uipath-tasks/ |
| 23 | ├── SKILL.md |
| 24 | ├── references/ |
| 25 | │ ├── tasks.md ← Form Tasks + form.io + Action Types Comparison |
| 26 | │ ├── external-tasks.md ← External Tasks (system-in-the-loop) |
| 27 | │ └── task-management.md ← GetFormTasks, CompleteTask, AssignTasks |
| 28 | └── extensions/ |
| 29 | ├── __init__.py ← Registers all AC components with plugin_loader |
| 30 | ├── generators.py ← 7 generators (form, external, task management) |
| 31 | ├── lint_rules.py ← AC-10, AC-11, AC-12, AC-26 |
| 32 | ├── scaffold_hooks.py ← enable_persistence_support |
| 33 | └── battle_test_grading.py ← 8 battle test scenario graders |
| 34 | ``` |
| 35 | |
| 36 | **What gets registered:** |
| 37 | - 7 generators: `create_form_task`, `wait_for_form_task`, `create_external_task`, `wait_for_external_task`, `get_form_tasks`, `complete_task`, `assign_tasks` |
| 38 | - 4 lint rules: AC-10 (Form Create/Wait mismatch), AC-11 (FormData key mismatch), AC-12 (External Create/Wait mismatch), AC-26 (persistence in sub-workflow) |
| 39 | - 1 scaffold hook: auto-enables `supportsPersistence` when Persistence.Activities is in deps |
| 40 | - 3 namespaces: `upaf` (FormTask), `upae` (ExternalTask), `upat` (Tasks) |
| 41 | - 7 known activities: `CreateFormTask`, `WaitForFormTaskAndResume`, `CreateExternalTask`, `WaitForExternalTaskAndResume`, `GetFormTasks`, `CompleteTask`, `AssignTasks` |
| 42 | |
| 43 | ## When To Read Which Reference |
| 44 | |
| 45 | | Task | Read | |
| 46 | |---|---| |
| 47 | | Create a form task workflow | `references/tasks.md` → Create Form Task + FormData Bindings | |
| 48 | | Design a form.io form schema | `references/tasks.md` → Form.io Component Reference | |
| 49 | | Wait for human approval / resume | `references/tasks.md` → Wait for Form Task and Resume | |
| 50 | | **Any PDD with "for each X" / "multiple X" / "batch of X" / N rows** (default for N-item approvals, not advanced) | `references/tasks.md` → Shadow Task Pattern | |
| 51 | | Compare action types (Form vs External) | `references/tasks.md` → Action Types Comparison | |
| 52 | | Create an external task (system-in-the-loop) | `references/external-tasks.md` → Create External Task | |
| 53 | | Wait for external system resolution | `references/e |