Skip to content

Instantly share code, notes, and snippets.

@anntnzrb
Created August 24, 2025 01:02
Show Gist options
  • Select an option

  • Save anntnzrb/ebfd3e52dabc00cdc410ba29fe65b0b8 to your computer and use it in GitHub Desktop.

Select an option

Save anntnzrb/ebfd3e52dabc00cdc410ba29fe65b0b8 to your computer and use it in GitHub Desktop.
cs.md

Development

You are working on a Windows-only application in WSL. You MUST use the .exe suffix to call Windows binaries from PATH (e.g, dotnet.exe).

Command Workflow

IMPORTANT: Always stay at git root level. Never cd into subdirectories.

# build project/solution
dotnet build SOLUTION.sln
dotnet build PROJECT/PROJECT.csproj

dotnet run --project PROJECT # run from root
dotnete format SOLUTION.sln  # format solution

Rules

IMPORTANT: When doing any form of development, you MUST:

  • NEVER develop from memoryΓÇöAPIs, patterns, and best practices evolve fast. ALWAYS consult deepwiki (or equivalent research) for the specific library repo BEFORE writing code.
  • VERIFY current official docs using research tools for each libraryΓÇöreference them in your reasoning. REFERENCE actual examples from the repo when implementing ANY functionality.
  • Use ONLY optimal, latest & greatest practices: No legacy code; leverage modern C# and above features.

This ensures code accuracy, follows current best practices, and prevents issues from outdated implementation patterns.

Guidelines

CORRECT CODE FIRST - The primary goal is writing correct, maintainable code that expresses intent clearly. This philosophy prioritizes "what" the code accomplishes over "how" it does it, favoring declarative patterns like LINQ, pattern matching, and functional compositions that make the code's purpose immediately apparent. While functional programming techniques are valuable tools for achieving correctnessΓÇösuch as immutable records, Result<T> error handling, and pure functionsΓÇöthey serve the broader goal of creating code that is easier to read, understand, and maintain rather than being an end in themselves.

LESS CODE, LESS MAINTENANCE - Minimize boilerplate through modern C# features like source generators, records, and vertical slice architecture where related components are co-located rather than spread across artificial layer boundaries. The philosophy embraces flexibility: while preferring concise, declarative approaches, it allows for performance-critical exceptions when proven necessary. This approach recognizes that maintaining fewer lines of well-structured, expressive code ultimately leads to more robust and scalable applications, whether measured by human comprehension or AI-assisted development.

TYPE SAFETY - Prohibition of dynamic keyword. The object keyword should be used sparingly for last extreme case scenarios.

Tech Stack

  • Language: C# 13
  • Runtime: .NET 9
  • Platform: Windows x64
  • Package Manager: NuGet

C# & .NET Ecosystem

Foundational knowledge sources for C# development patterns, architecture, and best practices. Consult these when researching idioms, design patterns, and modern .NET approaches.

Runtime & Platform

  • .NET Runtime - Core runtime implementation and internals
    • Use case: JIT compilation, garbage collection, hardware intrinsics, runtime behavior, and performance optimization patterns
    • Source: https://github.com/dotnet/runtime
    • Wiki: dotnet/runtime

Modern Language Practices

  • C# 13 & .NET 9 - Latest language features and modern practices
    • Use case: Modern C# idioms, latest language features, best practices, and code examples
    • Source: https://github.com/markjprice/cs13net9
    • Wiki: markjprice/cs13net9
  • C# Language Design - Official C# language design and feature evolution
    • Use case: Latest C# features by version, language design decisions, design principles, and type system enhancements
    • Source: https://github.com/dotnet/csharplang
    • Wiki: dotnet/csharplang

Production-Ready Applications

  • .NET Extensions - Production application libraries and patterns
    • Use case: AI extensions framework, HTTP resilience, enhanced telemetry, compliance/audit systems, and contextual options for experimentation
    • Source: https://github.com/dotnet/extensions
    • Wiki: dotnet/extensions

Architecture & Patterns

  • ASP.NET Core - Framework architecture and .NET patterns
    • Use case: Dependency injection, configuration, logging, and general .NET application patterns
    • Source: https://github.com/dotnet/aspnetcore
    • Wiki: dotnet/aspnetcore
  • Vertical Slice Architecture - Feature-driven architecture pattern
    • Use case: Alternative to layered architecture, CQRS patterns, and feature organization
    • Source: https://github.com/nadirbad/VerticalSliceArchitecture
    • Wiki: nadirbad/VerticalSliceArchitecture

Libraries

Memory & Process Management

  • Microsoft.Windows.CsWin32
    • Use case: Source generator for safe, auto-generated P/Invoke wrappers to WinAPI functions (e.g., ReadProcessMemory for memory access without manual DllImport)
    • Source: https://github.com/microsoft/CsWin32
    • Wiki: microsoft/CsWin32
  • Swed32
    • Use case: Pattern scanning and offsets finding in game memory (e.g., locating dynamic addresses via byte signatures)
    • Source: https://github.com/Massivetwat/swed32
    • Wiki: Massivetwat/swed32
  • System.Diagnostics.Process
    • Use case: Process management and enumeration (e.g., finding deadlock.exe process, process monitoring)
    • Source: https://github.com/dotnet/runtime
    • Wiki: dotnet/runtime

Math & Calculations

  • System.Numerics
    • Use case: Vector and matrix operations for 3D calculations (e.g., player positions, aim angles)
    • Source: https://github.com/dotnet/runtime
    • Wiki: dotnet/runtime

Graphics & UI

  • Raylib-cs
    • Use case: Lightweight 2D/3D rendering for UI overlays (e.g., ESP skeletons on transparent windows)
    • Source: https://github.com/raylib-cs/raylib-cs
    • Wiki: raylib-cs/raylib-cs
  • WPF (Windows Presentation Foundation)
    • Use case: Modern desktop GUI framework for settings configuration interface (e.g., aimbot controls, logging display, dark-themed gaming aesthetics)
    • Source: https://github.com/dotnet/wpf
    • Wiki: dotnet/wpf

Input Handling

  • H.InputSimulator
    • Use case: Simulating keyboard/mouse inputs and hotkey detection (modern replacement for WindowsInput with fluent API, scan code support)
    • Source: https://github.com/HavenDV/H.InputSimulator
    • Wiki: HavenDV/H.InputSimulator

Networking & Configuration

  • HttpClient
    • Use case: HTTP client for update checking and web requests (e.g., GitHub API calls for version management)
    • Source: https://github.com/dotnet/runtime
    • Wiki: dotnet/runtime
  • Microsoft.Extensions.Configuration
    • Use case: Advanced configuration management with JSON/XML support (e.g., settings persistence, configuration binding)
    • Source: https://github.com/dotnet/runtime
    • Wiki: dotnet/runtime

Security & Obfuscation

  • Obfuscar
    • Use case: Binary obfuscation through renaming and scrambling to evade detection
    • Source: https://github.com/obfuscar/obfuscar
    • Wiki: obfuscar/obfuscar

Disclaimer

This repository is for educational and research purposes only. This is legitimate software development using publicly available, open-source libraries and standard .NET components.

Cheating or bypassing security mechanisms is not endorsed here. Any use violating terms of service is the consumer's sole responsibility, including consequences such as account bans or penalties.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment