
background-services
Hosted services, background jobs, outbox patterns, and graceful shutdown handling for ASP.NET Core applications. Includes patterns for reliable job processing, distributed systems, and lifecycle management. Use when implementing background processing in ASP.NET Core applications, handling outbox patterns for reliable message delivery, or managing graceful service shutdown.
- Installs
- 85
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/wshaddix/dotnet-skills --skill background-services- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads background-services automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Background Services in ASP.NET Core
Rationale
Background services are essential for offloading work from the request pipeline, processing queues, and handling scheduled tasks. Poorly implemented background services can lead to data loss, orphaned jobs, and resource leaks. These patterns ensure reliable, observable, and gracefully degrading background processing in production applications.
BackgroundService vs IHostedService
| Feature | BackgroundService | IHostedService |
|---|---|---|
| Purpose | Long-running loop or continuous work | Startup/shutdown hooks |
| Methods | Override ExecuteAsync | Implement StartAsync + StopAsync |
| Lifetime | Runs until cancellation or host shutdown | StartAsync runs at startup, StopAsync at shutdown |
| Use when | Polling queues, processing streams, periodic jobs | Database migrations, cache warming, resource cleanup |
Pattern 1: Basic BackgroundService Structure
Use BackgroundService base class for consistent lifecycle management and cancellation support.
public sealed class OrderProcessorWorker(
IServiceScopeFactory scopeFactory,
ILogger<OrderProcessorWorker> logger) : BackgroundService
{
protected override async Task ExecuteAsync(CancellationToken stoppingToken)
{
logger.LogInformation("Order processor started");
while (!stoppingToken.IsCancellationRequested)
{
try
{
using var scope = scopeFactory.CreateScope();
var processor = scope.ServiceProvider
.GetRequiredService<IOrderProcessor>();
var processed = await processor.ProcessPendingAsync(stoppingToken);
if (processed == 0)
{
await Task.Delay(TimeSpan.FromSeconds(5), stoppingToken);
}
}
catch (OperationCanceledException) when (stoppingToken.IsCancellationRequested)
{
break;
}
catch (Exception ex)
{
logger.LogError(ex, "Error processing orders");
await Task.Delay(TimeSpan.FromSeconds(30), stoppingToken);
}
}
logger.LogInformation("Order processor stopped");
}
}
// Registration
builder.Services.AddHostedService<OrderProcessorWorker>();
Critical Rules for BackgroundService
- Always create scopes --
BackgroundServiceis registered as a singleton. InjectIServiceScopeFactory, not scoped services directly. - Always handle exceptions -- by default, unhandled exceptions in
ExecuteAsyncstop the host. Wrap the loop body in try/catch. - Always respect the stopping token -- check
stoppingToken.IsCancellationRequestedand pass the token to all async calls. - Back off on empty/error -- avoid tight polling loops that waste CPU. Use
Task.Delaywith the stopping token.
Pattern 2: IHostedService for Startup/Shutdown Hooks
Startup Hook (Cache Warming, Migrations)
public sealed class CacheWarmupService(
IServiceScopeFactory scopeFactory,
ILogger<CacheWarmupService> logger) : IHostedService
{
public async Task StartAsync(CancellationToken cancellationToken)
{
logger.LogInformation("Warming caches");
using var scope = scopeFactory.CreateScope();
var cache = scope.ServiceProvider.GetRequiredService<IProductCache>();
await cache.WarmAsync(cancellationToken);
logger.LogInformation("Cache warmup complete");
}
public Task StopAsync(CancellationToken cancellationToken) => Task.CompletedTask;
}
Startup + Shutdown (Resource Lifecycle)
public sealed class MessageBusService(
ILogger<MessageBusService> logger) : IHostedService
{
private IConnection? _connection;
public async Task StartAsync(CancellationToken cancellationToken)
{
logger.LogInformation("Connecting to message bus");
_connection = await CreateConnectionAsync(cancellationToken);
}
public async Task StopAsync(CancellationToken cancellationToken)
{
logger.LogInformation("Disconnecting from message bus");
if (_connection is not null)
{
await _connection.CloseAsync(cancellationToken);
_connection = null;
}
}
private static Task<IConnection> CreateConnectionAsync(CancellationToken ct) =>
throw new NotImplementedException();
}
Pattern 3: Hosted Service Lifecycle
Startup Sequence
IHostedService.StartAsyncis called for each registered service in registration orderBackgroundService.ExecuteAsyncis called afterStartAsynccompletes (it runs concurrently -- the host does not wait for it to finish)- The host is ready to serve requests after all
StartAsynccalls complete
Important: ExecuteAsync must not block before yielding to the caller. The first await in ExecuteAsync is where control returns to the host.
public sealed class MyWorker : BackgroundService
{
public override async Task StartAsync(CancellationToken cancellationToken)
{
await InitializeAsync(cancellationToken);
await base.StartAsync(cancellationToken);
}
protected override async Task ExecuteAsync(CancellationToken stoppingToken)
{
while (!stoppingToken.IsCancellationRequested)
{
await DoWorkAsync(stoppingToken);
}
}
}
Shutdown Sequence
IHostApplicationLifetime.ApplicationStoppingis triggered- The host calls
StopAsyncon each hosted service in reverse registration order - For
BackgroundService, the stopping token is cancelled, thenStopAsyncwaits forExecuteAsyncto complete IHostApplicationLifetime.ApplicationStoppedis triggered
Pattern 4: Outbox Pattern for Reliable Messaging
Ensure messages are never lost by storing them in the database transactionally before async processing.
public class OutboxMessage
{
public Guid Id { get; set; }
public required string Type { get; set; }
public required string Payload { get; set; }
public DateTimeOffset CreatedAt { get; set; }
public DateTimeOffset? ProcessedAt { get; set; }
public string? Error { get; set; }
public int RetryCount { get; set; }
}
public interface IOutboxRepository
{
Task AddAsync(OutboxMessage message, CancellationToken ct = default);
Task<IReadOnlyList<OutboxMessage>> GetPendingAsync(int batchSize, CancellationToken ct = default);
Task MarkProcessedAsync(Guid messageId, CancellationToken ct = default);
Task MarkFailedAsync(Guid messageId, string error, CancellationToken ct = default);
}
public class OrderService
{
private readonly ApplicationDbContext _db;
private readonly IOutboxRepository _outbox;
public async Task<Order> CreateOrderAsync(CreateOrderRequest request)
{
await using var transaction = await _db.Database.BeginTransactionAsync();
try
{
var order = new Order { };
_db.Orders.Add(order);
var message = new OutboxMessage
{
Id = Guid.NewGuid(),
Type = nameof(OrderCreatedEvent),
Payload = JsonSerializer.Serialize(new OrderCreatedEvent
{
OrderId = order.Id,
CustomerEmail = request.CustomerEmail
}),
CreatedAt = DateTimeOffset.UtcNow
};
await _outbox.AddAsync(message);
await _db.SaveChangesAsync();
await transaction.CommitAsync();
return order;
}
catch
{
await transaction.RollbackAsync();
throw;
}
}
}
public class OutboxProcessor : BackgroundService
{
private readonly IServiceProvider _serviceProvider;
private readonly ILogger<OutboxProcessor> _logger;
protected override async Task ExecuteAsync(CancellationToken stoppingToken)
{
while (!stoppingToken.IsCancellationRequested)
{
try
{
await using var scope = _serviceProvider.CreateAsyncScope();
var outbox = scope.ServiceProvider.GetRequiredService<IOutboxRepository>();
var publisher = scope.ServiceProvider.GetRequiredService<IEventPublisher>();
var messages = await outbox.GetPendingAsync(batchSize: 10, stoppingToken);
foreach (var message in messages)
{
try
{
await publisher.PublishAsync(message.Type, message.Payload, stoppingToken);
await outbox.MarkProcessedAsync(message.Id, stoppingToken);
}
catch (Exception ex)
{
_logger.LogError(ex, "Failed to process outbox message {MessageId}", message.Id);
await outbox.MarkFailedAsync(message.Id, ex.Message, stoppingToken);
}
}
await Task.Delay(TimeSpan.FromSeconds(10), stoppingToken);
}
catch (OperationCanceledException)
{
break;
}
catch (Exception ex)
{
_logger.LogError(ex, "Error in outbox processor");
await Task.Delay(TimeSpan.FromSeconds(30), stoppingToken);
}
}
}
}
Pattern 5: Graceful Shutdown Handling
Implement IHostedLifecycleService for fine-grained control over startup and shutdown sequences.
public class GracefulWorker : BackgroundService
{
private readonly IHostApplicationLifetime _lifetime;
private readonly ILogger<GracefulWorker> _logger;
private readonly Channel<WorkItem> _workChannel;
public GracefulWorker(
IHostApplicationLifetime lifetime,
ILogger<GracefulWorker> logger)
{
_lifetime = lifetime;
_logger = logger;
_workChannel = Channel.CreateUnbounded<WorkItem>();
}
protected override async Task ExecuteAsync(CancellationToken stoppingToken)
{
_lifetime.ApplicationStopping.Register(() =>
{
_logger.LogInformation("Shutdown requested, draining work channel...");
});
await foreach (var workItem in _workChannel.Reader.ReadAllAsync(stoppingToken))
{
try
{
await ProcessWorkItemAsync(workItem, stoppingToken);
}
catch (OperationCanceledException)
{
_logger.LogWarning("Work item {WorkId} cancelled due to shutdown", workItem.Id);
throw;
}
}
}
private async Task ProcessWorkItemAsync(WorkItem item, CancellationToken ct)
{
using var activity = new Activity("ProcessWorkItem").Start();
_logger.LogInformation("Processing work item {WorkId}", item.Id);
await Task.Delay(item.Duration, ct);
_logger.LogInformation("Completed work item {WorkId}", item.Id);
}
}
public class LifecycleAwareService : IHostedLifecycleService
{
private readonly ILogger<LifecycleAwareService> _logger;
public LifecycleAwareService(ILogger<LifecycleAwareService> logger) => _logger = logger;
public Task StartingAsync(CancellationToken cancellationToken)
{
_logger.LogInformation("Service starting...");
return Task.CompletedTask;
}
public Task StartAsync(CancellationToken cancellationToken)
{
_logger.LogInformation("Service start called");
return Task.CompletedTask;
}
public Task StartedAsync(CancellationToken cancellationToken)
{
_logger.LogInformation("Service started successfully");
return Task.CompletedTask;
}
public Task StoppingAsync(CancellationToken cancellationToken)
{
_logger.LogInformation("Service stopping - cleanup starting...");
return Task.CompletedTask;
}
public Task StopAsync(CancellationToken cancellationToken)
{
_logger.LogInformation("Service stop called");
return Task.CompletedTask;
}
public Task StoppedAsync(CancellationToken cancellationToken)
{
_logger.LogInformation("Service stopped - cleanup complete");
return Task.CompletedTask;
}
}
Host Shutdown Timeout
builder.Services.Configure<HostOptions>(options =>
{
options.ShutdownTimeout = TimeSpan.FromSeconds(60);
});
Pattern 6: Channels Integration
Channel-backed background task queue consumed by a BackgroundService:
public sealed class BackgroundTaskQueue
{
private readonly Channel<Func<IServiceProvider, CancellationToken, Task>> _queue
= Channel.CreateBounded<Func<IServiceProvider, CancellationToken, Task>>(
new BoundedChannelOptions(100) { FullMode = BoundedChannelFullMode.Wait });
public ChannelWriter<Func<IServiceProvider, CancellationToken, Task>> Writer => _queue.Writer;
public ChannelReader<Func<IServiceProvider, CancellationToken, Task>> Reader => _queue.Reader;
}
public sealed class QueueProcessorWorker(
BackgroundTaskQueue queue,
IServiceScopeFactory scopeFactory,
ILogger<QueueProcessorWorker> logger) : BackgroundService
{
protected override async Task ExecuteAsync(CancellationToken stoppingToken)
{
while (await queue.Reader.WaitToReadAsync(stoppingToken))
{
while (queue.Reader.TryRead(out var workItem))
{
try
{
using var scope = scopeFactory.CreateScope();
await workItem(scope.ServiceProvider, stoppingToken);
}
catch (Exception ex)
{
logger.LogError(ex, "Error executing queued work item");
}
}
}
}
}
// Registration
builder.Services.AddSingleton<BackgroundTaskQueue>();
builder.Services.AddHostedService<QueueProcessorWorker>();
Pattern 7: Scheduled Jobs with Cron Expressions
Use NCrontab for reliable cron-based scheduling without external dependencies.
public class ScheduledJobService : BackgroundService
{
private readonly IServiceProvider _serviceProvider;
private readonly ILogger<ScheduledJobService> _logger;
private readonly CrontabSchedule _schedule;
private DateTime _nextRun;
public ScheduledJobService(IServiceProvider serviceProvider, ILogger<ScheduledJobService> logger)
{
_serviceProvider = serviceProvider;
_logger = logger;
_schedule = CrontabSchedule.Parse("0 2 * * *");
_nextRun = _schedule.GetNextOccurrence(DateTime.Now);
}
protected override async Task ExecuteAsync(CancellationToken stoppingToken)
{
while (!stoppingToken.IsCancellationRequested)
{
var now = DateTime.Now;
if (now >= _nextRun)
{
try
{
await ExecuteJobAsync(stoppingToken);
}
catch (Exception ex)
{
_logger.LogError(ex, "Scheduled job failed");
}
_nextRun = _schedule.GetNextOccurrence(now);
}
var delay = _nextRun - DateTime.Now;
if (delay > TimeSpan.Zero)
{
await Task.Delay(delay, stoppingToken);
}
}
}
private async Task ExecuteJobAsync(CancellationToken ct)
{
await using var scope = _serviceProvider.CreateAsyncScope();
var service = scope.ServiceProvider.GetRequiredService<IDailyReportService>();
await service.GenerateDailyReportAsync(ct);
}
}
Pattern 8: Periodic Work with PeriodicTimer
Use PeriodicTimer instead of Task.Delay for more accurate periodic execution:
public sealed class HealthCheckReporter(
IServiceScopeFactory scopeFactory,
ILogger<HealthCheckReporter> logger) : BackgroundService
{
protected override async Task ExecuteAsync(CancellationToken stoppingToken)
{
using var timer = new PeriodicTimer(TimeSpan.FromMinutes(1));
while (await timer.WaitForNextTickAsync(stoppingToken))
{
try
{
using var scope = scopeFactory.CreateScope();
var reporter = scope.ServiceProvider.GetRequiredService<IHealthReporter>();
await reporter.ReportAsync(stoppingToken);
}
catch (Exception ex)
{
logger.LogError(ex, "Health check report failed");
}
}
}
}
Pattern 9: Queue-Based Processing with Rate Limiting
public class RateLimitedProcessor : BackgroundService
{
private readonly IServiceProvider _serviceProvider;
private readonly ILogger<RateLimitedProcessor> _logger;
private readonly Channel<EmailRequest> _channel;
private readonly SemaphoreSlim _semaphore;
public RateLimitedProcessor(
IServiceProvider serviceProvider,
ILogger<RateLimitedProcessor> logger)
{
_serviceProvider = serviceProvider;
_logger = logger;
_channel = Channel.CreateUnbounded<EmailRequest>();
_semaphore = new SemaphoreSlim(5, 5);
}
public ChannelWriter<EmailRequest> Writer => _channel.Writer;
protected override async Task ExecuteAsync(CancellationToken stoppingToken)
{
var processingTasks = new List<Task>();
await foreach (var request in _channel.Reader.ReadAllAsync(stoppingToken))
{
await _semaphore.WaitAsync(stoppingToken);
var task = ProcessWithReleaseAsync(request, stoppingToken);
processingTasks.Add(task);
if (processingTasks.Count > 100)
{
processingTasks.RemoveAll(t => t.IsCompleted);
}
}
await Task.WhenAll(processingTasks);
}
private async Task ProcessWithReleaseAsync(EmailRequest request, CancellationToken ct)
{
try
{
await ProcessEmailAsync(request, ct);
}
finally
{
_semaphore.Release();
}
}
private async Task ProcessEmailAsync(EmailRequest request, CancellationToken ct)
{
await using var scope = _serviceProvider.CreateAsyncScope();
var emailService = scope.ServiceProvider.GetRequiredService<IEmailService>();
try
{
await emailService.SendAsync(request, ct);
_logger.LogInformation("Email sent to {Recipient}", request.To);
}
catch (Exception ex)
{
_logger.LogError(ex, "Failed to send email to {Recipient}", request.To);
}
await Task.Delay(TimeSpan.FromMilliseconds(100), ct);
}
}
Anti-Patterns
// BAD: No cancellation token handling
public class BadProcessor : BackgroundService
{
protected override async Task ExecuteAsync(CancellationToken stoppingToken)
{
while (true) // Never stops!
{
await DoWorkAsync();
}
}
}
// GOOD: Proper cancellation handling
public class GoodProcessor : BackgroundService
{
protected override async Task ExecuteAsync(CancellationToken stoppingToken)
{
while (!stoppingToken.IsCancellationRequested)
{
await DoWorkAsync(stoppingToken);
await Task.Delay(TimeSpan.FromSeconds(5), stoppingToken);
}
}
}
// BAD: Swallowing all exceptions
protected override async Task ExecuteAsync(CancellationToken stoppingToken)
{
while (!stoppingToken.IsCancellationRequested)
{
try
{
await DoWorkAsync();
}
catch (Exception)
{
// Silently swallowed - service appears healthy but isn't working!
}
}
}
// GOOD: Log and continue with backoff
protected override async Task ExecuteAsync(CancellationToken stoppingToken)
{
while (!stoppingToken.IsCancellationRequested)
{
try
{
await DoWorkAsync(stoppingToken);
}
catch (OperationCanceledException)
{
break;
}
catch (Exception ex)
{
_logger.LogError(ex, "Work failed");
await Task.Delay(TimeSpan.FromSeconds(10), stoppingToken);
}
}
}
// BAD: Using scoped services without creating scope
public class BadService : BackgroundService
{
private readonly ApplicationDbContext _db; // Scoped service in singleton!
public BadService(ApplicationDbContext db) => _db = db;
protected override async Task ExecuteAsync(CancellationToken ct)
{
var data = await _db.Orders.ToListAsync(ct); // Will fail after first request!
}
}
// GOOD: Create scope for each unit of work
public class GoodService : BackgroundService
{
private readonly IServiceProvider _serviceProvider;
public GoodService(IServiceProvider sp) => _serviceProvider = sp;
protected override async Task ExecuteAsync(CancellationToken ct)
{
await using var scope = _serviceProvider.CreateAsyncScope();
var db = scope.ServiceProvider.GetRequiredService<ApplicationDbContext>();
var data = await db.Orders.ToListAsync(ct);
}
}
// BAD: Blocking async code
protected override Task ExecuteAsync(CancellationToken stoppingToken)
{
while (!stoppingToken.IsCancellationRequested)
{
DoWork().Wait(); // Blocks thread!
}
return Task.CompletedTask;
}
// GOOD: Use async/await throughout
protected override async Task ExecuteAsync(CancellationToken stoppingToken)
{
while (!stoppingToken.IsCancellationRequested)
{
await DoWorkAsync(stoppingToken);
}
}
Agent Gotchas
- Do not inject scoped services into BackgroundService constructors -- they are singletons. Always use
IServiceScopeFactory. - Do not use
Task.Runfor background work -- useBackgroundServicefor proper lifecycle management and graceful shutdown. - Do not swallow
OperationCanceledException-- let it propagate or re-check the stopping token. - Do not use
Thread.Sleep-- useawait Task.Delay(duration, stoppingToken)orPeriodicTimer. - Do not forget to register --
AddHostedService<T>()is required; merely implementing the interface does nothing.
References
FAQ
What does the background-services skill do?
Hosted services, background jobs, outbox patterns, and graceful shutdown handling for ASP.NET Core applications. Includes patterns for reliable job processing, distributed systems, and lifecycle management. Use when implementing background processing in ASP.NET Core applications, handling outbox patterns for reliable message delivery, or managing graceful service shutdown.
How do I install background-services?
Run npx skills add https://github.com/wshaddix/dotnet-skills --skill background-services in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/background-services/ (personal) or .claude/skills/background-services/ (project).
Which AI agents can use background-services?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is background-services safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains background-services?
It is published by wshaddix in wshaddix/dotnet-skills. It has 85 recorded installs.
More from wshaddix/dotnet-skills
dotnet-xunit
wshaddix/dotnet-skills
Writing xUnit tests. v3 Fact/Theory, fixtures, parallelism, IAsyncLifetime, v2 compatibility.
dotnet-testing-strategy
wshaddix/dotnet-skills
Deciding how to test .NET code. Unit vs integration vs E2E decision tree, test doubles.
modern-csharp-coding-standards
wshaddix/dotnet-skills
Write modern, high-performance C code using records, pattern matching, value objects, async/await, Span /Memory , and best-practice API design patterns. Emphasizes functional-style programming with C 12+ features. Use when writing new C code or refactoring existing code, designing public APIs for libraries or services, optimizing performance-critical code paths, or building async/await-heavy applications.
csharp-wolverinefx
wshaddix/dotnet-skills
Build .NET applications with WolverineFX for messaging, HTTP services, and event sourcing. Use when implementing command handlers, message handlers, HTTP endpoints with WolverineFx.HTTP, transactional outbox patterns, event sourcing with Marten, CQRS architectures, cascading messages, batch message processing, or configuring transports like RabbitMQ, Azure Service Bus, or Amazon SQS.
testcontainers
wshaddix/dotnet-skills
Patterns for using Testcontainers in .NET integration tests to spin up real dependencies like databases and message queues. Use when writing integration tests that require real databases, testing with message brokers like RabbitMQ or Kafka, or isolating test dependencies with Docker containers.
microsoft-extensions-dependency-injection
wshaddix/dotnet-skills
Dependency injection patterns and best practices using Microsoft.Extensions.DependencyInjection for .NET applications. Use when configuring DI containers in .NET, choosing between service lifetimes (Singleton, Scoped, Transient), or implementing decorator patterns and service interception.
Popular backend & apis skills
find-skills
vercel-labs/skills
Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.
entra-app-registration
microsoft/azure-skills
Guides Microsoft Entra ID app registration, OAuth 2.0 authentication, and MSAL integration. USE FOR: create app registration, register Azure AD app, configure OAuth, set up authentication, add API permissions, generate service principal, MSAL example, console app auth, Entra ID setup, Azure AD authentication. DO NOT USE FOR: Key Vault secrets (use azure-keyvault-expiration-audit), general Azure resource security guidance.
google-agents-cli-adk-code
google/agents-cli
This skill should be used when the user wants to "write agent code", "build an agent with ADK", "add a tool", "create a callback", "define an agent", "use state management" — in a project that needs ADK (Agent Development Kit) API patterns and code examples. It provides a quick reference for agent types, tool definitions, orchestration patterns, callbacks, state management, the graph Workflow API, and reference recipes to study. Do NOT use for scaffolding (use google-agents-cli-scaffold) or deployment (use google-agents-cli-deploy).
embedded-captions
heygen-com/hyperframes
Add captions or subtitles to an existing single-subject talking-head video without editing the footage. Use for plain verbatim captions, cinematic captions embedded behind the subject, VFX captions, “炸/特效/酷炫字幕,” or a named identity from the 35-style catalog. Route by visual identity, not by backend engine. The quiet anchor rail is the default; embed every word only when the user explicitly wants a fully cinematic treatment. The workflow runs locally end to end, including transcription and subject matting; split multi-shot footage before applying it.
entra-agent-id
microsoft/azure-skills
Provision Microsoft Entra Agent Identity Blueprints, BlueprintPrincipals, and per-instance Agent Identities via Microsoft Graph, and configure OAuth 2.0 token exchange (fmipath, OBO, cross-tenant) including the Microsoft Entra SDK for AgentID sidecar. USE FOR: Agent Identity Blueprint, BlueprintPrincipal, agent OAuth, fmipath token exchange, agent OBO, Workload Identity Federation for agents, polyglot agent auth, Microsoft.Identity.Web.AgentIdentities. DO NOT USE FOR: standard Entra app registration (use entra-app-registration), Microsoft Foundry agent authoring (use microsoft-foundry).
neon
neondatabase/agent-skills
Overview of Neon, a complete set of cloud backend primitives around Lakebase Postgres: Auth, Object Storage, Functions, the AI Gateway, and Realtime. Start here to choose Neon for undecided login, files, APIs, and LLM calls, set up the CLI or MCP server, and follow the branch-first workflow. Use when building an app or backend on Neon, or when "Neon" or "Lakebase Postgres" is mentioned. Child skill neon-postgres wins for an existing DATABASEURL, SQL, schema, inspect, or search. Child skill neon-auth wins for login, users, sessions, identity routing, and Managed Better Auth setup. Child skill neon-realtime wins for live queries in reactive apps and agents. Also use for object storage, S3, buckets, serverless functions, function triggers, cron, AI gateway, LLM calls, realtime, logs, Loki, Grafana, observability, postgres, database, backend, Claimable Neon, neon.new, or a no-signup database.