About umbraco-entity-actions
A skill for implementing Umbraco entity actions associated with specific items such as documents or media. It helps developers define action manifests and implementations, including links and permission-aware behavior.
Key features
- 01Entity-specific context-menu actions
- 02Action manifests and implementations
- 03Link-based actions
- 04Permission-related examples
- 05Documentation-first workflow
Use cases
- 01Add an action to document or media menus
- 02Restrict or adapt actions using user permissions
- 03Navigate to a URL based on an entity
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ umbraco/ umbraco-cms-backoffice-skills --skill umbraco-entity-actionsAfter installing, type/umbraco-entity-actionsin Claude Code to confirm it loaded.
Details
From the project READMEUmbraco Entity Actions
What is it?
Entity Actions perform an action on a specific item in Umbraco. They provide a generic extension point for secondary functionality associated with entity types like documents, media, or custom entities. These actions appear in context menus throughout the backoffice and can be controlled by user permissions.
Documentation
Always fetch the latest docs before implementing:
- Main docs: https://docs.umbraco.com/umbraco-cms/extend-your-project/backoffice-extensions/extending-overview/extension-types/entity-actions
- Foundation: https://docs.umbraco.com/umbraco-cms/extend-your-project/backoffice-extensions/foundation
- Extension Registry: https://docs.umbraco.com/umbraco-cms/extend-your-project/backoffice-extensions/extending-overview/extension-registry
Reference Examples
The Umbraco source includes working examples:
Permission Manipulation: /Umbraco-CMS/src/Umbraco.Web.UI.Client/examples/manipulate-document-property-value-permissions/
This example demonstrates entity actions that manipulate document property permissions.
User Permissions: /Umbraco-CMS/src/Umbraco.Web.UI.Client/examples/user-permission/
This example shows entity actions integrated with user permission controls.
Related Foundation Skills
-
Repository Pattern: When implementing actions that need data operations
- Reference skill:
umbraco-repository-pattern
- Reference skill:
-
Context API: When accessing workspace or other contexts from actions
- Reference skill:
umbraco-context-api
- Reference skill:
-
Conditions: When controlling action visibility based on permissions or state
- Reference skill:
umbraco-conditions
- Reference skill:
Workflow
- Fetch docs - Use WebFetch on the URLs above
- Ask questions - What entity type? What action to perform? Permissions needed?
- Generate files - Create manifest + action class based on latest docs
- Explain - Show what was created and how to test
Minimal Examples
Manifest (manifests.ts)
import type { ManifestEntityAction } from '@umbraco-cms/backoffice/extension-registry';
import { MyEntityAction } from './my-entity-action.js';
const manifest: ManifestEntityAction = {
type: 'entityAction',
alias: 'My.EntityAction',
name: 'My Entity Action',
weight: 10,
api: MyEntityAction,
forEntityTypes: ['document'],
meta: {
icon: 'icon-alarm-clock',
label: 'My Action',
},
};
export const manifests = [manifest];
Action Implementation (my-entity-action.ts)
import { UmbEntityActionBase } from '@umbraco-cms/backoffice/entity-action';
import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
export class MyEntityAction extends UmbEntityActionBase<never> {
constructor(host: UmbControllerHost, args: { unique: string; entityType: string }) {
super(host, args);
}
async execute() {
// this.unique contains the entity's unique identifier
console.log('Executing action on:', this.unique);
// Perform your action here
alert(`Action executed on ${this.unique}`);
}
}
Action with Repository
import { UmbEntityActionBase } from '@umbraco-cms/backoffice/entity-action';
export class MyEntityAction extends UmbEntityActionBase<MyRepository> {
constructor(host: UmbControllerHost, args: { unique: string; entityType: string; repositoryAlias: string }) {
super(host, args);
}
async execute() {
// Access repository via this.repository
await this.repository?.myCustomMethod(this.unique);
}
}
Link-based Action (using getHref)
export class MyLinkAction extends UmbEntityActionBase<never> {
async getHref() {
return `/some/path/${this.unique}`;
}
async execute() {
// Not needed when using getHref
}
}
Common Entity Types
document- Content nodesmedia- Media itemsmember- Membersdata-type- Data typesdocument-type- Document typesmedia-type- Media types
That's it! Always fetch fresh docs, keep examples minimal, generate complete working code.