Skip to content
Agentmart
Submit a tool

google-style-ts

Auto-attaches when JS/TS files are touched.

Skill by drumfiend21

IndexedApache-2.0
Write a review

Chalk Labs

Need help deploying google-style-ts?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/drumfiend21-google-style-ts

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

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.

Use cases: writing

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/google-style-ts

What's inside

Skill name
google-style-ts
Description
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.
License
Apache-2.0
Instructions
72 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# Google JavaScript / TypeScript style — applied rules

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-*`).

## Required patterns (must do)

- `const` by default, `let` only when reassignment is needed; **never** `var`. ([RUBRIC g-ts-003](../../rubric/RUBRIC.yaml), [jsguide#features-use-const-and-let](https://google.github.io/styleguide/jsguide.html#features-use-const-and-let))
- One variable per declaration: `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](../../rubric/RUBRIC.yaml), [tsguide#equality-checks](https://google.github.io/styleguide/tsguide.html#equality-checks))
- Throw `new Error(...)` (or a subclass) only — never strings, never plain objects. Always include `new`. ([g-ts-009](../../rubric/RUBRIC.yaml))
- `catch (e: unknown)`, narrow via `instanceof Error`. Empty `catch` blocks must carry a comment explaining why.
- Function declarations for named functions (`function foo() {}`); arrow functions for callbacks and expressions.
- `for…of` for arrays; `for…in` only on dict objects with a `hasOwnProperty` guard.
- Mark unchanged class fields `readonly`; prefer parameter properties: `constructor(private readonly svc: Svc) {}`.
- Initialize fields at declaration when possible.

## Forbidden patterns (must not do)

- `var`, `with`, `eval`, `new Function(string)`, `debugger;` in production code. ([g-ts-003, g-ts-004, g-ts-010](../../rubric/RUBRIC.yaml))
- `const enum`, `#privateField`, `public` modifier (except on parameter properties), `obj['foo']` to bypass visibility.
- Prototype manipulation, mixins, monkey-patching builtins.
- `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`.
- Default exports — always use named exports. ([g-ts-002](../../rubric/RUBRIC.yaml))
- `any` without an explicit suppression comment justifying it. Prefer `unknown` and narrow. ([g-ts-006](../../rubric/RUBRIC.yaml))
- Wrapper types `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`.
- Non-null assertion `!` without a justifying comment.

## Naming (g-ts-001)

| 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.

## Imports

- Use modules, not namespaces. No `///<reference>`, no `namespace Foo {}`.
- Named exports only (`export class Foo {}`); no `export default`.
- Type-only imports: `import type {Foo} from './foo';` or inline `import {type Foo, Bar} from './foo';`.
- Relative paths for same-project files; minimize `../../..`.

## Comments / JSDoc

- `/** … */` for documentation; `//` for implementation comments.
- Document every top-level export of a module. ([g-ts-011](../../rubric/RUBRIC.yaml))
- No type annotations in TS JSDoc (`@param {string}`, `@implements`, `@private`, `@override`, `@enum` — TypeScript syntax already conveys it).
- Method descriptions start with a third-person verb: "Computes…", "Returns…".

## Formatting (g-ts-012, delegated to Prettier with the Google preset)

2-space indent, 80-col wrap, single quotes, semicolons required, K&R braces, trailing commas where the closing bracket is on its own line.

## When you write or edit code

1. **Cite rule IDs** in the commit message body when you make a non-trivial style choice (e.g. "named export per g-ts-002").
2. **If you must violate** a rule (e.g. test fixture needs `any`), include a comment on the offending line: `// SUPPRESS g-ts-006: <reason>`.
3. **Run `bash rubric/runner.sh --diff --md`** before declaring done; resolve P0 findings, address P1 findings or justify them.
4. **Refuse changes that bundle reformatting + logic** — split into a pure-format CL first per Google eng-practices.

From drumfiend21/claude-tdd-pro, Apache-2.0.

More from drumfiend21/claude-tdd-pro

Signals

Stars
0
Forks
0
Open issues
0
Last commit (this folder)
May 4, 2026 (6 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
Apache-2.0
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from drumfiend21

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get google-style-ts running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying google-style-ts?

CallGet help
Cite this page

google-style-ts skill. Agent Mart. https://agentmart.dev/skills/drumfiend21-google-style-ts (last updated 2026-10-24)