# khellang/Scrutor

Assembly scanning and decoration extensions for Microsoft.Extensions.DependencyInjection

Repository: https://github.com/khellang/Scrutor
Canonical: https://ross.abutalabs.com/products/scrutor
Language: C#
License: MIT
License Family: permissive
Topics: scanning, decoration, assembly-scanning, decoration-extensions, asp-net-core, dependency-injection, conventions, convention-registration, hacktoberfest, scrutor
Last push: 2026-01-23T15:16:44+00:00

## Health v2 (maintenance only)
Score: 69/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 63, release rhythm 58, longevity 100
- inputs: {"age_days": 3946, "days_push": 222, "days_rel": 282, "gap_med": 9.5, "n_releases_24m": 11}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 4336, forks 280 (observed 2026-08-28T04:08:46.057667+00:00)

## What it is
Scrutor is a C# library providing assembly scanning and service decoration extensions for Microsoft.Extensions.DependencyInjection. It lets developers register classes by convention (filtering by interface, lifetime, etc.) and wrap existing registrations with decorators via a fluent API.

## Use cases
- auto-register services by convention in ASP.NET Core
- scan an assembly and register all classes implementing an interface
- decorate registered services with decorators in .NET DI
- register open generic types like query handlers automatically
- reduce boilerplate in IServiceCollection registrations
- apply different lifetimes to batches of services

## When to choose
- you use Microsoft.Extensions.DependencyInjection and want convention-based registration
- you need decorator support for DI-registered services
- you want to eliminate repetitive manual service registrations in large .NET codebases

## When to avoid
- you use a different DI container with built-in scanning (e.g., Autofac, Lamar)
- your project has only a handful of services where manual registration is simpler
- you are not on the .NET platform

## Facets
- artifact type: library
- maturity: active
- function: middleware, developer-tools
- domain: backend, developer-tools, web-development
- platform: dotnet, cross-platform
- tags: dependency-injection, assembly-scanning, service-decoration, asp-net-core, convention-based-registration, microsoft-extensions-dependencyinjection

## Member repositories
- khellang/Scrutor (main) score 69

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:46.057667+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:21:38.194266+00:00, confidence not recorded.
  - readme: https://github.com/khellang/Scrutor (fetched 2026-08-28T04:08:46.057667+00:00, sha 73775f8da921)
- Data as of 2026-08-30T08:39:29.467469+00:00.
