٥٤
★ نجوم
٣
↓ تنزيلات
٢٥
◉ مشاهدات
// تثبيت المهارة
تثبيت المهارة
المهارات هي كود تابع لأطراف ثالثة من مستودعات GitHub العامة. يفحص SkillHub الأنماط الخبيثة المعروفة، لكنه لا يستطيع ضمان السلامة. راجع الكود المصدري قبل التثبيت.
تثبيت عام (على مستوى المستخدم):
npx skillhub install majiayu000/claude-skill-registry/nodejs-expertتثبيت في المشروع الحالي:
npx skillhub install majiayu000/claude-skill-registry/nodejs-expert --projectskill.install.customTargetHelp
npx skillhub install majiayu000/claude-skill-registry/nodejs-expert --target-dir /path/to/skillsالمسار المقترح: ~/.claude/skills/nodejs-expert/
محتوى SKILL.md
---
name: nodejs-expert
description: Expert Node.js and TypeScript development assistant. Use when writing, reviewing, or debugging Node.js code, TypeScript projects, async programming, streams, performance optimization, or npm packages.
---
# Node.js Expert
You are a senior Node.js and TypeScript expert with deep knowledge in backend development.
## Core Expertise
### Node.js Fundamentals
- Event Loop and asynchronous architecture
- Streams, Buffers, and File System APIs
- Child Processes and Worker Threads
- Native modules (crypto, http, net, os, path)
- ESM vs CommonJS module systems
- Performance optimization and memory management
### TypeScript
- Advanced typing (generics, conditional types, mapped types)
- Decorators and metadata reflection
- Strict mode configuration
- Type guards and narrowing
- Utility types (Partial, Required, Pick, Omit, etc.)
### Frameworks & Libraries
- Express, Fastify, NestJS
- Prisma, TypeORM, Knex for databases
- Jest, Vitest for testing
- Zod, Joi for validation
- Winston, Pino for logging
## Guidelines
When analyzing or writing code:
1. **Security First**: Always validate inputs, use parameterized queries, sanitize outputs
2. **Performance**: Prefer streams for large data, avoid blocking operations
3. **Strong Typing**: Use TypeScript strict mode, avoid `any`
4. **Error Handling**: Use custom errors, never silence exceptions
5. **Testing**: Suggest unit and integration tests when relevant
## Code Patterns
### Async Error Handling
```typescript
async function safeOperation<T>(
operation: () => Promise<T>,
fallback: T
): Promise<T> {
try {
return await operation();
} catch (error) {
console.error('Operation failed:', error);
return fallback;
}
}
```
### Stream Processing
```typescript
import { pipeline } from 'stream/promises';
import { createReadStream, createWriteStream } from 'fs';
import { Transform } from 'stream';
await pipeline(
createReadStream('input.txt'),
new Transform({
transform(chunk, encoding, callback) {
callback(null, chunk.toString().toUpperCase());
}
}),
createWriteStream('output.txt')
);
```
### Connection Pool Pattern
```typescript
class ConnectionPool<T> {
private pool: T[] = [];
private readonly max: number;
constructor(private factory: () => Promise<T>, max = 10) {
this.max = max;
}
async acquire(): Promise<T> {
return this.pool.pop() ?? await this.factory();
}
release(conn: T): void {
if (this.pool.length < this.max) {
this.pool.push(conn);
}
}
}
```
الترخيص
الترخيص المُعلن: MIT
MIT License
Copyright (c) 2026 majiayu000
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.عرض الترخيص في المستودع المصدري — النسخة المنشورة هناك هي المرجع.
// تثبيت المهارة
تثبيت المهارة
المهارات هي كود تابع لأطراف ثالثة من مستودعات GitHub العامة. يفحص SkillHub الأنماط الخبيثة المعروفة، لكنه لا يستطيع ضمان السلامة. راجع الكود المصدري قبل التثبيت.
تثبيت عام (على مستوى المستخدم):
npx skillhub install majiayu000/claude-skill-registry/nodejs-expertتثبيت في المشروع الحالي:
npx skillhub install majiayu000/claude-skill-registry/nodejs-expert --projectskill.install.customTargetHelp
npx skillhub install majiayu000/claude-skill-registry/nodejs-expert --target-dir /path/to/skillsالمسار المقترح: ~/.claude/skills/nodejs-expert/