SKILL

cratis-fundamentals-type-discovery

Use when a Cratis handler set, filter chain, strategy set or dispatcher must discover every implementation of an abstraction. Not for selecting one service implementation at composition time.

Target: Target not categorized. Automatically collected · unverified.

Excerpt from the author’s documentation

Extracted from a fixed version of SKILL.md in its original language. This is the author’s documentation; installation, compatibility and runtime results have not been verified by this site.

Read the original English text

Topics in the source

  • Cratis implementation discovery
  • Verified product sources
  • Route near misses
  • When you need this
  • Step 1 — Confirm the implementations are discoverable
  • Step 2 — Choose the lifetime with an attribute
  • Step 3 — Inject IInstancesOf in the consumer
  • Step 4 — Delete the dead registrations

services.AddSingleton () looks free at the registration line. The cost arrives later: a new implementation in another folder does nothing until someone remembers the line, a removed one leaves a registration that fails at startup, and every specification setup has to mirror the composition root. IInstancesOf moves that knowledge into the implementation. Adding or removing one becomes a single-file change. | Package | Purpose | | --- | --- | | Cratis.Fundamentals | IInstancesOf , IImplementationsOf , ITypes, convention bindings and the bundled Cratis.Fundamentals.TypeDiscovery.Generator | Reverify against the Cratis Fundamentals repository before claiming support for another version. The consumer needs one implementation chosen at composition time: constructor-inject the interface and let the IFoo → Foo convention resolve it. This skill does not apply. The method returns a sequence of values to a caller: IEnumerable (or IReadOnlyList ) is still the right return type. The rule is about injecting implementations of an abstraction, not about returning values. You only need the types, never instances: inject IImplementationsOf , which enumerates Type rather than T. The consumer of an ab

This is an excerpt. Refer to the complete source and its current requirements.

Source repository
Cratis/AI
Source file
.cratis/ai/skills/cratis-fundamentals-type-discovery/SKILL.md
Fixed revision
868bc20e7f474299466331a3cf86eaf995be0a2b
Read the complete original documentation ↗

Requirements

  • Only the author’s Skill metadata is included. Read the full instructions to check dependencies, licensing and conditions of use.

A small first task

先阅读原作者说明,再决定是否在自己的 AI 工具中使用。

Instructions for your AI tool

Author documentation is not live verification by this site. Without evidence, we do not mark a resource as compatible, safe or free.

Sources and evidence

This record was collected automatically. Its documentation, suitability and runtime behavior have not been manually verified.

Author: Cratis/AI · original repository metadata. Documentation review: Not reviewed. Last source check: 2026-11-12T11:00:49.571Z.

Categories are inferred from names, descriptions and paths. They do not establish compatibility.

License and attribution

MIT. Third-party content and copyright remain with their authors. Refer to the original license and terms.

Original license ↗

Synchronization, copying and user-reported success do not mark a resource as runtime-tested.

Limitations and notes

  • Collecting metadata does not mean this site has installed, adapted, runtime-tested or security-reviewed the resource.