codebase-lang

Installation
SKILL.md

Codebase Lang

Project conventions come first: docs/ARCHITECTURE.md, the project's config, and the code already there. These rules fill the gaps, and only cover what formatters and linters won't catch.

Before writing

  • Read the toolchain config (pyproject.toml, Cargo.toml, package.json) for the language version, formatter, linter, type checker, and async runtime. Don't use syntax or APIs the declared version doesn't support, and within it, write the newest syntax and idioms it offers rather than older patterns kept out of habit.
  • Training data goes stale. When unsure about a framework or an API, check the official docs, not memory.

Every language

  • Types at the boundaries. Public APIs and cross-module interfaces are fully typed. Parse and validate external input at the edge; nothing untyped (Any, any) crosses a module boundary.
  • Make illegal states unrepresentable. Use enums or literal unions for finite states, not combinations of booleans or magic strings.
  • Errors. Catch only what this layer can handle. Keep the cause when converting an error. Never swallow one silently. Catch-alls belong only at request, task, or process boundaries.
  • Side effects at the edges. I/O, time, randomness, and external clients sit behind seams that tests can replace.
  • Async. No blocking I/O or long CPU work on the event loop. Every background task has an owner that awaits it, cancels it, and handles its errors.
  • Security. Parameterized queries. Commands as argument lists, never shell strings. No eval or executable deserialization of untrusted data. Secrets never in source, logs, or error messages.
  • Comments say why. Names and structure say what the code does; a comment is for what they can't: the reason, a constraint, a trap. Don't narrate each step.
  • Performance. Measure before optimizing. Fix algorithms and I/O counts before micro-optimizations.
Installs
1
Repository
aningdev/skills
First Seen
8 days ago