iso27diy-corp/Corpus/Sparks/Rules to get better code.md

21 lines
944 B
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
tags:
- vibecoding
---
# Rules I give Claude to get better code (curious what works for you) 
After months working with Claude for dev work, I built a set of strict instructions to avoid bad outputs, hallucinated code, or bloated files.
These rules consistently give me cleaner results, feel free to copy/adapt:
1. No artifacts.
2. Less code is better than more code.
3. No fallback mechanisms — they hide real failures.
4. Rewrite existing components over adding new ones.
5. Flag obsolete files to keep the codebase lightweight.
6. Avoid race conditions at all costs.
7. Always output the full component unless told otherwise.
8. Never say “X remains unchanged” — always show the code.
9. Be explicit on where snippets go (e.g., below “abc”, above “xyz”).
10. If only one function changes, just show that one.
11. Take your time to ultrathink when on extended thinking mode — thinking is cheaper than fixing bugs.