javascript
Skill15 starsChanged 9 months agoMITView on GitHub
Google's official JavaScript style guide for ES6+. Covers const/let, arrow functions, template literals, destructuring, modules, naming conventions, JSDoc, and formatting. Enforces modern JavaScript patterns and best practices.
11 other projects use a version of this.
Adopted by
Most recently taken up by
- DaraBoth/skilljmskilltheir own version, first seen Nov 8, 2026
- turkeryildirim/ai-skillstheir own version, first seen Nov 1, 2026
- infiniumtek/code-review-agenttheir own version, first seen Oct 25, 2026
- G1Joshi/Agent-Skillstheir own version, first seen Oct 13, 2026
- shreyam1008/shre-skillstheir own version, first seen Oct 9, 2026
- SynchronetBBS/sbbstheir own version, first seen Oct 9, 2026
Used with
Projects with it also use debugging and architecture.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
BlockSkilldebugging
Debugging guidelines and best practices
Also in 3 projects that use this
AnthropicSkillarchitecture
Create or evaluate an architecture decision record (ADR). Use when choosing between technologies (e.g., Kafka vs SQS), documenting a design decision with trade-offs and consequences, reviewing a system design proposal, or designing a new component from requirements and constraints.
Also in 3 projects that use this
Other versions11 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 11
- SynchronetBBS/sbbs★ 115same name
- G1Joshi/Agent-Skills★ 15same name
- DojoCodingLabs/code-sensei★ 14same name
- infiniumtek/code-review-agent★ 4same name
- turkeryildirim/ai-skills★ 4same name
- wewpellex21/code-sensei★ 3same name
- DaraBoth/skilljmskill★ 2same name
- ffsshhttiikk/opencode-agents-skills★ 2same name
- Autocss-com/ai★ 1same name
- discourse/skills★ 1same name
1 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository17 other files it gives its agents.
- angularjsSkill
- common-lispSkill
- cppSkill
- csharpSkill
- goSkill
- html-cssSkill
- javaSkill
- jsonSkill
- markdownSkill
- objective-cSkill
- pythonSkill
- rSkill
- shellSkill
- google-styleguides-skillsSkill
- swiftSkill
- typescriptSkill
- vim-scriptSkill
The file
Files
Google JavaScript Style Guide
Official Google JavaScript coding standards for ES6+ code.
Golden Rules
- Use
constby default —letonly when reassignment needed, nevervar - Arrow functions for callbacks — traditional functions for methods
- Template literals for string interpolation
- Destructuring where it improves readability
- Named exports over default exports
- JSDoc for public APIs — document parameters and return types
- 2-space indentation — consistent formatting
Quick Reference
Naming Conventions
| Element | Convention | Example |
| Classes | UpperCamelCase | UserService |
| Functions/Methods | lowerCamelCase | getUserById |
| Variables | lowerCamelCase | userCount |
| Constants | UPPER_SNAKE_CASE | MAX_SIZE |
| Private fields | #privateField | #userId |
| Files | lower-kebab-case | user-service.js |
Variables
// ✓ CORRECT
const greeting = 'Hello';
let count = 0;
// ✗ INCORRECT
var greeting = 'Hello'; // never use varFunctions
// ✓ CORRECT - arrow functions for callbacks
const double = (x) => x * 2;
array.map(item => item.id);
// ✓ CORRECT - traditional functions for methods
class User {
getName() {
return this.name;
}
}
// ✓ CORRECT - default parameters
function greet(name, greeting = 'Hello') {
return `${greeting}, ${name}!`;
}Strings
// ✓ CORRECT - template literals
const name = 'Alice';
const greeting = `Hello, ${name}!`;
// ✗ INCORRECT
const greeting = 'Hello, ' + name + '!';Destructuring
// ✓ CORRECT - object destructuring
const {id, name} = user;
const {x, y, ...rest} = coordinates;
// ✓ CORRECT - array destructuring
const [first, second] = items;
const [head, ...tail] = list;
// ✓ CORRECT - function parameters
function processUser({id, name, email}) {
// ...
}Modules
// ✓ CORRECT - named exports
export function myFunction() { /* ... */ }
export class MyClass { /* ... */ }
// ✓ CORRECT - named imports
import {myFunction, MyClass} from './my-module.js';
// ✗ INCORRECT - default exports (avoid)
export default function() { /* ... */ }Classes
// ✓ CORRECT
class Animal {
#name; // private field
constructor(name) {
this.#name = name;
}
speak() {
return `${this.#name} makes a sound.`;
}
}JSDoc
/**
* Fetches user data from the API.
* @param {number} userId - The user ID to fetch.
* @param {Object} options - Optional configuration.
* @param {number} options.timeout - Request timeout in ms.
* @return {Promise<Object>} The user data.
*/
function fetchUser(userId, {timeout = 5000} = {}) {
// ...
}Promises and Async/Await
// ✓ CORRECT - async/await
async function fetchUser(id) {
const response = await fetch(`/api/users/${id}`);
if (!response.ok) {
throw new Error(`HTTP error: ${response.status}`);
}
return response.json();
}
// ✓ CORRECT - error handling
try {
const user = await fetchUser(1);
} catch (error) {
console.error('Failed to fetch user:', error);
}Common Mistakes
| Mistake | Correct Approach |
Using var | Use const / let |
| String concatenation | Use template literals |
| Default exports | Use named exports |
| Missing JSDoc | Document public APIs |
| Traditional functions for callbacks | Use arrow functions |
| Ignoring destructuring | Use where it helps readability |
When to Use This Guide
- Writing new JavaScript code
- Refactoring existing JavaScript
- Code reviews
- Setting up ESLint rules
- Onboarding new team members
Install
npx skills add testdino-hq/google-styleguides-skills/javascriptFull Guide
See javascript.md for complete details, examples, and edge cases.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

