ts-google by pproenca/dot-skills
npx skills add https://github.com/pproenca/dot-skills --skill ts-google基于 Google 内部标准的全面 TypeScript 风格指南,专为 AI 智能体和 LLM 设计。包含 8 个类别共 45 条规则,按影响优先级排序,以指导自动化重构和代码生成。
在以下情况下参考这些指南:
| 优先级 | 类别 | 影响 | 前缀 |
|---|---|---|---|
| 1 | 模块组织 | 关键 | module- |
| 2 | 类型安全 | 关键 | types- |
| 3 | 类设计 | 高 |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
class-| 4 | 函数模式 | 高 | func- |
| 5 | 控制流 | 中-高 | control- |
| 6 | 错误处理 | 中 | error- |
| 7 | 命名与风格 | 中 | naming- |
| 8 | 字面量与强制转换 | 低-中 | literal- |
module-named-exports - 优先使用命名导出而非默认导出module-no-mutable-exports - 避免可变导出module-es6-modules - 仅使用 ES6 模块module-no-namespaces - 避免使用 TypeScript 命名空间module-import-paths - 对项目导入使用相对路径module-import-type - 对仅类型导入使用 import typemodule-export-api-surface - 最小化导出的 API 表面types-no-any - 绝不使用 any 类型types-prefer-interfaces - 对于对象,优先使用接口而非类型别名types-explicit-structural - 显式注解结构类型types-nullable-patterns - 正确处理可空类型types-array-syntax - 使用一致的数组类型语法types-no-wrapper-types - 绝不使用包装对象类型types-prefer-map-set - 优先使用 Map 和 Set 而非索引签名types-no-empty-object - 避免空对象类型class-parameter-properties - 对构造函数赋值使用参数属性class-readonly-properties - 对于从不重新赋值的属性,标记为 readonlyclass-no-private-fields - 使用 TypeScript 的 private 而非私有字段class-no-static-containers - 避免仅包含静态成员的容器类class-constructor-parens - 在构造函数调用中始终使用括号class-no-prototype-manipulation - 绝不直接操作原型func-declarations-over-expressions - 优先使用函数声明而非函数表达式func-arrow-concise-bodies - 适当地使用简洁箭头函数体func-avoid-this-rebinding - 避免重新绑定 thisfunc-rest-parameters - 使用剩余参数而非 argumentsfunc-generator-syntax - 使用正确的生成器函数语法func-default-parameters - 谨慎使用默认参数control-always-use-braces - 控制结构始终使用大括号control-triple-equals - 始终使用三等号control-for-of-iteration - 对于数组,优先使用 for-of 而非 for-incontrol-switch-default - switch 语句始终包含 default 分支control-no-assignment-in-condition - 避免在条件表达式中赋值error-throw-errors - 始终抛出 Error 实例error-catch-unknown - 将 catch 子句变量类型设为 unknownerror-empty-catch-comments - 记录空的 catch 块error-avoid-assertions - 避免类型断言和非空断言naming-identifier-styles - 使用正确的标识符命名风格naming-descriptive-names - 使用描述性名称naming-no-decorative-underscores - 避免装饰性下划线naming-no-interface-prefix - 接口不加 I 前缀naming-constants - 对于真正的常量使用 CONSTANT_CASEliteral-single-quotes - 字符串使用单引号literal-number-formats - 使用正确的数字字面量格式literal-explicit-coercion - 使用显式类型强制转换literal-array-constructor - 避免使用 Array 构造函数阅读各个参考文件以获取详细解释和代码示例:
| 文件 | 描述 |
|---|---|
| AGENTS.md | 包含所有规则的完整编译指南 |
| references/_sections.md | 类别定义和排序 |
| assets/templates/_template.md | 新规则模板 |
| metadata.json | 版本和参考信息 |
每周安装量
121
代码仓库
GitHub 星标数
86
首次出现
2026年1月22日
安全审计
已安装于
codex107
gemini-cli106
opencode103
cursor99
github-copilot98
claude-code90
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.
Reference these guidelines when:
| 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- |
module-named-exports - Use named exports over default exportsmodule-no-mutable-exports - Avoid mutable exportsmodule-es6-modules - Use ES6 modules exclusivelymodule-no-namespaces - Avoid TypeScript namespacesmodule-import-paths - Use relative paths for project importsmodule-import-type - Use import type for type-only importstypes-no-any - Never use the any typetypes-prefer-interfaces - Prefer interfaces over type aliases for objectstypes-explicit-structural - Explicitly annotate structural typestypes-nullable-patterns - Handle nullable types correctlytypes-array-syntax - Use consistent array type syntaxtypes-no-wrapper-types - Never use wrapper object typesclass-parameter-properties - Use parameter properties for constructor assignmentclass-readonly-properties - Mark properties readonly when never reassignedclass-no-private-fields - Use TypeScript private over private fieldsclass-no-static-containers - Avoid container classes with only static membersclass-constructor-parens - Always use parentheses in constructor callsfunc-declarations-over-expressions - Prefer function declarations over expressionsfunc-arrow-concise-bodies - Use concise arrow function bodies appropriatelyfunc-avoid-this-rebinding - Avoid rebinding thisfunc-rest-parameters - Use rest parameters over argumentsfunc-generator-syntax - Use correct generator function syntaxcontrol-always-use-braces - Always use braces for control structurescontrol-triple-equals - Always use triple equalscontrol-for-of-iteration - Prefer for-of over for-in for arrayscontrol-switch-default - Always include default case in switchcontrol-no-assignment-in-condition - Avoid assignment in conditional expressionserror-throw-errors - Always throw Error instanceserror-catch-unknown - Type catch clause variables as unknownerror-empty-catch-comments - Document empty catch blockserror-avoid-assertions - Avoid type and non-null assertionsnaming-identifier-styles - Use correct identifier naming stylesnaming-descriptive-names - Use descriptive namesnaming-no-decorative-underscores - Avoid decorative underscoresnaming-no-interface-prefix - No I prefix for interfacesnaming-constants - Use CONSTANT_CASE for true constantsliteral-single-quotes - Use single quotes for stringsliteral-number-formats - Use correct number literal formatsliteral-explicit-coercion - Use explicit type coercionliteral-array-constructor - Avoid Array constructorRead individual reference files for detailed explanations and code examples:
| 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 |
Weekly Installs
121
Repository
GitHub Stars
86
First Seen
Jan 22, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
codex107
gemini-cli106
opencode103
cursor99
github-copilot98
claude-code90
Skills CLI 使用指南:AI Agent 技能包管理器安装与管理教程
40,000 周安装
Unsloth开发助手 - 基于官方文档的AI模型微调与代码生成技能
228 周安装
Git变更日志生成器:自动将技术提交转为用户友好的发布说明和更新摘要
226 周安装
TensorRT-LLM:NVIDIA GPU大语言模型推理优化库,实现24K tokens/秒超高吞吐量
228 周安装
Telegram Mini App开发指南:集成TON区块链、Web App API与React框架构建应用
229 周安装
临床决策支持(CDS)文档生成工具 - 制药研发与循证医学指南
230 周安装
Amazon产品查找器 - 为联盟营销快速寻找最佳亚马逊产品的AI工具
230 周安装
module-export-api-surface - Minimize exported API surfacetypes-prefer-map-set - Prefer Map and Set over index signaturestypes-no-empty-object - Avoid empty object typeclass-no-prototype-manipulationfunc-default-parameters