coding-conventions

Standardizes TypeScript authoring, testing and review conventions for Homebridge SoundTouch plugin codebase.

Updated Dec 23, 2024
One-click install
npx skills add https://github.com/forktrucka/homebridge-soundtouch-speaker --skill coding-conventions-forktrucka
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: coding-conventions
Source: https://github.com/forktrucka/homebridge-soundtouch-speaker/tree/main/.claude/skills/coding-conventions
Command: npx skills add https://github.com/forktrucka/homebridge-soundtouch-speaker --skill coding-conventions-forktrucka

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill keeps TypeScript changes aligned with the repository’s working rules so edits do not break Homebridge at runtime, drift from the established code style, or skip the checks required before a change is done.

Core Features & Use Cases

  • TypeScript style guidance: Use the repo’s ESM import rules, static factory method patterns, and source layout conventions when writing or refactoring code.
  • Testing and tooling workflow: Follow the Jest plus SWC test setup, linting, formatting, type checking, and knip checks that gate a clean change.
  • Logging and pull request conventions: Use the repository logger conventions and produce conventional-commit style PR titles and concise PR descriptions.
  • Use case: A developer fixing a bug in a Homebridge accessory can use this Skill to write the patch, add the matching test, and verify the change without violating repository-specific rules.

Quick Start

Read this skill before editing any TypeScript source, test file, or pull request text in this repository.

Frequently Asked Questions about coding-conventions

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

FAQPage Schema
How do I enforce ESM import rules and static factory patterns in TypeScript?

To enforce ESM import rules and static factory patterns in TypeScript, follow repository-specific coding conventions that standardize source layout and authoring rules to keep changes shippable.

How do I set up Jest and SWC for testing in a Homebridge plugin?

Set up Jest and SWC for testing a Homebridge plugin by applying standardized testing conventions that configure the test environment, ensuring TypeScript changes pass required checks before submission.

What is the best way to format pull request titles and descriptions for TypeScript changes?

The best way to format pull request titles and descriptions for TypeScript changes is using conventional commit style titles and concise descriptions, adhering to repository logging and PR conventions.

Do I need ESLint and Prettier to gate TypeScript changes before a pull request?

Yes, you need ESLint and Prettier to gate TypeScript changes before a pull request, running alongside type checking and knip checks to verify formatting, linting, and unused code elimination.

Why does my Homebridge accessory break at runtime after a TypeScript refactor?

Your Homebridge accessory might break at runtime after a TypeScript refactor because the changes drifted from established code style, violated ESM import rules, or skipped required repository checks.