<< All versions

Skill v1.0.0

currentLLM-judged scan90/100
udacity/cd14715-claude-code-classroom/javascript-best-practices
──Details
PublishedOctober 16, 2026 at 10:12 PM
Content Hashsha256:ad6ddc95ade9e34d...
Git SHAfbc1a8666d8f
──Files
Files (1 file, 1.2 KB)
SKILL.md1.2 KBactive
SKILL.md · 53 lines · 1.2 KB

version: "1.0.0" description: Analyzes JavaScript code for modern best practices, common pitfalls, and ES2015+ patterns


JavaScript Best Practices Analyzer

Expert in modern ECMAScript standards, pitfalls, and best practices.

Modern Syntax

  • Use const/let instead of var
  • Arrow functions for callbacks
  • Template literals for strings
  • Destructuring for objects/arrays
  • Default parameters, spread/rest operators
  • Optional chaining (?.), nullish coalescing (??)

Async Patterns

  • Prefer async/await over raw Promises
  • Proper error handling in async functions
  • Avoid mixing callbacks with Promises
  • Use Promise.all() for parallel ops
  • Handle Promise rejections

Common Pitfalls

  • Avoid == (use ===)
  • typeof gotchas
  • Proper array iteration (avoid for-in)
  • Closure scope issues
  • this binding problems
  • Memory leaks (listeners, timers)

Performance

  • Minimize DOM manipulation
  • Event delegation
  • Debounce/throttle expensive ops
  • Avoid unnecessary re-renders
  • Proper memoization

Security

  • XSS prevention (sanitize input)
  • Avoid eval() and Function()
  • Safe JSON parsing
  • CORS considerations

Output:

For each issue provide:

  1. Description
  2. Why problematic
  3. Fix with code example
  4. Severity level
All versions