From claude-tdd-pro
Auto-attaches when JS/TS files are touched. Injects the Google JavaScript and TypeScript style rules — naming, formatting, imports, types, JSDoc, required and forbidden patterns — so generated and edited code is born-compliant. Cites RUBRIC.yaml IDs and Google's published style guide anchors. Use this whenever writing or modifying .ts/.tsx/.js/.jsx code.
How this skill is triggered — by the user, by Claude, or both
Slash command
/claude-tdd-pro:google-style-ts**/*.ts**/*.tsx**/*.js**/*.jsx**/*.mjs**/*.cjsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
You are editing JS/TS code. Every line you write must satisfy the
You are editing JS/TS code. Every line you write must satisfy the
Google JavaScript Style Guide and the Google TypeScript Style Guide.
The full extract is in docs/standards/google-js-ts-style.md. The
machine-checkable subset is in rubric/RUBRIC.yaml (rules g-ts-*).
const by default, let only when reassignment is needed; never var. (RUBRIC g-ts-003, jsguide#features-use-const-and-let)let a = 1; let b = 2; not let a = 1, b = 2;.=== and !== always; the only exception is == null to catch both null and undefined. (g-ts-005, tsguide#equality-checks)new Error(...) (or a subclass) only — never strings, never plain objects. Always include new. (g-ts-009)catch (e: unknown), narrow via instanceof Error. Empty catch blocks must carry a comment explaining why.function foo() {}); arrow functions for callbacks and expressions.for…of for arrays; for…in only on dict objects with a hasOwnProperty guard.readonly; prefer parameter properties: constructor(private readonly svc: Svc) {}.var, with, eval, new Function(string), debugger; in production code. (g-ts-003, g-ts-004, g-ts-010)const enum, #privateField, public modifier (except on parameter properties), obj['foo'] to bypass visibility.new String/Boolean/Number/Symbol wrapper instantiations.Array(x1, x2, x3) constructor — use [x1, x2, x3].+x unary plus or parseInt(x) for base-10 — use Number(x) + isFinite.any without an explicit suppression comment justifying it. Prefer unknown and narrow. (g-ts-006)String, Boolean, Number, Object — use lowercase primitives.|undefined in type aliases — use ? optional fields.<Foo>x type assertion syntax — use x as Foo. Double-assert via unknown.! without a justifying comment.| Kind | Style | Example |
|---|---|---|
| Class / interface / type / enum / decorator / type-param | UpperCamelCase | class Request, interface Readable |
| Variable / parameter / function / method / property / module alias | lowerCamelCase | sendMessage, customerId |
| Module-level immutable constants and enum members | CONSTANT_CASE | const MAX_RETRIES = 3 |
| TS file names | snake_case | import * as fooBar from './foo_bar' |
| Acronyms in identifiers | Treat as words | loadHttpUrl, not loadHTTPURL |
No _ prefix or suffix; no IFoo Hungarian; no $ prefix (except framework requirements); one-letter names only in scopes ≤10 lines.
///<reference>, no namespace Foo {}.export class Foo {}); no export default.import type {Foo} from './foo'; or inline import {type Foo, Bar} from './foo';.../../.../** … */ for documentation; // for implementation comments.@param {string}, @implements, @private, @override, @enum — TypeScript syntax already conveys it).2-space indent, 80-col wrap, single quotes, semicolons required, K&R braces, trailing commas where the closing bracket is on its own line.
any), include a comment on the offending line: // SUPPRESS g-ts-006: <reason>.bash rubric/runner.sh --diff --md before declaring done; resolve P0 findings, address P1 findings or justify them.npx claudepluginhub drumfiend21/claude-tdd-proOffers UI/UX design guidance for web and mobile with 50+ styles, 161 color palettes, 57 font pairings, and 99 UX guidelines across 10 stacks. Use for designing pages, components, color systems, or reviewing UI code.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.