Builds ABP MVC/Razor Pages widgets with self-contained scripts, styles, client refresh lifecycle, and authorization.
Ships in abp-ui. 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.
A widget is an ASP.NET Core ViewComponent extended by ABP so it can carry its own script & style dependencies, participate in the bundling and authorization systems, and be refreshed (server- or client-side) from a dashboard. The payoff is the non-obvious part: a page that renders a widget never has to include the widget's JS/CSS or its transitive libraries — the widget declares them and ABP injects them. Types live in Volo.Abp.AspNetCore.Mvc.UI.Widgets.
RefreshUrl) or update itself client-side from a JSON payload.[Widget]Start from a normal ViewComponent (inheriting AbpViewComponent is optional — plain ViewComponent works; AbpViewComponent just adds base properties). Add [Widget] to register it:
using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc.UI.Widgets;
[Widget]
public class MySimpleWidgetViewComponent : AbpViewComponent
{
public IViewComponentResult Invoke() => View();
}
The widget name is the type name minus the ViewComponent suffix (MySimpleWidget). Customize it with the standard [ViewComponent(Name = "MyCustomNamedWidget")] attribute — ABP respects it. InvokeAsync(...) may take arguments like any ViewComponent.
Standard ViewComponent rendering — by name or type, with an anonymous object for arguments:
@await Component.InvokeAsync("MySimpleWidget")
@await Component.InvokeAsync("CountersWidget", new { startDate = ..., endDate = ... })
[Widget] attributeThis is what makes it a widget rather than a ViewComponent. Two ways:
// Simple file paths (physical or virtual — integrated with the Virtual File System)
[Widget(
StyleFiles = new[] { "/Pages/Components/MySimpleWidget/Default.css" },
ScriptFiles = new[] { "/Pages/Components/MySimpleWidget/Default.js" })]
// Bundle contributors — full power of the bundling system (pull in libraries as deps)
[Widget(
StyleTypes = new[] { typeof(MySimpleWidgetStyleBundleContributor) },
ScriptTypes = new[] { typeof(MySimpleWidgetScriptBundleContributor) })]
A contributor is a BundleContributor overriding ConfigureBundle:
public class MySimpleWidgetScriptBundleContributor : BundleContributor
{
public override void ConfigureBundle(BundleConfigurationContext context)
{
context.Files.AddIfNotContains("/Pages/Components/MySimpleWidget/Default.js");
}
}
Resources for all widgets used on a page are emitted as a bundle. Use contributors when the widget depends on a JS library — declare it once and it's added only if not already present. (For the bundling system itself, see the mvc-razor-ui skill.)
[Widget(
DisplayName = "MySimpleWidgetDisplayName", // localization key
DisplayNameResource = typeof(DashboardDemoResource), // localization resource
RequiresAuthentication = true, // bool: logged-in users only
RequiredPolicies = new[] { "MyPolicyName" })] // string[] of policy names
AbpWidgetOptions instead of the attribute (optional)Everything the [Widget] attribute does is also doable in a module's ConfigureServices:
Configure<AbpWidgetOptions>(options =>
{
options.Widgets
.Add<MySimpleWidgetViewComponent>()
.WithStyles("/Pages/Components/MySimpleWidget/Default.css");
});
options.Widgets.Find returns an existing WidgetDefinition so you can adjust a widget defined inside a module you depend on.
RefreshUrl. Set [Widget(RefreshUrl = "Widgets/Counters")] and expose a matching endpoint (e.g. an AbpController action) that returns ViewComponent("CountersWidget", ...). On refresh the widget is re-rendered on the server and the returned HTML replaces the old markup.These are distinct: RefreshUrl triggers a full server re-render (the client init path); the client refresh function does in-place DOM updates. Pick one per widget.
abp.WidgetManager + abp.widgetsA widget's JS API is registered on abp.widgets under the exact server widget name; all functions are optional:
(function () {
abp.widgets.NewUserStatisticWidget = function ($wrapper) {
var getFilters = function () { return { /* widget's own filters */ }; };
var init = function (filters) { /* first load / full re-load */ };
var refresh = function (filters) { /* in-place update */ };
return { getFilters: getFilters, init: init, refresh: refresh };
};
})();
Drive one or more widgets with a WidgetManager (create it in document.ready — it touches the DOM):
$(function () {
var mgr = new abp.WidgetManager('#MyDashboardWidgetsArea');
mgr.init(); // calls each widget's init
mgr.refresh(); // calls each widget's refresh (or re-renders via RefreshUrl)
});
Filter form — link a form to a widgets area so submitting it refreshes all of them with the form fields as filters:
<div id="MyDashboardWidgetsArea" data-widget-filter="#MyDashboardFilterForm"> ...widgets </div>
Equivalent via the constructor options object: { wrapper, filterForm }, or filterCallback for full control (return any object of fields; the default serializes the form via serializeFormToObject()). The returned filters are passed to every widget's init and refresh.
AutoInitialize[Widget(AutoInitialize = true)] (default false) makes ABP create a WidgetManager and init each instance automatically on page-ready and whenever the widget is added to the DOM — so it covers widgets loaded/refreshed via AJAX and nested widgets (a widget inside another). Use it when widgets work independently and don't need to be grouped under one WidgetManager; use an explicit WidgetManager when several widgets must init/refresh together (e.g. a shared dashboard filter).
[Widget] renders through Component.InvokeAsync.StyleFiles/ScriptFiles (or the files added by its StyleTypes/ScriptTypes contributors) into the page bundle — you did not add them on the consuming page and they still appear.RefreshUrl: hitting the declared route returns the widget's re-rendered HTML.new abp.WidgetManager(area) with init() / refresh() invokes the matching abp.widgets.<Name> functions; submitting the data-widget-filter form refreshes the widgets with the form fields.RequiredPolicies / RequiresAuthentication, an unauthorized user does not get the widget.abp.widgets.<X> must equal the server widget name (type name minus ViewComponent, or the [ViewComponent(Name=...)] override) — otherwise WidgetManager never calls your init/refresh.View("~/Pages/Components/MySimpleWidget/Default.cshtml")).StyleFiles/ScriptFiles or StyleTypes/ScriptTypes) — the whole point is that consumers don't manage dependencies.RefreshUrl re-renders on the server and replaces the HTML; the client refresh function updates the DOM from data. They're separate mechanisms.init won't catch widgets added to the DOM later — use AutoInitialize = true (it also handles nesting), or re-run the manager after insertion.RefreshUrl without an endpoint. Declaring RefreshUrl requires a matching route that returns the widget (ViewComponent(...)); without it, refresh has nothing to fetch.https://github.com/abpframework/abp/blob/rel-10.5/docs/en/framework/ui/mvc-razor-pages/widgets.md.What SKILL.md sets; muted values are Claude Code's defaults
/abp-ui:build-mvc-widgetsfrom abp-ui
npx claudepluginhub abpframework/abp-skills --plugin abp-ui9 skills in this plugin
/angular-uiBuild and debug ABP Angular UI — generated proxy services, routing/menu contribution, replaceable components, config/permission checks, and localization. USE FOR: calling app services through generated proxy services, adding routes/menu items with RoutesService, swapping components with ReplaceableComponentsService, reading config with ConfigStateService, checking permissions with PermissionService / *abpPermission, localizing with LocalizationService / the abpLocalization pipe. DO NOT USE FOR: generating or regenerating Angular service/model proxies with the NX-vs-plain generator (use abp-cli-commands), Blazor UI (use blazor-ui), MVC / Razor Pages UI (use mvc-razor-ui), defining localization resources and translating json (use menus-and-localization), backend permission definitions (use permissions-and-authorization).
/blazor-uiBuild and debug ABP Blazor UI — pages/components, base classes, render/hosting models, theming, and the Blazorise vs MudBlazor choice. USE FOR: creating Blazor pages/components, choosing a base class (AbpComponentBase / AbpCrudPageBase), calling application services from Blazor, picking a hosting/render model (Server / WebAssembly / WebApp / Auto), working with the LeptonX/Basic theme, deciding between Blazorise and MudBlazor components. DO NOT USE FOR: Angular UI (use angular-ui), MVC / Razor Pages UI (use mvc-razor-ui), menu contribution and localization resources/json (use menus-and-localization), permission definitions on the backend (use permissions-and-authorization).
/build-angular-lists-and-formsBuild ABP Angular list and form pages the framework way — server-side paged/sorted/filtered lists via ListService, and reactive forms with ABP's automatic validation. USE FOR: ListService with component-scoped providers, hookToQuery returning PagedResultDto, get() refresh, page/maxResultCount/filter/sortKey/sortOrder setters, requestStatus$ (isLoading$ is deprecated), totalCount, LIST_QUERY_DEBOUNCE_TIME, reactive forms validated automatically by @ngx-validate/core, DEFAULT_VALIDATION_BLUEPRINTS + withValidationBluePrint localization keys, abp-validation-error, the skipValidation opt-out, and config-driven abp-dynamic-form (DynamicFormComponent + FormFieldConfig). DO NOT USE FOR: proxy consumption, menus, permission directives (angular-ui); proxy generation/regeneration (abp-cli-commands); adding entity/table/toolbar/form-prop extensions to a shipped module (extend-angular-module-ui); component testing (test-angular-ui); server-side application-service or DTO design (build-crud-application-services).
/extend-angular-module-uiExtend a shipped ABP Angular module's UI (Identity, etc.) through the extension system — add row/toolbar actions, columns, and create/edit form fields without forking. USE FOR: the five contributor buckets (entity/toolbar-action, entity-prop, create/edit-form-prop contributors) keyed by the module's component enum; the EntityAction/ToolbarAction/EntityProp/FormProp factories; ePropType; the LinkedList mutators addTail/addByIndex/addAfter/dropByIndex (there is no patch/remove/insertByIndex — patch is drop-plus-reconstruct); registering via createRoutes in a lazy loadChildren (or the deprecated Module.forLazy); EXTENSIONS_IDENTIFIER; the @abp/ng.components/extensible package. DO NOT USE FOR: building your own non-module list/form (build-angular-lists-and-forms); proxy consumption, menus, permission directives, replaceable components (angular-ui); adding server-side extra properties to the entity/DTO (extend-objects-with-extra-properties); component testing (test-angular-ui).
/extend-application-shellExtend the ABP application shell/layout across MVC and Blazor with layout hooks, global/page toolbars, the page header, and branding — without copying the theme layout. USE FOR: injecting content into the layout via AbpLayoutHookOptions + LayoutHooks (MVC ViewComponent hooks; Blazor Razor Component hooks + the App.razor LayoutHook component for the head); adding global toolbar items with StandardToolbars.Main + IToolbarContributor; setting page title/breadcrumb/toolbar via IPageLayout (MVC) or the PageHeader component (Blazor); customizing app name/logo with IBrandingProvider / DefaultBrandingProvider. DO NOT USE FOR: replacing or overriding a built-in module's own pages/components (use customize-application-modules); adding navigation menu items (use menus-and-localization); general MVC or Blazor page building (use mvc-razor-ui / blazor-ui); Angular shell customization (use angular-ui).
/menus-and-localizationContribute navigation menu items, and add/translate the localization json text a module's menus and UI display. USE FOR: adding or editing menu items (IMenuContributor, context.Menu.AddItem, StandardMenus.Main), adding keys to Localization/**/en.json and translating them into the other culture json files, using IStringLocalizer / L["Key"] to display those keys in C# and Razor. DO NOT USE FOR: defining and registering a framework localization resource — AbpLocalizationOptions.Resources.Add(...), AddVirtualJson, resource inheritance, culture fallback, business-exception / data-annotation localization (use localize-applications); Blazor components/render models (use blazor-ui); Angular routes and the abpLocalization pipe (use angular-ui); MVC tag helpers and bundling (use mvc-razor-ui); backend permission definitions (use permissions-and-authorization).
Other plugins' skills for the same job