js-google by pproenca/dot-skills
npx skills add https://github.com/pproenca/dot-skills --skill js-google基于 Google 官方 JavaScript 风格指南的综合性 JavaScript 风格与最佳实践指南,专为 AI 代理和 LLM 设计。包含 8 个类别共 47 条规则,按影响优先级排序,以指导自动化重构和代码生成。
在以下情况下参考这些指南:
| 优先级 | 类别 | 影响 | 前缀 |
|---|---|---|---|
| 1 | 模块系统与导入 | 关键 | module- |
| 2 | 语言特性 | 关键 | lang- |
| 3 | 类型安全与 JSDoc | 高 |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
type-| 4 | 命名约定 | 高 | naming- |
| 5 | 控制流与错误处理 | 中高 | control- |
| 6 | 函数与参数 | 中 | func- |
| 7 | 对象与数组 | 中 | data- |
| 8 | 格式与风格 | 低 | format- |
module-avoid-circular-dependencies - 防止因循环导入导致的加载失败module-file-extension-in-imports - 在导入路径中包含 .js 扩展名module-named-exports-over-default - 为保持一致性,优先使用命名导出module-no-duplicate-imports - 同一文件仅导入一次module-no-import-aliasing - 保持原始导出名称module-source-file-structure - 遵循标准文件结构顺序lang-const-over-let-over-var - 默认使用 const,永不使用 varlang-es6-classes-over-prototypes - 使用 class 语法而非原型操作lang-explicit-semicolons - 始终使用显式分号lang-no-eval - 永不使用 eval 或 Function 构造函数lang-no-modify-builtins - 永不修改内置原型lang-no-non-standard-features - 仅使用标准 ECMAScript 特性lang-no-primitive-wrappers - 永不使用原始包装器对象lang-no-with-statement - 永不使用 with 语句type-cast-with-parentheses - 使用括号进行类型转换type-enum-annotations - 使用静态字面量值注解枚举type-explicit-nullability - 使用显式的可空性修饰符type-jsdoc-required-for-exports - 导出的函数必须包含 JSDoctype-template-parameters - 始终指定模板参数type-typedef-for-complex-types - 对复杂对象类型使用 typedefnaming-constant-case-for-constants - 对不可变值使用 CONSTANT_CASEnaming-descriptive-over-brief - 优先使用描述性名称而非简短名称naming-file-naming-conventions - 使用小写字母加连字符或下划线naming-lowercamelcase-for-methods - 对方法和变量使用 lowerCamelCasenaming-no-dollar-prefix - 避免在标识符中使用美元符号前缀naming-uppercamelcase-for-classes - 对类使用 UpperCamelCasecontrol-comment-empty-catch - 为空的 catch 块添加注释control-for-of-over-for-in - 优先使用 for-of 而非 for-incontrol-strict-equality - 除 null 检查外,使用严格相等control-switch-default-last - switch 语句始终包含 default 分支control-throw-error-objects - 始终抛出 Error 对象func-arrow-functions-for-nested - 对嵌套函数优先使用箭头函数func-arrow-parentheses - 箭头函数参数始终使用括号func-default-parameters - 使用默认参数而非条件判断func-rest-parameters-over-arguments - 使用 rest 参数而非 argumentsfunc-spread-over-apply - 使用展开运算符而非 applydata-array-literals-over-constructor - 使用数组字面量而非 Array 构造函数data-destructuring-for-multiple-values - 对多个属性使用解构赋值data-no-mixing-quoted-unquoted-keys - 永不混合使用带引号和不带引号的键data-object-literals-over-constructor - 使用对象字面量而非构造函数data-spread-over-concat-slice - 使用展开运算符而非 concat 和 slicedata-trailing-commas - 在多行字面量中使用尾随逗号format-braces-required - 控制结构始终使用大括号format-column-limit - 行长度限制为 80 个字符format-one-statement-per-line - 每行放置一条语句format-single-quotes - 字符串字面量使用单引号format-two-space-indent - 使用两个空格的缩进阅读各个参考文件以获取详细解释和代码示例:
如需包含所有规则的完整编译指南,请参阅 AGENTS.md。
| 文件 | 描述 |
|---|---|
| AGENTS.md | 包含所有规则的完整编译指南 |
| references/_sections.md | 类别定义和排序 |
| assets/templates/_template.md | 新规则模板 |
| metadata.json | 版本和参考信息 |
每周安装数
87
仓库
GitHub 星标数
86
首次出现
2026年1月22日
安全审计
安装于
gemini-cli76
codex75
opencode73
claude-code71
cursor71
github-copilot69
Comprehensive JavaScript style and best practices guide based on Google's official JavaScript Style Guide, designed for AI agents and LLMs. Contains 47 rules across 8 categories, prioritized by impact to guide automated refactoring and code generation.
Reference these guidelines when:
| Priority | Category | Impact | Prefix |
|---|---|---|---|
| 1 | Module System & Imports | CRITICAL | module- |
| 2 | Language Features | CRITICAL | lang- |
| 3 | Type Safety & JSDoc | HIGH | type- |
| 4 | Naming Conventions | HIGH | naming- |
| 5 | Control Flow & Error Handling | MEDIUM-HIGH | control- |
| 6 | Functions & Parameters | MEDIUM | func- |
| 7 | Objects & Arrays | MEDIUM | data- |
| 8 | Formatting & Style | LOW | format- |
module-avoid-circular-dependencies - Prevent loading failures from circular importsmodule-file-extension-in-imports - Include .js extension in import pathsmodule-named-exports-over-default - Prefer named exports for consistencymodule-no-duplicate-imports - Import from same file only oncemodule-no-import-aliasing - Keep original export nameslang-const-over-let-over-var - Use const by default, never varlang-es6-classes-over-prototypes - Use class syntax over prototype manipulationlang-explicit-semicolons - Always use explicit semicolonslang-no-eval - Never use eval or Function constructorlang-no-modify-builtins - Never modify built-in prototypestype-cast-with-parentheses - Use parentheses for type caststype-enum-annotations - Annotate enums with static literal valuestype-explicit-nullability - Use explicit nullability modifierstype-jsdoc-required-for-exports - Require JSDoc for exported functionstype-template-parameters - Always specify template parametersnaming-constant-case-for-constants - Use CONSTANT_CASE for immutable valuesnaming-descriptive-over-brief - Prefer descriptive names over brevitynaming-file-naming-conventions - Use lowercase with dashes or underscoresnaming-lowercamelcase-for-methods - Use lowerCamelCase for methods and variablesnaming-no-dollar-prefix - Avoid dollar sign prefix in identifierscontrol-comment-empty-catch - Document empty catch blockscontrol-for-of-over-for-in - Prefer for-of over for-incontrol-strict-equality - Use strict equality except for null checkscontrol-switch-default-last - Always include default case in switchcontrol-throw-error-objects - Always throw Error objectsfunc-arrow-functions-for-nested - Prefer arrow functions for nested functionsfunc-arrow-parentheses - Always use parentheses around arrow paramsfunc-default-parameters - Use default parameters instead of conditionalsfunc-rest-parameters-over-arguments - Use rest parameters over argumentsfunc-spread-over-apply - Use spread operator instead of applydata-array-literals-over-constructor - Use array literals over Array constructordata-destructuring-for-multiple-values - Use destructuring for multiple propertiesdata-no-mixing-quoted-unquoted-keys - Never mix quoted and unquoted keysdata-object-literals-over-constructor - Use object literals over constructordata-spread-over-concat-slice - Use spread over concat and sliceformat-braces-required - Always use braces for control structuresformat-column-limit - Limit lines to 80 charactersformat-one-statement-per-line - Place one statement per lineformat-single-quotes - Use single quotes for string literalsformat-two-space-indent - Use two-space indentationRead individual reference files for detailed explanations and code examples:
For a complete compiled guide with all rules, see AGENTS.md.
| 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
87
Repository
GitHub Stars
86
First Seen
Jan 22, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
gemini-cli76
codex75
opencode73
claude-code71
cursor71
github-copilot69
AI 代码实施计划编写技能 | 自动化开发任务分解与 TDD 流程规划工具
49,800 周安装
module-source-file-structurelang-no-non-standard-featureslang-no-primitive-wrappers - Never use primitive wrapper objectslang-no-with-statement - Never use the with statementtype-typedef-for-complex-typesnaming-uppercamelcase-for-classes