code-style

Rules for formatting and naming code in a strict TypeScript project, including Biome, a tool that formats code and checks style.

In plain words
What is it for?
It guides Biome usage, import organization, TypeScript type definitions, React file names, relative extensions, and handling of generated files.
Why use it?
It reduces inconsistent formatting, unclear imports, naming mistakes, and type-related problems across the codebase.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/latitude-dev/latitude-llm/code-style
Any agent
npx skills add latitude-dev/latitude-llm --skill code-style
Clone the repo
git clone --depth 1 https://github.com/latitude-dev/latitude-llm

Made for: Claude Code, Codex.

Per session 24 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,199 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00024 $0.01199
Opus 5 $0.00012 $0.00600
Sonnet 5 $0.00005 $0.00240
Haiku 4.5 $0.00002 $0.00120

Measured 3d ago against content hash 3047cb2a5861, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

code-style scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/code-style/SKILL.md · 78 lines

How it starts

The opening of the file, as written. The whole thing — 78 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Code style, TypeScript, and naming

When to use: Biome formatting, import style, strict TypeScript, naming (including React file names), or generated files. For where domain code lives, see architecture-boundaries.

Code style (Biome)

Biome config (biome.json) is the source of truth:

  • Indentation: 2 spaces
  • Max line width: 120
  • Strings: double quotes
  • Semicolons: as needed
  • Ignore generated/output paths: dist/**, coverage/**, .turbo/**, node_modules/**, **/*.gen.ts, **/models.dev.json
  • Prefer package-local formatting: pnpm --filter @app/api format

Imports

  • Prefer static imports; avoid dynamic import patterns unless justified
  • Use import type { ... } for type-only imports
  • Keep imports explicit and grep-friendly
  • Preserve clear grouping/order (external, internal alias, then relative)
  • Avoid wildcard exports/imports when explicit named exports are practical
  • Avoid barrel files (index.ts re-exporting from the same directory); import from the specific module
  • Use .ts/.tsx extensions in relative imports (not .js). The codebase uses TypeScript source extensions for module resolution

TypeScript

Base config: tsconfig.base.json. Typechecking runs under tsgo (TypeScript 7 beta, via @typescript/native-preview) — use tsgo -p tsconfig.json --noEmit in typecheck scripts, never tsc.

  • strict: true is enabled; keep code strict-clean
  • Module system: NodeNext + ESM ("type": "module" in packages/apps)
  • For new domain data contracts, define the canonical shared shape as a Zod schema first when runtime validation is required, then infer TypeScript types from that schema or from Drizzle schemas where appropriate.
  • Treat schemas in src/entities/<entity>.ts as the canonical domain contract. Schemas and types elsewhere in the same domain or at app/platform boundaries should derive from or reuse those entity shapes whenever practical instead of restating identical fields.
  • Canonical entity schemas should treat system-managed fields such as id, createdAt, and updatedAt as core entity fields. Do not split an entity into a business payload plus an appended "persistence" wrapper unless there is a truly distinct boundary/input DTO that needs that separation.
  • Enum-like contracts should use literal-string unions or as const objects, not TypeScript enums.
  • Use shared domain schemas to validate data crossing from app/platform boundaries into domain use-cases.
  • If a boundary schema must differ materially from the entity shape, reuse domain constants, field schemas, and literal unions before introducing duplicated inline limits or sentinel values.
  • Configurable thresholds, weights, debounce windows, sentinel values, and similar tunables should live in named constants inside the owning domain package rather than as scattered inline literals.
  • Types and schemas that exist only as the inputs of one use-case should stay in that use-case file unless several use-cases truly share the same contract.
  • Prefer explicit domain types/interfaces over loose objects
  • Methods/functions with more than one argument should default to a single named-arguments object rather than positional arguments
  • Use readonly fields for immutable domain data shapes
  • Avoid any; use unknown + narrowing
  • Avoid unnecessary type assertions (as { ... }); prefer relying on inferred types from libraries
  • Validate boundary inputs early (API input, queue payloads, external IO)

Read the full file on GitHub · 78 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 78 lines · 24 tokens per session scan A 3047cb2a5861

Subscribe to this mod's changes

code-style is a skill published in the GitHub repository latitude-dev/latitude-llm (4,611 stars, last pushed yesterday), licensed MIT. It adds 24 tokens to every session and 1,199 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

phoenix-typescript

TypeScript conventions and patterns for any TypeScript code in the Phoenix monorepo — including js/packages/, js/app/, and any other TS directories. Use this skill whenever writing, reviewing, or modifying TypeScript code — new functions, types, exports, tests, or refactors. Also trigger when the user asks about TS…

Arize-ai/phoenix · 82 tokens

phoenix-frontend

Frontend development guidelines for the Phoenix AI observability platform. Use when writing, reviewing, or modifying React components, TypeScript code, styles, or UI features in the js/app/ directory. Triggers on any frontend task — new components, UI changes, styling, accessibility fixes, form handling, or component…

Arize-ai/phoenix · 105 tokens

phoenix-client-development

Development guide for the @arizeai/phoenix-client TypeScript SDK — run and resume experiments, manage OpenTelemetry tracer providers with stack-based attach/detach, and write vitest unit and integration tests. Use when adding features to phoenix-client, debugging experiment lifecycle or provider cleanup, modifying…

Arize-ai/phoenix · 85 tokens

typescript-tooling-migration

Migrate or upgrade TypeScript tooling in the Phoenix monorepo. Use when upgrading TypeScript versions, switching tools (ESLint to oxlint, Prettier to oxfmt), upgrading bundlers (Vite, esbuild), or making major dependency upgrades. Triggers on requests to migrate, upgrade, or replace TypeScript/JavaScript tooling.

Arize-ai/phoenix · 78 tokens

phoenix-sqlean

Maintaining packages/phoenix-sqlean, the vendored fork of nalgeon/sqlean.py published as arize-phoenix-sqlean. Use when bumping the bundled SQLite, sqlean, or xxHash versions, changing its wheel matrix, or touching its publish path. Trigger on any change under packages/phoenix-sqlean/…

Arize-ai/phoenix · 108 tokens

client-setup

Create a vanilla tRPC client with createTRPCClient (), configure link chain with httpBatchLink/httpLink, dynamic headers for auth, transformer on links (not client constructor). Infer types with inferRouterInputs and inferRouterOutputs. AbortController signal support. TRPCClientError typing.

trpc/trpc · 63 tokens