Agent Skills: Google TypeScript Best Practices

Google TypeScript style guide for writing clean, consistent, type-safe code. This skill should be used when writing, reviewing, or refactoring TypeScript code. Triggers on TypeScript files, type annotations, module imports, class design, and code style decisions.

UncategorizedID: pproenca/dot-skills/ts-google

Install this agent skill to your local

pnpm dlx add-skill https://github.com/pproenca/dot-skills/tree/HEAD/skills/.experimental/ts-google

Skill Files

Browse the full folder contents for ts-google.

Download Skill

Loading file tree…

skills/.experimental/ts-google/SKILL.md

Skill Metadata

Name
ts-google
Description
Google TypeScript style guide for writing clean, consistent, type-safe code. This skill should be used when writing, reviewing, or refactoring TypeScript code. Triggers on TypeScript files, type annotations, module imports, class design, and code style decisions.

Google TypeScript Best Practices

Comprehensive TypeScript style guide based on Google's internal standards, designed for AI agents and LLMs. Contains 45 rules across 8 categories, prioritized by impact to guide automated refactoring and code generation.

When to Apply

Reference these guidelines when:

  • Writing new TypeScript code
  • Organizing modules and imports
  • Designing type annotations and interfaces
  • Creating classes and functions
  • Reviewing code for style consistency
  • Refactoring existing TypeScript code

Rule Categories by Priority

| Priority | Category | Impact | Prefix | |----------|----------|--------|--------| | 1 | Module Organization | CRITICAL | module- | | 2 | Type Safety | CRITICAL | types- | | 3 | Class Design | HIGH | class- | | 4 | Function Patterns | HIGH | func- | | 5 | Control Flow | MEDIUM-HIGH | control- | | 6 | Error Handling | MEDIUM | error- | | 7 | Naming & Style | MEDIUM | naming- | | 8 | Literals & Coercion | LOW-MEDIUM | literal- |

Quick Reference

1. Module Organization (CRITICAL)

2. Type Safety (CRITICAL)

3. Class Design (HIGH)

4. Function Patterns (HIGH)

5. Control Flow (MEDIUM-HIGH)

6. Error Handling (MEDIUM)

7. Naming & Style (MEDIUM)

8. Literals & Coercion (LOW-MEDIUM)

How to Use

Read individual reference files for detailed explanations and code examples:

Reference Files

| File | Description | |------|-------------| | AGENTS.md | Complete compiled guide with all rules | | references/_sections.md | Category definitions and ordering | | assets/templates/_template.md | Template for new rules | | metadata.json | Version and reference information |