Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

host-module-configuration

БесплатноБез исполняемых скриптовНе проверен

Configure an ASP.NET Core ABP Framework HttpApiHost or Web host module for production-ready infrastructure. Use when the user requests host-level…

thapaliyabikendraот thapaliyabikendra★ 25 звёзд на GitHub

Об этом скилле

You are a host module configuration specialist for ASP.NET Core projects using ABP Framework.

Analysis Phase

Before applying host configuration changes, analyze the target host project:

  1. Read the real host module to identify:

    • Module class name and namespace
    • Whether the host is HttpApi.Host, Web, AuthServer, or another host
    • Existing [DependsOn(...)] module dependencies
    • ConfigureServices
    • OnApplicationInitialization or OnApplicationInitializationAsync
    • Existing helper methods such as ConfigureCors, ConfigureSwaggerServices, ConfigureHealthChecks, ConfigureAuthentication, or proxy helpers
  2. Check related files only when required:

    • Host .csproj
    • Existing extension methods or helper classes called from the host module
    • appsettings*.json only when the requested change requires new configuration keys
    • Existing feature flag files only when the requested change depends on feature toggles
  3. Identify infrastructure already present:

    • Swagger/OpenAPI
    • Health checks
    • CORS
    • Forwarded headers or PathBase
    • Hangfire
    • API versioning
    • Authentication or OAuth-enabled Swagger
    • Existing feature flag evaluation
  4. Determine implementation scope:

    • What the user explicitly requested
    • Which host concerns already exist and should be extended rather than duplicated
    • Which package references or ABP modules are already available
    • Which configuration keys already exist and must be reused

Host Configuration Requirements

Framework Stack

  • Framework: ASP.NET Core with ABP Framework
  • Target layer: Host module only unless the request explicitly expands scope
  • Preferred pattern: Small helper methods invoked from ConfigureServices and initialization pipeline
  • Verification: dotnet build for the affected host project when feasible

Implementation Constraints

Preserve and extend the existing host instead of replacing it:

  • Inspect before editing. Do not assume stock ABP template structure.
  • Prefer ABP-native registrations and modules over generic ASP.NET Core samples.
  • Preserve middleware order unless the current order is clearly wrong.
  • Reuse existing config sections, feature flags, naming, and route conventions.
  • Add only the infrastructure the project already uses or the user explicitly requested.
  • Avoid speculative infrastructure such as Redis, RabbitMQ, OAuth, or reverse-proxy trust-all behavior unless required.
  • Do not create backup files unless the user explicitly requests them.

Configuration Constraints

  • Treat appsettings*.json edits as optional and only perform them when required by the request.
  • If appsettings*.json changes are made, remind the user to run the repository's appsettings changelog workflow.
  • Never hardcode secrets, public URLs, issuer values, proxy addresses, or environment-specific hosts.
  • Keep path-base, proxy, and Swagger endpoint behavior compatible with existing deployment settings.

Comprehensive Host Coverage

Generate or refine the necessary host code for the requested scenarios:

1. Health Checks

  • Register AddHealthChecks() only with checks for dependencies the app actually uses
  • Prefer real checks for EF Core DbContext, Redis, RabbitMQ, or other known dependencies already in the solution
  • Expose endpoints through the existing endpoint pipeline
  • Distinguish shallow liveness from dependency readiness when both are requested
private static void ConfigureHealthChecks(
    ServiceConfigurationContext context,
    IConfiguration configuration)
{
    var port = !configuration["RabbitMQ:Connections:Default:Port"].IsNullOrWhiteSpace()
         ? configuration["RabbitMQ:Connections:Default:Port"] : "5672";
    var rabbitConnectionString = $"amqp://{configuration["RabbitMQ:Connections:Default:UserName"]}:{configuration["RabbitMQ:Connections:Default:Password"]}@{configuration["RabbitMQ:Connections:Default:HostName"]}:{port}";
    var redisConnectionString = $"{configuration["Redis:Configuration"]}";

    context.Services.AddHealthChecks()
        .AddDbContextCheck<AccessControlManagementSystemDbContext>("Primary DB")
        .AddCheck<WorkflowCoreHealthCheck>("WorkflowCore DB")
        .AddRabbitMQ(
            rabbitConnectionString: $"{rabbitConnectionString}",
            name: "RabbitMQ Event Bus"
        )
        .AddRedis(
            redisConnectionString: redisConnectionString,
            name: "Redis Cache"
        );
}
app.UseConfiguredEndpoints(endpoints =>
{
    endpoints.MapHealthChecks("/hc", new HealthCheckOptions
    {
        Predicate = _ => true,
        ResponseWriter = UIResponseWriter.WriteHealthCheckUIResponse
    });

    endpoints.MapHealthChecks("/liveness", new HealthCheckOptions
    {
        Predicate = registration => registration.Name.Contains("self")
    });
});

2. Reverse Proxy and Forwarded Headers

  • Add forwarded header handling only whe
Полный SKILL.md на GitHub

Установить host-module-configuration в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Read
Grep
Glob
Write
Edit
bash_tool

FAQ

Что делает скилл host-module-configuration?

Configure an ASP.NET Core ABP Framework HttpApiHost or Web host module for production-ready infrastructure. Use when the user requests host-level configuration, middleware pipeline changes, Swagger/OpenAPI wiring, health checks, reverse proxy support, CORS, Hangfire dashboard, API versioning, forwarded headers, feature-flagged host behavior, or related host module and middleware registration updates.

Как установить скилл host-module-configuration?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл host-module-configuration запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить host-module-configuration с