← ClaudeAtlas

coding-best-practiceslisted

Use when developing code. Universal rules for TDD, self-review, quality timing, review format, security. Preloaded on developers.
lklimek/claudius · ★ 1 · Code & Development · score 67
Install: claude install-skill lklimek/claudius
# Coding Best Practices Universal rules for all developer agents. Language-specific guidance lives in each agent's own instructions. ## Workflow Discipline Steps 3-5 of every developer workflow (after build environment and prior art check): 3. **TDD — tests first**: Define test scenarios (including edge cases and error paths) BEFORE writing implementation code. Write the test stubs/cases first, then implement to make them pass. 4. **Implement**: Write the production code to satisfy the tests. 5. **Self-review**: Review your own code before considering it complete. Check for correctness, edge cases, naming, error handling, and adherence to the architectural design. ## Code Quality Tool Timing Only run formatting, linting, and tests right before committing (or when the user explicitly asks). Don't run them after every edit — it wastes time and tokens. ## Build & Test Output Capture Never re-run a build, test, or lint command just to see more of its output. Capture full output on the first run using `tee`: `f=$(mktemp /tmp/build-XXXXXX.txt) && <command> 2>&1 | tee "$f" | tail -80 && echo "Full output: $f"`. If the visible tail is insufficient, read the temp file — do not re-execute the command. ## Code Review Output Format Use the `report-format` skill for output structure. IDs are provisional (consolidation reassigns them). ## Cross-Cutting Rules - **Minimize code**: prefer the shortest correct solution — fewer lines, less to maintain. - **Verify facts before acting