dxos-code-style

Guides DXOS TypeScript code to follow repository conventions and refactoring standards.

Updated Apr 21, 2026
One-click install
npx skills add https://github.com/dxos/plugins --skill dxos-code-style
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dxos-code-style
Source: https://github.com/dxos/plugins/tree/main/.agents/skills/code-style
Command: npx skills add https://github.com/dxos/plugins --skill dxos-code-style

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps DXOS contributors write and refactor TypeScript in a way that matches the monorepo’s conventions, reducing churn from style mismatches, unsafe casts, noisy comments, and brittle tests.

Core Features & Use Cases

  • Namespace-export structure: Organize packages around capitalized modules, namespace re-exports, and internal barrels so public APIs stay consistent.
  • Type and API conventions: Apply DXOS patterns for options bags, overloads, member ordering, and internal imports.
  • Safety and clarity rules: Avoid cast-based type escapes, suppressing unhandled errors, and over-explained comments.
  • Testing guidance: Place tests near modules, prefer public seams, and structure suites for maintainability.

Quick Start

Use the dxos-code-style skill to review this TypeScript change and rewrite it so it follows DXOS namespace exports, type safety, comment, and testing conventions.

Frequently Asked Questions about dxos-code-style

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure TypeScript namespace exports in a monorepo?

TypeScript namespace exports in a monorepo are structured by organizing packages around capitalized modules, namespace re-exports, and internal barrels to keep public APIs consistent and reduce refactoring churn.

What are the TypeScript type safety conventions for avoiding casts and suppressions?

Type safety conventions enforce no-cast and no-suppress rules to prevent unsafe type escapes and unhandled errors, applying options bags and overloads instead of bypassing the type checker.

How do I organize tests near modules in a TypeScript monorepo?

Organizing tests near modules involves placing test files alongside their source and preferring public seams, structuring suites for maintainability and reducing brittleness during refactoring.

Does this DXOS code style guide apply to package structure and internal imports?

Yes, the DXOS code style guide applies to package structure, internal module imports, type signatures, comments, and test organization, aligning TypeScript authoring with repository conventions.

What is the best way to write concise rationale-driven comments in TypeScript?

Concise rationale-driven comments avoid over-explanation by focusing on decision reasoning rather than restating code, enforcing meaningful documentation that supports safe refactoring without noise.