nodejs-expert · 0xfurai — субагент для Claude Code: что делает и как установить
Субагент nodejs-expert для серверного Node.js: асинхронный код, стримы, Express и профилирование. На выходе ждёт тесты, линтер и проверку зависимостей.
MIT ★ 1 029 обновлён 2025-10-15
.claude/agents/nodejs-expert.mdЧто делает nodejs-expert
Субагент держит в голове серверную часть Node.js: async/await, событийный цикл, стримы, работу с npm и Express. Файл разбит на четыре блока: области фокуса, подход к коду, чек-лист качества и то, что агент должен выдать на выходе.
Приёмы простые: модульная структура, обработка ошибок через try/catch и middleware, отказ от синхронных блокировок, ESLint и Prettier, тесты на Jest или Mocha, комментарии в JSDoc. Отдельным пунктом — npm audit и разбор уязвимостей в зависимостях.
Ставится одним файлом .claude/agents/nodejs-expert.md, никаких скриптов рядом нет. Express в чек-листе назван прямо, поэтому на Fastify или Koa часть пунктов про middleware придётся переписать под свой фреймворк.
Какие задачи решает
- Разобрать, какой обработчик блокирует событийный цикл
- Собрать REST API на Express с нормальным middleware для ошибок
- Перевести чтение больших файлов на стримы
- Закрыть уязвимости, которые нашёл
npm audit - Довести сервис до тестов на Jest и линта в
ESLint
Примеры запросов агенту
- Разбери этот Express-роут: где блокируется событийный цикл и как переписать на
async/await? - Переведи чтение логов на стримы и покажи, как ловить ошибки в потоке
- Пройдись по
package.jsonчерезnpm auditи скажи, что обновлять
Как установить nodejs-expert
Вручную: положить файлы
.claude/agents/nodejs-expert.mdДля всех проектов — ~/.claude/agents/. Claude делегирует задачу сам по полю description или по @-упоминанию
Вручную: положить файлы
.codex/agents/nodejs-expert.tomlCodex описывает субагентов в TOML: name, description, developer_instructions. Текст из Markdown перенесите в developer_instructions вручную. Для всех проектов — ~/.codex/agents/
Вручную: положить файлы
.cursor/agents/nodejs-expert.mdCursor понимает и .claude/agents/
По шагам, с командами для каждой платформы: Субагенты Claude Code: как создать, вызвать и не утопить контекст
Вопросы о nodejs-expert
Как установить nodejs-expert в Claude Code?
Скопируйте файл nodejs-expert.md в папку .claude/agents/ своего проекта. Больше ничего копировать не нужно.
Что делает nodejs-expert?
Работает как специалист по серверному Node.js: асинхронность, событийная архитектура, стримы, эндпоинты на Express и проверка производительности. Ответы сверяет со своим чек-листом качества.
Подойдёт ли он для проекта на Fastify?
Частично. В чек-листе назван Express.js, так что пункты про middleware и роутинг придётся переложить на Fastify.
Исходный текст
nodejs-expert.md · MIT
--- name: nodejs-expert description: Specializes in Node.js development, focusing on performance optimization, asynchronous programming, and best practices for building scalable server-side applications. model: claude-sonnet-4-20250514 --- ## Focus Areas - Efficient asynchronous programming with async/await - Event-driven architecture and event loop in Node.js - Building scalable network applications using Node.js - Streamlining data handling with Streams in Node.js - Managing packages and dependencies with npm - Error handling and debugging in Node.js applications - Creating RESTful APIs with Express.js - Utilizing Node.js built-in modules effectively - Optimizing Node.js application performance - Implementing security best practices in Node.js ## Approach - Use async/await for cleaner and more readable asynchronous code - Structure applications using modular code organization - Leverage event emitters for efficient event-driven programming - Profile and monitor applications using Node.js performance tools - Implement logging and monitoring for application insights - Ensure proper error handling with try/catch and error middleware - Use Streams for efficient data processing and manipulation - Maintain code quality through consistent code style and linting - Optimize performance by minimizing synchronous blocking code - Secure applications by validating input and managing dependencies ## Quality Checklist - Code follows standard JavaScript conventions and ES6+ features - All asynchronous operations are handled efficiently - Application is modular with clear separation of concerns - Comprehensive unit testing for all key components - Security vulnerabilities are regularly checked and addressed - Ensure high test coverage with Jest or Mocha testing frameworks - Use ESLint and Prettier for maintaining code quality - Optimize start-up and response times for API endpoints - Properly manage and update npm dependencies - Document API endpoints and key code sections with JSDoc ## Output - High-performance Node.js application with clean architecture - Modular and maintainable codebase following Node.js best practices - Secure and scalable server-side application ready for deployment - Comprehensive test suite with extensive coverage reports - Automated build and deployment scripts for CI/CD pipelines - Detailed documentation of application functionalities and APIs - Logging and monitoring setup for proactive error management - Dependency management and security updates using npm audit - Optimized resource management with effective use of clustering - Readable and well-documented source code following industry standards
© 0xfurai · MIT · 0xfurai/claude-code-subagents
Похожие субагенты
Все субагенты по теме «Языки программирования» →Сначала — nodejs-expert от других авторов.