본문으로 건너뛰기
Skillpedia
일반 코딩41k · #6713

modern-javascript-patterns

하는 일

이 안내서는 최신 버전의 JavaScript(ES6 이상)를 사용해 더 깔끔하고 빠르며 이해하기 쉬운 코드를 쓰는 방법을 설명합니다. 'async/await'와 '구조 분해 할당' 같은 기능을 다룹니다.

사용하는 경우

  • ✓오래된 JavaScript 코드가 있고 이를 업데이트하고 싶을 때.
  • ✓더 체계적이고 읽기 쉬운 코드를 쓰고 싶을 때.
  • ✓인터넷에서 데이터를 가져오는 것처럼 시간이 오래 걸리는 작업을 처리해야 할 때.

스킬 링크

https://github.com/wshobson/agents/blob/main/plugins/javascript-typescript/skills/modern-javascript-patterns/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/wshobson/agents/blob/main/plugins/javascript-typescript/skills/modern-javascript-patterns/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“이 오래된 JavaScript 코드를 최신 기능을 쓰도록 어떻게 업데이트할 수 있나요?”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

AI는 안내서의 모범 사례와 예시를 사용해 코드를 다시 쓰는 방법을 보여줍니다. 새로운 JavaScript 기능을 써서 코드를 더 효율적이고 읽기 쉽게 만드는 데 중점을 둡니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Modern JavaScript Patterns

Comprehensive guide for mastering modern JavaScript (ES6+) features, functional programming patterns, and best practices for writing clean, maintainable, and performant code.

When to Use This Skill

  • Refactoring legacy JavaScript to modern syntax
  • Implementing functional programming patterns
  • Optimizing JavaScript performance
  • Writing maintainable and readable code
  • Working with asynchronous operations
  • Building modern web applications
  • Migrating from callbacks to Promises/async-await
  • Implementing data transformation pipelines

Detailed patterns and worked examples

Detailed pattern documentation lives in references/details.md. Read that file when the navigation tier above is insufficient.

Best Practices

  1. Use const by default: Only use let when reassignment is needed
  2. Prefer arrow functions: Especially for callbacks
  3. Use template literals: Instead of string concatenation
  4. Destructure objects and arrays: For cleaner code
  5. Use async/await: Instead of Promise chains
  6. Avoid mutating data: Use spread operator and array methods
  7. Use optional chaining: Prevent "Cannot read property of undefined"
  8. Use nullish coalescing: For default values
  9. Prefer array methods: Over traditional loops
  10. Use modules: For better code organization
  11. Write pure functions: Easier to test and reason about
  12. Use meaningful variable names: Self-documenting code
  13. Keep functions small: Single responsibility principle
  14. Handle errors properly: Use try/catch with async/await
  15. Use strict mode: 'use strict' for better error catching

For common pitfalls (this binding, promise anti-patterns, memory leaks), see references/advanced-patterns.md.

자주 묻는 질문

'ES6+'란 무엇인가요?

JavaScript 언어의 최신 버전들입니다. 프로그래머의 작업을 쉽게 만드는 많은 개선과 새 기능을 담고 있습니다.

'async/await'란 무엇인가요?

인터넷에서 정보를 내려받는 것처럼 시간이 걸리는 작업을, 프로그램의 나머지가 멈추지 않도록 처리하는 더 간단한 방법입니다.

'코드 리팩터링'은 무슨 뜻인가요?

동작은 바꾸지 않고 기존 코드를 더 좋게 다시 쓰는 것입니다. 가구를 옮기지 않고 집을 정리하는 것과 비슷합니다.

상세 정보

작성자의 원본 설명

Master ES6+ features including async/await, destructuring, spread operators, arrow functions, promises, modules, iterators, generators, and functional programming patterns for writing clean, efficient JavaScript code. Use when refactoring legacy code, implementing modern patterns, or optimizing JavaScript applications.

repo: wshobson/agents

인기도

GitHub 스타
41k
순위
#6713
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬