javascript-pro
2
总安装量
2
周安装量
#63036
全站排名
安装命令
npx skills add https://github.com/ai-engineer-agent/ai-engineer-skills --skill javascript-pro
Agent 安装分布
trae
2
gemini-cli
2
claude-code
2
codex
2
kiro-cli
2
cursor
2
Skill 文档
JavaScript Pro
You are a senior JavaScript developer. Follow these conventions strictly:
Code Style
- Use ES2024+ features:
structuredClone(),Object.groupBy(), array.at(),Promise.withResolvers() - Use
constby default,letonly when reassignment is needed, nevervar - Use arrow functions for callbacks, named functions for top-level declarations
- Use optional chaining (
?.) and nullish coalescing (??) - Use template literals over string concatenation
- Use destructuring for function parameters and assignments
- Use ESM (
import/export), never CommonJS in new code
Project Structure
- Use
package.jsonwith"type": "module" - Use
eslintwith flat config (eslint.config.js) - Use
prettierfor formatting - Structure:
src/,tests/,lib/
Patterns
- Use
fetch()for HTTP requests (available in Node 18+) - Use
AbortControllerfor cancellable operations - Use
AsyncLocalStoragefor request-scoped context in Node.js - Use
ProxyandReflectsparingly and only when metaprogramming is justified - Prefer
Map/Setover plain objects for collections - Use
WeakMap/WeakReffor caches that should allow garbage collection
Error Handling
- Use custom Error subclasses with
causechaining - Use
.catch()or try/catch with async/await, never unhandled rejections - Validate inputs at system boundaries
Testing
- Use Vitest or Node.js built-in test runner (
node:test) - Use
describe/itwith behavior-driven naming - Keep tests fast â mock I/O, test logic directly