SkillAgentSearch skills...

Amity

Utility to create simple patches to existing assemblies

Install / Use

/learn @bramhaag/Amity
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Amity

Amity is a utility to create simple patches to exitsing assemblies. Inspired by Harmony

Examples

The assembly

public class MyClass
{
    public void MyMethod() 
    {
        Console.WriteLine("Hello, World!");
    }
}

This assembly is saved in C:\MyAssembly.dll

The patch

public class MyPatch {
    [AmityPatch(typeof(MyClass), "MyMethod", AmityPatch.Mode.Prefix)]
    public static void Patch() 
    {
        Console.WriteLine("Hello from Amity!");
    }
}

Applying the patch

public class Program
{
    public static void Main()
    {
        AmityInstance.Patch(typeof(MyPatch), @"C:\MyAssembly.dll", @"C:\MyNewAssembly.dll");
    }
}

Running this will generate the patched assembly in C:\MyNewAssembly.dll, the MyMethod() method in this assembly now looks like this:

public void MyMethod() 
{
    Console.WriteLine("Hello from Amity!");
    Console.WriteLine("Hello, World!");
}
View on GitHub
GitHub Stars4
CategoryDevelopment
Updated8mo ago
Forks0

Languages

C#

Security Score

82/100

Audited on Jul 12, 2025

No findings