# Code Quality

> Code quality guidelines. ALWAYS use skill for ANY code changes. Use when this capability is needed.

- Skill: `tomevault-io/code-quality-20` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/code-quality-20`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/code-quality-20/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/code-quality-20

---


# Code Quality Guidelines

## Don't write forgiving code

- Don't permit multiple input formats
    - In TypeScript, this means avoiding Union Type (the `|` in types)
- Use preconditions
    - Use schema libraries
    - Assert that inputs match expected formats
    - When expectations are violated, throw, don't log
- Don't add defensive try/catch blocks
    - Usually we let exceptions propagate out
- Don't keep legacy code paths as fallbacks
    - Remove old code instead of keeping it around for compatibility

## Naming Conventions

- Don't use abbreviations or acronyms
    - Choose `number` instead of `num` and `greaterThan` instead of `gt`

## File Management

- Prefer editing an existing file to creating a new one
- Confirm with the user before creating any new markdown files

## Style

- Emoji and unicode characters are welcome
    - Use them at the beginning of comments, commit messages, and in headers in docs

---
> Converted and distributed by [TomeVault](https://tomevault.io/claim/motlin) — claim your Tome and manage your conversions.
<!-- tomevault:4.0:skill_md:2026-04-11 -->

