用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/umbraco/Umbraco-CMS-Backoffice-Skills --skill umbraco-health-check命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
| name | umbraco-health-check |
| description | Implement health checks in Umbraco backoffice using official docs |
| version | 1.0.0 |
| location | managed |
| allowed-tools | Read, Write, Edit, WebFetch |
Health Checks in Umbraco allow you to create custom system diagnostics that appear in the Health Check dashboard. They verify that your Umbraco installation and related services are functioning correctly. Health checks can report status, display warnings, and provide actionable recommendations for resolving issues.
Always fetch the latest docs before implementing:
Context API: When accessing application state
umbraco-context-apiControllers: When creating API endpoints for checks
umbraco-controllersimport type { ManifestHealthCheck } from '@umbraco-cms/backoffice/health-check';
export const manifests: Array<ManifestHealthCheck> = [
{
type: 'healthCheck',
alias: 'My.HealthCheck.Custom',
name: 'Custom Health Check',
api: () => import('./my-health-check.context.js'),
meta: {
label: 'Custom Check',
},
},
];
import { UmbHealthCheckContext } from '@umbraco-cms/backoffice/health-check';
import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
import type { HealthCheckResultResponseModel } from '@umbraco-cms/backoffice/external/backend-api';
export class MyHealthCheckContext extends UmbHealthCheckContext {
constructor(host: UmbControllerHost) {
super(host);
}
override async check(): Promise<HealthCheckResultResponseModel> {
// Perform your health check logic
const isHealthy = await this.#performCheck();
return {
message: isHealthy ? 'All systems operational' : 'Issue detected',
resultType: isHealthy ? 'Success' : 'Warning',
actions: isHealthy ? [] : [
{
alias: 'fix-issue',
name: 'Fix Issue',
description: ,
},
],
};
}
#(): <> {
;
}
(: ): <> {
(actionAlias === ) {
{
: ,
: ,
: [],
};
}
{
: ,
: ,
: [],
};
}
}
{ api };
interface ManifestHealthCheck extends ManifestBase {
type: 'healthCheck';
api: ApiLoaderProperty; // Should implement UmbHealthCheckContext
meta: MetaHealthCheck;
}
interface MetaHealthCheck {
label: string;
}
// Result types: 'Success' | 'Warning' | 'Error' | 'Info'
interface HealthCheckResultResponseModel {
message: string;
resultType: string;
actions?: Array<{
alias: string;
name: string;
description?: string;
}>;
}
Health checks can also be implemented as C# classes that are auto-discovered by Umbraco.
using Umbraco.Cms.Core.HealthChecks;
namespace MyPackage.HealthChecks;
[HealthCheck(
"12345678-1234-1234-1234-123456789012",
"My Custom Check",
Description = "Verifies custom services are running",
Group = "Custom")]
public class MyHealthCheck : HealthCheck
{
public MyHealthCheck(HealthCheckContext context) : base(context) { }
public override Task<IEnumerable<HealthCheckStatus>> GetStatus()
{
var isHealthy = CheckMyService();
var status = new HealthCheckStatus(isHealthy ? "Service running" : "Service down")
{
ResultType = isHealthy ? StatusResultType.Success : StatusResultType.Error,
Actions = isHealthy ? null : new List<HealthCheckAction>
{
new("restart", Id) { Name = "Restart Service" }
}
};
return Task.FromResult<IEnumerable<HealthCheckStatus>>(new[] { status });
}
public override HealthCheckStatus ExecuteAction(HealthCheckAction action)
{
if (action.Alias == "restart")
{
RestartMyService();
return new HealthCheckStatus("Restarted") { ResultType = StatusResultType.Success };
}
InvalidOperationException();
}
=> ;
{ }
}
That's it! Always fetch fresh docs, keep examples minimal, generate complete working code.
Run tests from skill examples and generate a report (project)
Validate links and references in SKILL.md files using deterministic scripts
Umbraco backoffice extension customisation - complete working examples showing how extension types combine