umbraco-controllers

Implement lifecycle-safe Umbraco backoffice controllers with context access and OpenAPI client calls.

1|Updated May 21, 2026
One-click install
npx skills add https://github.com/1k-off/umbraco-observability-playground --skill umbraco-controllers-1k-off
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: umbraco-controllers
Source: https://github.com/1k-off/umbraco-observability-playground/tree/main/.agents/skills/umbraco-controllers
Command: npx skills add https://github.com/1k-off/umbraco-observability-playground --skill umbraco-controllers-1k-off

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It helps you design and implement reusable Umbraco backoffice controller logic that correctly ties into an element’s lifecycle for clean side effects and reliable cleanup.

Core Features & Use Cases

  • Lifecycle-aware controllers: Use hostConnected(), hostDisconnected(), and destroy() to manage timers, subscriptions, and teardown.
  • Controller composition: Host controllers inside other controllers/elements to share behavior across multiple backoffice elements.
  • Context access from controllers: Access notification and other contexts via getContext() to trigger UI or workflow updates.
  • Safe API calling pattern: Make API calls using the generated OpenAPI client configured with Umbraco auth context, avoiding raw fetch().

Quick Start

Fetch the latest Umbraco Controller documentation, then implement a controller by extending UmbControllerBase, overriding the needed lifecycle methods, and hosting it from your element.

Frequently Asked Questions about umbraco-controllers

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

FAQPage Schema
How do I manage side effects and cleanup in Umbraco backoffice controllers?

Umbraco backoffice controllers manage side effects by extending UmbControllerBase and overriding hostConnected(), hostDisconnected(), and destroy() lifecycle methods for deterministic resource teardown. This safely cleans up timers and subscriptions.

How do I access Umbraco contexts from a custom web component controller?

Umbraco controllers access contexts using getContext() or consumeContext() methods. This retrieves notification contexts to trigger UI or workflow updates from within reusable backoffice elements.

What is the best way to make authenticated API calls from Umbraco backoffice extensions?

The best way to make authenticated API calls in Umbraco backoffice extensions is using the generated OpenAPI client configured with Umbraco auth context, avoiding raw fetch() requests. This ensures proper authentication and consistent request handling.

Can I compose multiple controllers inside a single Umbraco backoffice element?

Yes, you can compose controllers by hosting controllers inside other controllers or backoffice elements. This shares functionality across multiple components, enabling reusable controller logic for custom elements that require coordinated side effects.

Do I need to extend UmbControllerBase for every custom Umbraco backoffice element?

You must extend UmbControllerBase when building custom Umbraco backoffice elements that require lifecycle-safe controller logic, deterministic resource management, or context access. It provides the necessary host lifecycle methods for proper side effect handling.

Why should I avoid raw fetch() when building Umbraco backoffice controllers?

Avoiding raw fetch() in Umbraco backoffice controllers ensures API calls use the generated OpenAPI client configured with Umbraco auth context. This provides automatic authentication handling and aligns with the platform's secure API calling patterns.