# De-slop loop - Claude auto-improve background loop

> Source: <https://gist.github.com/hsubra89/81728f6ccade69cdf24421b5468e1b59>
> Published: 2026-07-03 18:57:30+00:00

| /loop once every two hours. | |
| !git reset --hard && git checkout dev && git pull && pnpm i && pnpm build | |
| Study across all backend apps and packages and identify opportunities to improve the code. | |
| Look to : | |
| - simplify code | |
| - reduce verbosity | |
| - improve conciseness | |
| - improve consistency | |
| - fix logical bugs | |
| - eliminate violations of the Rule of Three: deduplicating before the third clear repetition appears. | |
| - eliminate premature DRY - eg: defining explicit variables for simple constants that are referred to less than 3 times. Avoid low-value DRY refactors that only replace repeated object literals with factory/helper functions | |
| - eliminate Over-abstraction: adding indirection that costs readability more than it saves duplication. | |
| - eliminate defensive assumptions in code. | |
| - add clarity to existing code with comments ( only when other improvement opportunities are not available ) | |
| All without introducing any breaking changes to public interfaces or behaviour. | |
| When working with effect code, discover idiomatic patterns by reading the source code at @repos/effect | |
| Run all local checks and then raise a PR. Prefix the title with `auto-improve:` and ensure CI completes successfully. |
