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]