web-dev-backendlisted
Install: claude install-skill alex-macra/claude-codex-skills-assembly
# Web dev - backend
## Type discipline
### TypeScript / Node.js
- `strict: true` + `noUncheckedIndexedAccess: true` + `exactOptionalPropertyTypes: true` in `tsconfig.json`.
- Validate every request/response with `zod`. Inferred types come from schemas, not the other way around.
- Use `unknown` at boundaries (`req.body: unknown`); narrow with `schema.parse(...)` before touching.
- Avoid `as` casts. If types disagree, fix the type - don't override the checker.
### Python
- Type-annotate every function signature in new code. `mypy --strict` (or `pyright`) on changed modules. No `# type: ignore` to silence.
- `pydantic` v2 models for I/O boundaries - validation + types + serialization in one.
- `from __future__ import annotations` for forward refs and deferred eval.
## Project layout & packaging
### TypeScript / Node.js
- Monorepo? Use workspaces (npm/pnpm). Shared modules become `@scope/<pkg>` packages with their own `package.json`.
- `dist/` is build output - gitignored unless a `file:` workspace dep requires committed builds.
- Pin Node version in `package.json` (`"engines": { "node": ">=20" }`) and `.nvmrc`. Lockfile (`package-lock.json` or `pnpm-lock.yaml`) is committed.
- One `tsconfig.json` for build, optional `tsconfig.test.json` for tests.
### Python
- `src/` layout for libraries (`pyproject.toml` + `src/<package>/`). Avoids the import-from-cwd footgun.
- Pin Python version in `pyproject.toml` (`requires-python = ">=3.11"`). Pin runtime deps with upper bounds. Lock