dotnet-slopwatch

Detect reward-hacking shortcuts in .NET code diffs.

3|Updated Jan 24, 2024
One-click install
npx skills add https://github.com/akoken/dotfiles --skill dotnet-slopwatch-akoken
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dotnet-slopwatch
Source: https://github.com/akoken/dotfiles/tree/main/config/.copilot/skills/dotnet-slopwatch
Command: npx skills add https://github.com/akoken/dotfiles --skill dotnet-slopwatch-akoken

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps teams detect and prevent reward-hacking shortcuts in .NET code changes, such as disabled tests, suppressed warnings, and empty catch blocks, ensuring code quality and reliable tests.

Core Features & Use Cases

  • Detects disallowed patterns in .NET projects (disabled tests, warning suppression, empty catch blocks, arbitrary delays)
  • Provides baseline setup guidance and analysis workflow for dotnet projects
  • Use Case: integrate into CI/CD and after each PR to validate changes and enforce proper fixes

Quick Start

Install Slopwatch for .NET tooling, configure the slopwatch.json, and run slopwatch analyze after edits to identify and address potential shortcuts.

Frequently Asked Questions about dotnet-slopwatch

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I detect disabled tests and suppressed warnings in .NET code changes?

You can detect disabled tests and suppressed warnings in .NET code changes by analyzing code diffs for unsafe patterns like disabled tests, empty catch blocks, and warning suppressions, enforcing proper fixes rather than quick wins.

What is LLM reward hacking in C# projects and how does static analysis catch it?

LLM reward hacking in C# projects involves taking shortcuts like disabling tests or adding artificial delays. Static analysis catches this by scanning code diffs after modifications to enforce workflow rules and require proper fixes.

How do I integrate automated code quality checks for LLM generated C# code in CI/CD?

You can integrate automated code quality checks for LLM generated C# code by running diff analysis after each PR to validate changes, catching unsafe patterns like arbitrary delays and empty catch blocks before merging.

Can I use slopwatch to analyze project files and test suites in dotnet?

Yes, you can use it to analyze project files and test suites in dotnet. It is applicable to C# projects and analyzes code diffs after every modification to catch unsafe patterns, supporting configuration through a slopwatch.json file.

How do I configure slopwatch analysis rules for a .NET repository?

You configure analysis rules for a .NET repository by setting up a slopwatch.json configuration file in the .slopwatch directory, defining the static analysis and workflow rules to enforce proper fixes for detected unsafe patterns.

What are the limitations of using diff analysis to prevent reward hacking in C#?

The limitation of using diff analysis to prevent reward hacking in C# is that it primarily targets specific unsafe patterns in modified code, meaning pre-existing issues in unchanged code may not be detected without a full baseline scan.