nylegarcia/ai-skills/js-style-guide
Claude Code and agent skill by nylegarcia/ai-skills
Trust tier 3
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
Enforce comprehensive JavaScript/TypeScript coding standards based on the Airbnb JavaScript Style Guide. Use for all JS/TS code reviews, refactoring, or authoring.
Install
npx vskill@latest install nylegarcia/ai-skills/js-style-guideSKILL.md
The same SKILL.md was published earlier as nylegarcia/ai-skills/js-style-guide.
JavaScript Style Guide
Enforce clean, maintainable JS/TS. Apply these rules during code review, authoring, and refactoring.
Core Rules
1. References & Variables
- const/let: Use
constfor all references; avoidvar. Useletonly for reassignment. - Grouping: Group
constdeclarations together, then groupletdeclarations. - Naming:
camelCasefor objects/functions/instances,PascalCasefor classes/constructors,UPPERCASE_SNAKEfor exported constants.
2. Objects & Arrays
- Shorthand: Use object method and property value shorthands.
- Quoting: Only quote properties that are invalid identifiers.
- Copying: Use spread operator
...instead ofObject.assignto shallow-copy objects. - Arrays: Use array spreads
...to copy arrays. UseArray.from()for converting iterables to arrays. - Trailing Commas: Always use trailing commas in multiline object/array literals.
3. Destructuring
- Objects: Prefer object destructuring for accessing multiple properties.
- Arrays: Use array destructuring.
- Returns: Return objects, not arrays, for multiple return values to avoid positional destructuring bugs.
4. Strings
- Quotes: Use single quotes
''for strings. - Templates: Use template literals
\for programmatic string building. Never use string concatenation+`.
5. Functions & Arrow Functions
- Declarations: Use named function expressions instead of function declarations.
- Parameters: Use default parameter syntax rather than mutating arguments.
- Arguments: Never use
arguments, use rest syntax...argsinstead. - Arrow Functions: Use arrow functions for anonymous callbacks. Use implicit return when the body is a single expression.
- Binding: Arrow functions bind
thislexically.
6. Modules
- Syntax: Always use ES6 modules (
import/export). Do not use CommonJSrequire/module.exports. - Wildcards: Do not use wildcard imports (
import * as foo). - Default Exports: Prefer default exports for files containing a single export, named exports for utility files.
7. Classes
- Usage: Always use
class. Avoid direct prototype manipulation. - Inheritance: Use
extendsfor inheritance. - Methods: Methods can return
thisto help with method chaining. CustomtoString()must be safe and have no side effects.
8. Iterators & Control Flow
- Loops: Avoid
for...inandfor...of. Use higher-order functions likemap(),filter(),reduce(),some(),every(). - Equality: Always use
===and!==. Never use==or!=. - Booleans: Use shortcuts for booleans (e.g.,
if (name)instead ofif (name !== '')). - Early Return: Prefer early returns to avoid deep nesting of
ifstatements.
Execution Workflows
Authoring Code
- Verify no
varis used. - Destructure parameters early in function signatures.
- Validate module import/export structure.
- Ensure naming conventions align with the guide.
Code Review (Refactoring)
- Lints: Identify and correct implicit type coercion,
==comparisons, and missing curly braces on blocks. - Modernization: Convert
function() {}to() => {},Object.assignto spreads, and concatenated strings to template literals. - Complexity: Recommend array iteration methods to replace explicit
forloops. Look for early return opportunities.
For edge cases, fall back to the Airbnb JavaScript Style Guide.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugins/web-dev/skills/js-style-guide/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/nylegarcia/ai-skills/js-style-guide)