Every premium and members-only resource for $9.99/month, as a no-commitment subscription. See the plans

PalateKit

Menu

Request a resource

Describe the resource you are missing in one sentence. We will email you when it is published.

0 / 280

Unlock PalateKit

Unlock everything

Plan

Paying means accepting our terms of sale.

Secure payment by Stripe. Receipts and invoices sent by email.

Welcome back

Sign in to install, download or save this resource. A free account is enough for free resources.

.NET dependency injection: lifetimes and keyed services v1.0.0

Use this resource to register and resolve .NET services without lifetime errors

New

  • 547 downloads
  • 206 likes
  • 169 saves

Free

Install with the CLI

In a terminal, from the folder you want:

npx --yes palatekit@latest install dotnet-dependency-injection-lifetimes

With no option, the skill goes to ~/.agents/skills/; add --agent claude-code (or codex, cursor…) to target an agent.

First time: connect the CLI with

npx --yes palatekit@latest login

The agent registers services in IServiceCollection with the right lifetime, uses keyed services to select a strategy, adds decorators and factories, and catches captive dependencies, where a singleton holds a scoped service. You get a service graph that works from startup.

Mostly picked by

Updated November 2, 2026

Card for the “.NET dependency injection: lifetimes and keyed services” skill

Details

Generates with
Your agent's model
Licence
MIT

Similar resources

View all

What you get

  • SKILL.md: lifetimes, keyed services and interface registration
  • SKILL.md: decorators, convention registration with Scrutor and factories

Good fit for

  • A lifetime error shows up on the first request
  • You want to choose an implementation by key

Not for

    Tags

    • dotnet
    • dependency injection
    • lifetimes
    • keyed services

    About

    You say

    “Register the payment services as keyed services for Stripe and PayPal, and check that no singleton holds a scoped service.”

    Card for the “.NET dependency injection: lifetimes and keyed services” skill

    Skill published by codewithmukesh under the MIT license, delivered in its original version.

    Show more

    How to use it

    1. Install the skill in your agent's skills folder
    2. Ask your agent to register and resolve .NET services without lifetime errors
    3. Review and adjust the result

    Content preview

    Files

    • LICENSE1 KB
    • NOTICE-PALATEKIT.md0.5 KB
    • SKILL.md6.1 KB

    Origin and licence

    Listed unmodified

    Author
    codewithmukesh
    Source
    github.com/codewithmukesh/dotnet-claude-kit/tree/23300897f4d1a276bc475e373ecfe886e43dd7c5/skills/dependency-injection
    Licence
    MIT

    Notice

    « dependency-injection » (codewithmukesh, MIT) livré dans sa version d'origine : fiche en français et en anglais par PalateKit.

    User reviews

    –

    No ratings yet

    Loading reviews…

    Delete your review?

    Your rating and comment will be removed from the page.