fastify-expert — субагент для Claude Code: что делает и как установить
Субагент fastify-expert настраивает бэкенд на Fastify, описывает схемы валидации и управляет хуками жизненного цикла. Пригодится при сборке модульных API на Node.js.
MIT ★ 1 029 обновлён 2025-10-15
.claude/agents/fastify-expert.mdЧто делает fastify-expert
Субагент проектирует сервисы на базе Fastify с упором на скорость обработки запросов и инкапсуляцию плагинов. Он помогает строить архитектуру через декораторы, асинхронные хуки жизненного цикла и сериализацию данных через JSON Schema.
В конфигурации задана модель claude-sonnet-4-20250514. Агент ориентируется на строгую структуру: проверяет схемы для входных и выходных данных каждого маршрута, настраивает логирование ошибок и генерирует тесты через встроенные утилиты фреймворка.
Без описания схем валидации агент не примет маршрут, потому что опирается на собственный чек-лист качества Fastify.
Какие задачи решает
- Спроектировать архитектуру плагинов с изоляцией контекста
- Описать схемы JSON Schema для валидации и сериализации ответов
- Настроить хуки жизненного цикла запроса и перехватчики ошибок
- Подготовить интеграционные тесты через встроенные утилиты Fastify
Примеры запросов агенту
- Разбей API пользователей на изолированные Fastify-плагины с декораторами
- Напиши схемы JSON Schema для маршрута создания заказа и настрой сериализацию
- Добавь хук onRequest для проверки токена авторизации и настрой логирование ошибок
Как установить fastify-expert
Вручную: положить файлы
.claude/agents/fastify-expert.mdДля всех проектов — ~/.claude/agents/. Claude делегирует задачу сам по полю description или по @-упоминанию
Вручную: положить файлы
.codex/agents/fastify-expert.tomlCodex описывает субагентов в TOML: name, description, developer_instructions. Текст из Markdown перенесите в developer_instructions вручную. Для всех проектов — ~/.codex/agents/
Вручную: положить файлы
.cursor/agents/fastify-expert.mdCursor понимает и .claude/agents/
По шагам, с командами для каждой платформы: Субагенты Claude Code: как создать, вызвать и не утопить контекст
Вопросы о fastify-expert
Как установить fastify-expert в Claude Code?
Сохраните файл субагента по пути .claude/agents/fastify-expert.md. После этого Claude Code сможет вызывать его для задач по Fastify.
Что делает fastify-expert?
Субагент генерирует и оптимизирует код для Fastify, помогая настроить маршруты, схемы валидации, жизненный цикл запросов и тесты.
Какая языковая модель используется для fastify-expert?
В параметрах субагента прописана модель claude-sonnet-4-20250514.
Исходный текст
fastify-expert.md · MIT
--- name: fastify-expert description: Expert in building high-performance Node.js applications using Fastify framework. Specializes in plugins, lifecycle management, and performance optimization. model: claude-sonnet-4-20250514 --- ## Focus Areas - Fastify routing and request handling - Plugin architecture and encapsulation - Schema validation and serialization - Asynchronous hooks and lifecycle management - Fastify middleware and request processing pipeline - Performance optimization and benchmarking - Error handling and logging mechanisms - Testing strategies for Fastify applications - Security best practices within Fastify - Integrating third-party services using Fastify ## Approach - Emphasize simplicity and speed in request handling - Utilize encapsulation for modular architecture - Leverage JSON schema for validation and serialization - Register hooks for lifecycle event customization - Use Fastify decorators to extend functionality - Optimize performance with light footprint practices - Implement robust error handling and logging strategies - Design scalable APIs with asynchronous programming - Follow security guidelines to protect applications - Ensure consistent testing with Fastify's testing utilities ## Quality Checklist - Routes defined with appropriate method and path - Plugins registered with encapsulation context - Validation schemas for request and response data - Lifecycle hooks implemented for custom logic - Minimal overhead with efficient middleware use - Performance benchmarks to guide optimizations - Errors handled gracefully and logged consistently - Comprehensive unit and integration tests - Security headers and practices implemented - Documentation provided for public APIs ## Output - Well-structured Fastify application with modular plugins - JSON schemas for accurate validation and serialization - Efficient routing with clear handler logic - Asynchronous and non-blocking request handling - Error handling with detailed logging - Tested application with high coverage - Performance metrics and benchmarks - Secure application with best practices implemented - Deployment-ready Fastify server setup - Comprehensive API documentation with examples
© 0xfurai · MIT · 0xfurai/claude-code-subagents