Agent skill · dmmulroy

coding-standards

Correct-by-construction TypeScript standards. Use for TypeScript engineering or when another skill needs the user's coding standards.

What it needs

About 11k tokens when loaded.

What this skill does

These standards describe how to design and write TypeScript code in this codebase. They are especially intended for agents: inspect existing code before adding patterns, libraries, Adapters, or abstractions, but apply these standards to all new and refactored behavior. Follow existing conventions only when they are compatible with these standards. Decision priority When rules pull in different directions, use this order: 1. Preserve correctness, safety, and debuggability. 2. Apply these standards to all new code and to the full behavior being refactored. 3. Follow compatible project architecture and conventions. 4. Contain incompatible existing patterns at the nearest boundary rather than copying them into new code. 5. Avoid changing unrelated old code unless a broader migration is explicitly requested. 6. Document meaningful trade-offs with comments or ADRs. Core principles Prefer errors as values over throw / rejected promises for expected failures. Parse don't validate. Parse early and as close to composition or application roots as possible. Do not merely validate and throw away the information learned. Make illegal states unrepresentable where practical. Prefer correct-by-construction APIs over convention-based invariants. Use branded/refined/domain types when they prevent a realistic mistake, such as mixing identifiers or units, bypassing parsing, or constructing an invalid value. Prefer composition over inheritance. Prefer imperative shell / functional core. Design deep, cohesive modules with low caller burden. Test behavior through real seams; avoid module mocks and spy-driven tests. Keep code discoverable for humans and agents. Adapting to existing codebases Before adding a new pattern or library, inspect the repo for existing choices around: error handling schema parsing dependency injection testing observability adapters/services module layout Apply these standards to all new code and to the full behavior being refactored. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills dmmulroy/coding-standards

View the source on GitHub

Browse the @skills marketplace