coding-standards

Enforce TypeScript coding standards across repository edits.

Updated Jan 20, 2025
One-click install
npx skills add https://github.com/Nosto/web-components --skill coding-standards-nosto
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: coding-standards
Source: https://github.com/Nosto/web-components/tree/main/.agents/skills/coding-standards
Command: npx skills add https://github.com/Nosto/web-components --skill coding-standards-nosto

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

TypeScript code quality and consistency across the repository to reduce bugs and maintenance effort.

Core Features & Use Cases

  • Enforce closures over classes for instance logic, with explicit # private methods where appropriate
  • Favor type inference and utility types to derive types from constants
  • Avoid any and ensure strong type-safety across edits
  • Prefer named exports over bulk or default exports to improve code clarity
  • Apply consistent style during code reviews and automated linters

Quick Start

Review and apply the repository's TypeScript coding standards when editing files.

Frequently Asked Questions about coding-standards

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

FAQPage Schema
How do I enforce TypeScript coding standards across my repository?

You can enforce TypeScript coding standards by applying documented rules to all edits targeting *.ts and *.tsx files, ensuring contributors adhere to practices like closures over classes, explicit typing, and consistent exports to maintain a high-quality codebase.

What's the best way to avoid any and ensure strong type-safety in TypeScript?

To ensure strong type-safety and avoid any, favor TypeScript's type inference and utility types to derive types from constants, and enforce explicit typing rules across all repository edits to guide contributors and reviews.

Should I use classes or closures for instance logic in TypeScript?

TypeScript coding standards recommend enforcing closures over classes for instance logic, utilizing explicit private methods where appropriate, to reduce bugs and maintenance effort across the codebase.

Does this coding standards skill apply to both .ts and .tsx files?

Yes, the coding standards apply to all TypeScript files across the repository, specifically targeting both *.ts and *.tsx file extensions to guide contributors and reviews during code edits.

Why prefer named exports over default exports in a TypeScript codebase?

Preferring named exports over bulk or default exports improves code clarity and consistency, which helps enforce TypeScript standards across the repository and reduces maintenance effort.

Can I use this skill to guide code reviews and automated linting?

Yes, you can apply the documented TypeScript coding standards during code reviews and automated linting to maintain consistent style and enforce rules like type inference and avoiding any across edits.