deslop
Regression-safe cleanup of AI-generated bloat in C# code. Deletion-first, requires green tests before starting.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Regression-safe cleanup of AI-generated bloat in C# code. Deletion-first, requires green tests before starting.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Author a culture's armor items and swap troop equipment rosters via the generator + validation pipeline. Use when adding/revamping armor. Enforces the canonical-folder + cover-attribute rules.
Give DOTS lords lore-driven skill values and traits via the DOTS SkillSet system. Use when a canonical lord has wrong stats or a culture roster needs a balance pass.
Author or revamp a DOTS culture's armor set, troop tree, and recruitment wiring end-to-end. Use for new cultures or troop-tree revamps. Follows docs/ai-includes/new-culture-authoring.md.
Use when reviewing an external repo or article to adopt practices into DOTS — security-vet first, map novel vs duplicative, port (never install), review, commit your changes.
Structured 4-phase self-debug for failing agent runs (looping, drifting, burning tokens). Capture, diagnose, contained recovery, report. Complements /investigate (which is for code bugs); this skill is for harness/agent failures.
Incrementally fix dotnet build errors with minimal diffs, one error at a time
| name | deslop |
| description | Regression-safe cleanup of AI-generated bloat in C# code. Deletion-first, requires green tests before starting. |
| argument-hint | ["path or feature to clean up","e.g. \"Main/Features/Execution\" or \"WargAttackService\""] |
Regression-safe cleanup of AI-generated bloat. Targets dead code, duplicate logic, over-abstraction, and unnecessary complexity — without changing behavior.
Scope: $ARGUMENTS (if empty, use git diff --name-only to find recently modified files)
dotnet test DOTS.Tests --no-build 2>&1 | tail -5
If tests are failing: STOP. Do not clean up broken code — you'll mask real bugs. Report the failures and exit.
Scan target files for these patterns. Do not change anything yet.
| Pattern | DOTS Example |
|---|---|
| Dead code | Private methods never called, unused fields, commented-out patch blocks |
| Redundant null guards | Null checks on DryIoc-injected services (the container guarantees non-null) |
| Restatement comments | // This method calculates the wage above CalculateWage() |
| Empty base calls | public Foo() : base() {} with no reason to exist |
| Adapter over-wrapping | Adapter that just delegates every property 1:1 with no translation logic |
| Single-use private methods | private bool IsValid() { return x != null; } called exactly once |
| Duplicate guard clauses | Same null/empty check copy-pasted across 3+ methods in the same class |
| Over-defensive catch blocks | try { } catch (Exception) { } around code that can't throw |
| Unused using directives | using TaleWorlds.Library; when nothing from that namespace is used |
| Harmony patch boilerplate noise | __state parameters declared but never used, __result assigned then immediately returned unchanged |
For each item found, record: file:line, pattern type, deletion safety (SAFE / RISKY).
Mark RISKY if:
Apply changes in this order — safest first:
using directives (compiler-verified safe)grep -r "MethodName" Main/ first)Hard limits — never do these:
#pragma warning suppressions without understanding why they existdotnet test DOTS.Tests --no-build 2>&1 | tail -10
If any test fails: revert the last change (git diff to identify it), report which deletion broke which test, and mark that item RISKY in the report. Do not delete it.
DESLOP REPORT
=============
Scope: [files or feature name]
Files touched: N
Lines deleted: N
Lines added: N (extractions only)
CLEANED:
- [file:line] [pattern] — [brief description]
- ...
SKIPPED (RISKY):
- [file:line] [pattern] — [reason skipped]
Tests: PASS (N tests) / FAIL (list failures)
NET: [clean / needs manual review of N risky items]