Source profileQuality 93/100

Postpartum-genushyacinthus29/dotnet-skills/skills/dotnet-aspnet-core/SKILL.md

dotnet-aspnet-core

Build, debug, modernize, or review ASP.NET Core applications with correct hosting, middleware, security, configuration, logging, and deployment patterns on current .NET.

Source repository stars
9
Declared platforms
0
Static risk flags
0
Last source update
2026-08-23
Source checked
2026-08-25

Decision brief

What it does: where it fits

Build, debug, modernize, or review ASP. NET Core applications with correct hosting, middleware, security, configuration, logging, and deployment patterns on current .

Best for

    Not for

    • Tasks that require unconfirmed production actions or broad system permissions.
    • Environments where the pinned source and install steps cannot be inspected.

    Compatibility matrix

    Platform support, with evidence labels

    PlatformStatusEvidenceWhat to check
    CodexNot declaredNo explicit evidencePortability before use
    Claude CodeNot declaredNo explicit evidencePortability before use
    CursorNot declaredNo explicit evidencePortability before use
    Gemini CLINot declaredNo explicit evidencePortability before use
    Open the compatibility checker

    Installation

    Inspect first. Install second.

    The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.

    Source-detected install commandSource
    npx skills add https://github.com/Postpartum-genushyacinthus29/dotnet-skills --skill "skills/dotnet-aspnet-core"
    Safe inspection promptEditorial

    Inspect the Agent Skill "dotnet-aspnet-core" from https://github.com/Postpartum-genushyacinthus29/dotnet-skills/blob/f9c1a213bc25d95641adc3a59f8048cb5656741c/skills/dotnet-aspnet-core/SKILL.md at commit f9c1a213bc25d95641adc3a59f8048cb5656741c. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.

    Workflow

    What the source asks the agent to do

    1. 01

      Workflow

      1. Detect the real hosting shape first: - top-level Program.cs structure - middleware order and registration - auth model (Identity, JWT, OAuth, cookies) - endpoint registrations and routing

      Detect the real hosting shape first:top-level Program.cs structuremiddleware order and registration
    2. 02

      Authentication Setup

      Review the “Authentication Setup” section in the pinned source before continuing.

      Review and apply the “Authentication Setup” source section.
    3. 03

      Trigger On

      working on ASP.NET Core apps, services, or middleware

      working on ASP.NET Core apps, services, or middlewarechanging auth, routing, configuration, hosting, or deployment behaviordeciding between ASP.NET Core sub-stacks such as Blazor, Minimal APIs, or controller APIs
    4. 04

      Documentation

      ASP.NET Core Overview

      ASP.NET Core OverviewASP.NET Core MiddlewareASP.NET Core Best Practices
    5. 05

      Middleware Patterns

      Review the “Middleware Patterns” section in the pinned source before continuing.

      Review and apply the “Middleware Patterns” source section.

    Permission review

    Static risk signals and limitations

    No configured static risk pattern was detected

    This is not proof of safety. Runtime behavior, indirect dependencies, and hidden external systems are outside the static scan.

    Evidence record

    Why each signal appears

    EvidenceSourceComputedTestedEditorial
    SignalValueEvidence typeMeaning
    Quality score93/100ComputedDocumentation, specificity, maintenance, and trust rules
    Repository stars9SourceRepository attention, not individual Skill quality
    Compatibility0 platformsSourceDeclared in the catalog source record
    Usage guideautomated source guideEditorialGenerated or reviewed according to the visible evidence level

    Pinned source

    Provenance and original SKILL.md

    Repository
    Postpartum-genushyacinthus29/dotnet-skills
    Skill path
    skills/dotnet-aspnet-core/SKILL.md
    Commit
    f9c1a213bc25d95641adc3a59f8048cb5656741c
    License
    MIT
    Collected
    2026-08-25
    Default branch
    main
    View the original SKILL.md

    ASP.NET Core

    Trigger On

    • working on ASP.NET Core apps, services, or middleware
    • changing auth, routing, configuration, hosting, or deployment behavior
    • deciding between ASP.NET Core sub-stacks such as Blazor, Minimal APIs, or controller APIs
    • debugging request pipeline issues
    • modernizing legacy ASP.NET to ASP.NET Core

    Documentation

    References

    • patterns.md - Detailed middleware patterns, security patterns, configuration patterns, DI patterns, error handling patterns, and logging patterns
    • anti-patterns.md - Common ASP.NET Core mistakes including HttpClient misuse, async anti-patterns, configuration errors, DI issues, middleware ordering problems, and security vulnerabilities

    Workflow

    1. Detect the real hosting shape first:

      • top-level Program.cs structure
      • middleware order and registration
      • auth model (Identity, JWT, OAuth, cookies)
      • endpoint registrations and routing
    2. Follow the correct middleware order:

      ExceptionHandler → HttpsRedirection → Static Files → Routing
      → CORS → Authentication → Authorization → Rate Limiting
      → Response Caching → Custom Middleware → Endpoints
      
    3. Use built-in patterns correctly:

      • Prefer IOptions<T> / IOptionsSnapshot<T> for configuration
      • Use ILogger<T> for structured logging
      • Use IHttpClientFactory for HTTP clients (never new HttpClient())
      • Use IHostedService / BackgroundService for background work
    4. Route specialized work to specific skills:

      • UI and components → dotnet-blazor
      • Real-time → dotnet-signalr
      • RPC → dotnet-grpc
      • New HTTP APIs → dotnet-minimal-apis (prefer unless controllers needed)
      • Controller APIs → dotnet-web-api
    5. Validate with build, tests, and targeted endpoint checks.

    Middleware Patterns

    Correct Order Matters

    var app = builder.Build();
    
    app.UseExceptionHandler("/error");      // 1. Catch all exceptions
    app.UseHsts();                          // 2. Security headers
    app.UseHttpsRedirection();              // 3. HTTPS redirect
    app.UseStaticFiles();                   // 4. Serve static files
    app.UseRouting();                       // 5. Route matching
    app.UseCors();                          // 6. CORS policy
    app.UseAuthentication();                // 7. Who are you?
    app.UseAuthorization();                 // 8. Can you access?
    app.UseRateLimiter();                   // 9. Rate limiting
    app.UseResponseCaching();               // 10. Response cache
    app.MapControllers();                   // 11. Endpoints
    

    Custom Middleware Pattern

    public class RequestTimingMiddleware
    {
        private readonly RequestDelegate _next;
        private readonly ILogger<RequestTimingMiddleware> _logger;
    
        public RequestTimingMiddleware(RequestDelegate next, ILogger<RequestTimingMiddleware> logger)
        {
            _next = next;
            _logger = logger;
        }
    
        public async Task InvokeAsync(HttpContext context)
        {
            var sw = Stopwatch.StartNew();
            await _next(context);
            _logger.LogInformation("Request {Path} completed in {Elapsed}ms",
                context.Request.Path, sw.ElapsedMilliseconds);
        }
    }
    

    Configuration Patterns

    Strongly-Typed Options

    // appsettings.json
    {
      "EmailSettings": {
        "SmtpServer": "smtp.example.com",
        "Port": 587
      }
    }
    
    // Registration
    builder.Services.Configure<EmailSettings>(
        builder.Configuration.GetSection("EmailSettings"));
    
    // Usage
    public class EmailService(IOptions<EmailSettings> options)
    {
        private readonly EmailSettings _settings = options.Value;
    }
    

    Environment-Based Configuration

    builder.Configuration
        .AddJsonFile("appsettings.json", optional: false)
        .AddJsonFile($"appsettings.{builder.Environment.EnvironmentName}.json", optional: true)
        .AddEnvironmentVariables()
        .AddUserSecrets<Program>(optional: true);
    

    Security Patterns

    Authentication Setup

    builder.Services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme)
        .AddJwtBearer(options =>
        {
            options.TokenValidationParameters = new TokenValidationParameters
            {
                ValidateIssuer = true,
                ValidateAudience = true,
                ValidateLifetime = true,
                ValidateIssuerSigningKey = true,
                ValidIssuer = builder.Configuration["Jwt:Issuer"],
                ValidAudience = builder.Configuration["Jwt:Audience"],
                IssuerSigningKey = new SymmetricSecurityKey(
                    Encoding.UTF8.GetBytes(builder.Configuration["Jwt:Key"]!))
            };
        });
    

    Authorization Policies

    builder.Services.AddAuthorization(options =>
    {
        options.AddPolicy("AdminOnly", policy =>
            policy.RequireRole("Admin"));
        options.AddPolicy("MinAge18", policy =>
            policy.RequireClaim("Age", "18", "19", "20")); // simplified
    });
    

    Anti-Patterns to Avoid

    Anti-PatternWhy It's BadBetter Approach
    new HttpClient()Socket exhaustionIHttpClientFactory
    Sync-over-async (Task.Result)Thread pool starvationawait properly
    Storing secrets in appsettings.jsonSecurity riskUser Secrets, Key Vault
    Catching all exceptions silentlyHides bugsUse IExceptionHandler
    async void in middlewareCrashes processasync Task
    Missing HTTPS redirectSecurity riskUseHttpsRedirection()

    Performance Best Practices

    1. Use async/await everywhere — avoid sync blocking calls
    2. Pool DbContext properly — use scoped lifetime
    3. Enable response compressionUseResponseCompression()
    4. Use output cachingUseOutputCache() for .NET 7+
    5. Profile with diagnostic tools — Visual Studio Diagnostic Tools, PerfView
    6. Avoid allocations in hot paths — use Span<T>, pooling

    Deliver

    • production-credible ASP.NET Core code and config
    • a clear request pipeline and hosting story
    • verification that matches the affected endpoints and middleware
    • security headers and HTTPS configured correctly

    Validate

    • middleware order is intentional and documented
    • security and configuration changes are explicit
    • endpoint behavior is covered by tests or smoke checks
    • no blocking calls in async context
    • secrets are not committed to source control
    • health checks are implemented for production readiness

    Frequently asked questions

    What to verify before installation and use

    What does the dotnet-aspnet-core source document cover?

    Build, debug, modernize, or review ASP. NET Core applications with correct hosting, middleware, security, configuration, logging, and deployment patterns on current .

    How do I install dotnet-aspnet-core?

    The source record exposes this install command: npx skills add https://github.com/Postpartum-genushyacinthus29/dotnet-skills --skill "skills/dotnet-aspnet-core". Inspect the command and pinned source before running it.

    Alternatives

    Compare before choosing

    Computed 9880

    vasilyu1983/AI-Agents-public

    research-git

    Scans public GitHub repos for agent skills, dev practices, and code patterns. Use when enriching skills, setting team policy, or researching a build domain.

    Computed 96156

    open-edge-platform/edge-ai-libraries

    chatqna-helm-deploy

    Deploy Chat Question-and-Answer Core to Kubernetes using Helm (OpenVINO CPU, OpenVINO GPU, or Ollama), including values.yaml configuration, helm install/upgrade, deployment verification, uninstall, and translation from Docker Compose setup_env.sh variables into Helm override values. Use this skill when the user says "deploy chatqna core to kubernetes", "helm install chatqna-core", "configure values.yaml", "convert compose config to helm", or "translate setup_env.sh to chart values".

    Computed 9660

    almanak-co/sdk

    almanak-strategy-builder

    Build, test, and deploy DeFi trading strategies using the Almanak SDK. ALWAYS use this skill when the user mentions almanak, DeFi strategy, trading strategy, yield farming, liquidity provision, token swap, borrowing, lending, perpetuals, staking, vault deposit, bridging tokens, backtesting, paper trading, or on-chain execution. Use for writing strategy.py files, composing intents (Swap, LP, Borrow, Supply, Perp, Bridge, Stake, Vault, Prediction), working with config.json strategy parameters, run

    Computed 9618

    nexus-substrate/nexus-agents

    release

    Execute a release following project standards. Use when publishing a new version, creating release tags, or deploying. Triggers on "release", "publish", "version bump", "create release".