Skip to content

AI Coding Assistants

Pawel Gerr edited this page Jun 14, 2026 · 1 revision

AI Coding Assistants

There are two complementary ways to give an AI coding assistant accurate, up-to-date knowledge of Thinktecture.Runtime.Extensions:

  • Agent skill -- curated guidance bundled in this repository and installed into your project with the skills CLI.
  • Context7 (MCP) -- this library's documentation indexed for on-demand retrieval by any agent with the Context7 MCP server configured.

They work well together: the skill ships a concise, opinionated decision guide and worked examples; Context7 provides the full, version-accurate documentation on demand.

Agent skill

The repository ships an AI agent skill -- a self-contained package of project knowledge that AI coding agents (Claude Code, Cursor, and others) load on demand. It teaches the agent how to use the library correctly so it picks the right building block and generates idiomatic, working code instead of guessing.

The skill lives under skills/thinktecture-runtime-extensions in this repository.

What it covers

The skill helps an agent both choose the right type and implement it:

  • Smart Enums ([SmartEnum<TKey>] / [SmartEnum]) -- type-safe enumerations with data and behavior
  • Value Objects ([ValueObject<TKey>] / [ComplexValueObject]) -- immutable domain primitives with validation
  • Discriminated Unions ([Union<T1, T2, ...>] / [AdHocUnion] / [Union]) -- type-safe "one of" types
  • Object Factories ([ObjectFactory<T>]) -- custom conversion to/from an arbitrary T

It also carries cross-cutting guidance for Switch/Map pattern matching, equality and comparers, generic types (TypeParamRef1TypeParamRef5), framework integration (System.Text.Json, MessagePack, EF Core, ASP.NET Core, Swashbuckle), setting cascades, and TTRESG diagnostics. Type-specific detail is loaded on demand from the skill's references/ folder.

Installing the skill

Install the skill into your project with the skills CLI (no global install of the CLI required -- npx runs it on demand):

npx skills@latest add PawelGerr/Thinktecture.Runtime.Extensions

The CLI clones the repository, discovers the skill via its SKILL.md, and copies it into your project -- by default at project scope into .claude/skills/ (or the equivalent folder for whichever agent you target). Use -g to install at user scope into ~/.claude/skills/ instead, making it available across all your projects:

npx skills@latest add PawelGerr/Thinktecture.Runtime.Extensions -g

The CLI detects the agents in your project and asks if there is more than one. For a non-interactive install -- for example in a setup script -- pin the target agent with -a and skip the prompts with -y:

npx skills@latest add PawelGerr/Thinktecture.Runtime.Extensions -a claude-code -y

If the repository ever ships more than one skill, select this one explicitly with --skill thinktecture-runtime-extensions.

Flag Purpose
-s, --skill <skills...> Install specific skills by name (use '*' for all)
-a, --agent <agents...> Target specific agents (e.g. claude-code, cursor)
-g, --global Install to ~/<agent>/skills/ instead of the project ./<agent>/skills/
-y, --yes Skip all confirmation prompts

Updating and removing

Re-run the same add command to pull the latest version of the skill. To remove it, delete its folder from the install location (for Claude Code at project scope: .claude/skills/thinktecture-runtime-extensions/).

Notes

  • The skill contains no executable code -- it is Markdown guidance (SKILL.md plus references/*.md) that the agent reads. It does not run during your build and is unrelated to the NuGet packages.
  • It works with any agent supported by the skills CLI; the install locations follow each agent's own convention.

Context7 (MCP)

Context7 indexes this library's documentation and serves it to AI agents through the Context7 MCP server. If your assistant has Context7 configured, it can pull current, version-accurate docs for the library on demand -- nothing needs to be set up in your own project.

Reference the library by its ID in your prompt (or simply add use context7), and the agent retrieves the relevant snippets directly from the indexed documentation.

Clone this wiki locally