From javascript
JavaScript/TypeScript 核心开发规范:ES2024-2025语法标准、ESM模块系统、const/let变量声明、命名约定、Vite 6构建工具、ESLint 9 flat config代码检查。编写JS/TS代码、创建项目、配置构建工具链时加载。
npx claudepluginhub lazygophers/ccplugin --plugin javascriptThis skill uses the workspace's default tool permissions.
| Agent | 说明 |
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Guides MCP server integration in Claude Code plugins via .mcp.json or plugin.json configs for stdio, SSE, HTTP types, enabling external services as tools.
| Agent | 说明 |
|---|---|
| dev | JavaScript 开发专家 |
| debug | JavaScript 调试专家 |
| test | JavaScript 测试专家 |
| perf | JavaScript 性能优化专家 |
| 场景 | Skill | 说明 |
|---|---|---|
| 异步编程 | Skills(javascript:async) | async/await、Promise、AbortController |
| React 开发 | Skills(javascript:react) | React 19、Server Components、Next.js 15 |
| Vue 开发 | Skills(javascript:vue) | Vue 3.5、Composition API、Nuxt 4 |
| Web 安全 | Skills(javascript:security) | XSS 防护、CSP、Zod 验证 |
JavaScript 生态追求高性能、组件化、ESM 原生、运行时验证。
import/export,"type": "module"varrequire / module.exports)console.log(使用结构化日志)innerHTML 直接设置用户输入(XSS 漏洞).toSorted(), .toReversed())// Object.groupBy / Map.groupBy
const grouped = Object.groupBy(users, u => u.role);
// 非变异数组方法
const sorted = arr.toSorted((a, b) => a - b);
const reversed = arr.toReversed();
const updated = arr.with(0, 'new');
// Promise.withResolvers
const { promise, resolve, reject } = Promise.withResolvers();
// Array.fromAsync
const items = await Array.fromAsync(asyncIterable);
// Set 方法
const union = setA.union(setB);
const intersection = setA.intersection(setB);
const difference = setA.difference(setB);
// camelCase: 变量、函数
const getUserData = async (userId) => { };
const isActive = true;
// UPPER_SNAKE_CASE: 模块级常量
const MAX_RETRIES = 3;
const API_TIMEOUT = 5000;
// PascalCase: 类、组件
class UserManager { }
function UserCard({ user }) { }
// kebab-case: 文件名
// user-service.js, api-client.js
// eslint.config.js
import js from '@eslint/js';
export default [
js.configs.recommended,
{
files: ['src/**/*.js', 'src/**/*.jsx'],
rules: {
'no-var': 'error',
'prefer-const': 'error',
'no-console': ['warn', { allow: ['warn', 'error'] }],
'prefer-arrow-callback': 'error',
'no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
}
}
];
src/
├── features/
│ ├── auth/
│ │ ├── hooks/
│ │ ├── services/
│ │ └── components/
│ └── shared/
├── config/
├── store/
└── main.js
| 现象 | 问题 | 严重程度 |
|---|---|---|
使用 var | 作用域不清晰,禁止使用 | 高 |
require() | 应使用 ESM import | 高 |
arr.sort() | 变异原数组,应使用 .toSorted() | 中 |
.eslintrc.js | 旧版配置,应迁移到 flat config | 中 |
npm install | 应使用 pnpm | 中 |
| Jest 配置 | 应迁移到 Vitest 3.x | 中 |
| Webpack | 应迁移到 Vite 6 | 中 |
moment.js | 应使用 date-fns 或 Temporal API | 低 |
"type": "module"