coding-standards
Project coding conventions for the CODER agent. Load before any implementation task to ensure consistent style and patterns.
SKILL.mdskills/coding-standards/SKILL.md
GitHubCoding Standards
General
- TypeScript by default unless project is plain JS
- Functional style preferred over class-heavy OOP
- Small functions — one responsibility per function
- Explicit types — avoid
any - Named exports over default exports (exceptions: pages, layouts)
Vue 3 (Mateus's primary stack)
- Always
<script setup>— never Options API - Composables in
composables/— prefix withuse - Props typed with
defineProps<{...}>() - Emits typed with
defineEmits<{...}>() - Tailwind for styling — no inline styles
Node/Express
- Async/await — no raw
.then()chains - Error handling with try/catch at controller level
- Validation at route level before controller
- No logic in route files — keep routes thin
MongoDB/Mongoose
- Schema validation at model level
- Lean queries where possible
- Never expose
_iddirectly — useidtransform
File structure
- Feature-based, not type-based
components/→ reusable onlyviews/orpages/→ route-level componentsservices/→ API calls and external integrations
Naming
- Components: PascalCase
- Composables: camelCase with
useprefix - Files: kebab-case
- Constants: SCREAMING_SNAKE_CASE
Before writing code
- Read the existing file if editing
- Check for similar patterns already in the codebase
- Follow what's there — don't introduce new patterns without noting it