Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save karlhorky/4a1ae0bc7a3af14243c6e7fe2c9fae57 to your computer and use it in GitHub Desktop.

Select an option

Save karlhorky/4a1ae0bc7a3af14243c6e7fe2c9fae57 to your computer and use it in GitHub Desktop.
De-slop loop - Claude auto-improve background loop
/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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment