# pardeike/Harmony

A library for patching, replacing and decorating .NET and Mono methods during runtime

Repository: https://github.com/pardeike/Harmony
Canonical: https://ross.abutalabs.com/products/harmony
Homepage: https://www.patreon.com/pardeike
Language: C#
License: MIT
License Family: permissive
Topics: csharp, patcher, detour, detours, runtime, mono, dotnet, unity, cil, monkey-patching, non-destructive
Last push: 2026-08-15T14:29:07+00:00

## Health v2 (maintenance only)
Score: 79/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 97, release rhythm 44, longevity 100
- inputs: {"age_days": 3528, "days_push": 18, "days_rel": 294, "gap_med": 68, "n_releases_24m": 6}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 6627, forks 572 (observed 2026-08-28T04:09:45.802952+00:00)

## What it is
Harmony is a C# library for patching, replacing, and decorating .NET and Mono methods at runtime without modifying files on disk. It is widely used for game modding in titles like RimWorld, Rust, and Stardew Valley, as well as in unit testing.

## Use cases
- patch .NET methods at runtime from a plugin
- create mods for Unity games like RimWorld or Stardew Valley
- wrap original methods with prefix and postfix hooks
- replace method bodies with IL code processors
- apply multiple non-conflicting patches to the same method
- intercept and modify behavior of a host application's assemblies

## When to choose
- you are writing a mod or plugin loaded into a .NET/Mono host application
- you need non-destructive runtime patches that keep the original method intact
- multiple independent patches must coexist on the same methods
- you target Unity or other Mono-based games

## When to avoid
- you need to patch ahead-of-time or modify files on disk
- you are not working in a .NET or Mono environment
- you need Harmony 1.x compatibility, which is deprecated and incompatible with 2.x

## Facets
- artifact type: library
- maturity: stable
- function: middleware, developer-tools, plugin-system
- domain: developer-tools, gaming-tools, programming-languages
- platform: dotnet, cross-platform, windows
- tags: runtime-patching, method-detour, monkey-patching, unity-modding, il-rewriting, csharp, mono, game-mods, linux, macos

## Member repositories
- pardeike/Harmony (main) score 79

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:45.802952+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-29T17:43:14.411158+00:00, confidence not recorded.
  - readme: https://github.com/pardeike/Harmony (fetched 2026-08-28T04:09:45.802952+00:00, sha 5c12ab901b48)
  - homepage: https://www.patreon.com/pardeike (fetched 2026-08-29T08:39:35.751922+00:00, sha c3796f5fba7f)
  - site_page: https://www.patreon.com/pardeike/about (fetched 2026-08-29T08:39:35.760720+00:00, sha 49787c9b5133)
- Data as of 2026-08-30T08:39:29.467469+00:00.
