/umbraco-cms-backoffice-skills:umbraco-umbraco-elementfrom umbraco-cms-backoffice-skills
Implements Umbraco backoffice elements (UmbElementMixin, UmbLitElement) using official docs. Covers context API, controllers, and localization for custom backoffice extensions.
Ships in umbraco-cms-backoffice-skills. 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.
An Umbraco Element is a Web Component enhancement that simplifies integration with the Umbraco Backoffice through the UmbElementMixin. It provides methods to consume/provide contexts, observe states, handle localization, and host controllers. UmbElementMixin can be applied to any Web Component-compatible base class, while UmbLitElement is a convenience wrapper combining the mixin with Lit.
Always fetch the latest docs before implementing:
import { html, customElement } from '@umbraco-cms/backoffice/external/lit';
import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
@customElement('my-element')
export class MyElement extends UmbLitElement {
constructor() {
super();
// Access built-in features
this.consumeContext(MY_CONTEXT, (context) => {
console.log('Context consumed:', context);
});
}
render() {
return html`
<div>
<h3>${this.localize.term('myKey')}</h3>
<p>My custom element</p>
</div>
`;
}
}
export default MyElement;
import { customElement } from '@umbraco-cms/backoffice/external/lit';
import { UmbElementMixin } from '@umbraco-cms/backoffice/element-api';
@customElement('my-element')
export class MyElement extends UmbElementMixin(HTMLElement) {
constructor() {
super();
this.consumeContext(MY_CONTEXT, (context) => {
// Use context
});
}
connectedCallback() {
this.innerHTML = `
<div>
<h3>My Element</h3>
</div>
`;
}
}
export default MyElement;
import { customElement } from '@umbraco-cms/backoffice/external/lit';
import { UmbElementMixin } from '@umbraco-cms/backoffice/element-api';
import { UUIButtonElement } from '@umbraco-cms/backoffice/external/uui';
@customElement('my-custom-button')
export class MyCustomButton extends UmbElementMixin(UUIButtonElement) {
constructor() {
super();
// Now has access to Umbraco contexts and controllers
}
}
export default MyCustomButton;
import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
import { UMB_NOTIFICATION_CONTEXT } from '@umbraco-cms/backoffice/notification';
export class MyElement extends UmbLitElement {
#notificationContext?: typeof UMB_NOTIFICATION_CONTEXT.TYPE;
constructor() {
super();
this.consumeContext(UMB_NOTIFICATION_CONTEXT, (context) => {
this.#notificationContext = context;
});
}
showNotification() {
this.#notificationContext?.peek('positive', {
data: { headline: 'Success!', message: 'Operation completed' }
});
}
}
import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
import { UMB_CURRENT_USER_CONTEXT } from '@umbraco-cms/backoffice/current-user';
export class MyElement extends UmbLitElement {
@state()
private _userName?: string;
constructor() {
super();
this.consumeContext(UMB_CURRENT_USER_CONTEXT, (context) => {
this.observe(
context.currentUser,
(user) => {
this._userName = user?.name;
},
'_userName'
);
});
}
}
| Feature | UmbLitElement | UmbElementMixin |
|---|---|---|
| Base | Pre-configured with Lit | Apply to any base class |
| Usage | extends UmbLitElement | extends UmbElementMixin(BaseClass) |
| Best for | Lit-based components | Custom base classes or UI library components |
| Features | Same features | Same features |
That's it! Always fetch fresh docs, keep examples minimal, generate complete working code.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub umbraco/umbraco-cms-backoffice-skills --plugin umbraco-cms-backoffice-skills67 skills in this plugin
/package-script-writerGenerate Umbraco CMS installation scripts using the Package Script Writer CLI/umbraco-add-extension-referenceAdd a new Umbraco extension project reference to the main Umbraco instance and solution/umbraco-auth-providerImplement authentication providers for Umbraco backoffice using official docs/umbraco-backofficeUmbraco backoffice extension customisation - complete working examples showing how extension types combine/umbraco-block-editor-custom-viewImplement block editor custom views in Umbraco backoffice using official docs/umbraco-bundleImplement bundles in Umbraco backoffice using official docsOther plugins' skills for the same job