code-quality-principleslisted
Install: claude install-skill synaptiai/synapti-marketplace
# Code Quality Principles
Foundation skill governing code quality standards during autonomous development.
## Iron Law
**EVERY CHANGE MUST BE INTENTIONAL. If you can't explain why a line changed, revert it.**
Always leave code better than you found it. Fix issues in files you are already modifying — but only changes that pass the proximity test.
## Before You Write Code
Answer these questions first. If you can't, return to EXPLORE:
1. What is the specific task/criterion this code serves?
2. What files will be modified and why each one?
3. What existing patterns does this project use for this type of change?
4. What could go wrong? (error cases, edge cases, security)
5. How will you verify this works?
## Boy Scout Rule
Leave every file you touch better than you found it. Fixing known defects in touched files is not optional scope creep — it is the baseline of Quality-First Completionism. Touching a file means owning its known issues.
**The proximity test is NOT a deferral mechanism for P1/P2 findings.** It decides *how* a cleanup is committed (alongside the feature fix vs. as a separate `improve:` commit), not *whether* it gets fixed. If a P1 or P2 finding exists in a file the PR modifies, it is fixed in this PR, full stop.
**A cleanup is committed as a standalone `improve:` commit when ALL true:**
1. The file is already being modified for the current task
2. The fix is self-evidently correct (lint, format, typo, obvious bug, missing error handling)
3. The fix is sm