MCP HubMCP Hub
返回技能列表

creating-webhook-handlers

jeremylongshore
更新于 Today
69 次查看
712
74
712
在 GitHub 上查看
general

关于

This Claude Skill helps developers create secure webhook endpoints with signature verification, retry logic, and payload validation. Use it when you need to receive and process external webhook events reliably. Trigger it with phrases like "create webhook" or "setup webhook handler."

快速安装

Claude Code

推荐
插件命令推荐
/plugin add https://github.com/jeremylongshore/claude-code-plugins-plus
Git 克隆备选方式
git clone https://github.com/jeremylongshore/claude-code-plugins-plus.git ~/.claude/skills/creating-webhook-handlers

在 Claude Code 中复制并粘贴此命令以安装该技能

技能文档

Prerequisites

Before using this skill, ensure you have:

  • API design specifications or requirements documented
  • Development environment with necessary frameworks installed
  • Database or backend services accessible for integration
  • Authentication and authorization strategies defined
  • Testing tools and environments configured

Instructions

Step 1: Design API Structure

Plan the API architecture and endpoints:

  1. Use Read tool to examine existing API specifications from {baseDir}/api-specs/
  2. Define resource models, endpoints, and HTTP methods
  3. Document request/response schemas and data types
  4. Identify authentication and authorization requirements
  5. Plan error handling and validation strategies

Step 2: Implement API Components

Build the API implementation:

  1. Generate boilerplate code using Bash(api:webhook-*) with framework scaffolding
  2. Implement endpoint handlers with business logic
  3. Add input validation and schema enforcement
  4. Integrate authentication and authorization middleware
  5. Configure database connections and ORM models

Step 3: Add API Features

Enhance with production-ready capabilities:

  • Implement rate limiting and throttling policies
  • Add request/response logging with correlation IDs
  • Configure error handling with standardized responses
  • Set up health check and monitoring endpoints
  • Enable CORS and security headers

Step 4: Test and Document

Validate API functionality:

  1. Write integration tests covering all endpoints
  2. Generate OpenAPI/Swagger documentation automatically
  3. Create usage examples and authentication guides
  4. Test with various HTTP clients (curl, Postman, REST Client)
  5. Perform load testing to validate performance targets

Output

The skill generates production-ready API artifacts:

API Implementation

Generated code structure:

  • {baseDir}/src/routes/ - Endpoint route definitions
  • {baseDir}/src/controllers/ - Business logic handlers
  • {baseDir}/src/models/ - Data models and schemas
  • {baseDir}/src/middleware/ - Authentication, validation, logging
  • {baseDir}/src/config/ - Configuration and environment variables

API Documentation

Comprehensive API docs including:

  • OpenAPI 3.0 specification with complete endpoint definitions
  • Authentication and authorization flow diagrams
  • Request/response examples for all endpoints
  • Error code reference with troubleshooting guidance
  • SDK generation instructions for multiple languages

Testing Artifacts

Complete test suite:

  • Unit tests for individual controller functions
  • Integration tests for end-to-end API workflows
  • Load test scripts for performance validation
  • Mock data generators for realistic testing
  • Postman/Insomnia collection for manual testing

Configuration Files

Production-ready configs:

  • Environment variable templates (.env.example)
  • Database migration scripts
  • Docker Compose for local development
  • CI/CD pipeline configuration
  • Monitoring and alerting setup

Error Handling

Common issues and solutions:

Schema Validation Failures

  • Error: Request body does not match expected schema
  • Solution: Add detailed validation error messages; provide schema documentation; implement request sanitization

Authentication Errors

  • Error: Invalid or expired authentication tokens
  • Solution: Implement proper token refresh flows; add clear error messages indicating auth failure reason; document token lifecycle

Rate Limit Exceeded

  • Error: API consumer exceeded allowed request rate
  • Solution: Return 429 status with Retry-After header; implement exponential backoff guidance; provide rate limit info in response headers

Database Connection Issues

  • Error: Cannot connect to database or query timeout
  • Solution: Implement connection pooling; add health checks; configure proper timeouts; implement circuit breaker pattern for resilience

Resources

API Development Frameworks

  • Express.js and Fastify for Node.js APIs
  • Flask and FastAPI for Python APIs
  • Spring Boot for Java APIs
  • Gin and Echo for Go APIs

API Standards and Best Practices

  • OpenAPI Specification 3.0+ for API documentation
  • JSON:API specification for RESTful API conventions
  • OAuth 2.0 and OpenID Connect for authentication
  • HTTP/2 and HTTP/3 for performance optimization

Testing and Monitoring Tools

  • Postman and Insomnia for API testing
  • Swagger UI for interactive API documentation
  • Artillery and k6 for load testing
  • Prometheus and Grafana for monitoring

Security Best Practices

  • OWASP API Security Top 10 guidelines
  • JWT best practices for token-based auth
  • Rate limiting strategies to prevent abuse
  • Input validation and sanitization techniques

GitHub 仓库

jeremylongshore/claude-code-plugins-plus
路径: plugins/api-development/webhook-handler-creator/skills/webhook-handler-creator
aiautomationclaude-codedevopsmarketplacemcp

相关推荐技能

algorithmic-art

该Skill使用p5.js创建包含种子随机性和交互参数探索的算法艺术,适用于生成艺术、流场或粒子系统等需求。它能自动生成算法哲学文档(.md)和对应的交互式艺术代码(.html/.js),确保作品原创性避免侵权。开发者可通过定义计算美学理念快速获得可交互的艺术实现方案。

查看技能

subagent-driven-development

开发

该Skill用于在当前会话中执行包含独立任务的实施计划,它会为每个任务分派一个全新的子代理并在任务间进行代码审查。这种"全新子代理+任务间审查"的模式既能保障代码质量,又能实现快速迭代。适合需要在当前会话中连续执行独立任务,并希望在每个任务后都有质量把关的开发场景。

查看技能

executing-plans

设计

该Skill用于当开发者提供完整实施计划时,以受控批次方式执行代码实现。它会先审阅计划并提出疑问,然后分批次执行任务(默认每批3个任务),并在批次间暂停等待审查。关键特性包括分批次执行、内置检查点和架构师审查机制,确保复杂系统实现的可控性。

查看技能

cost-optimization

其他

这个Claude Skill帮助开发者优化云成本,通过资源调整、标记策略和预留实例来降低AWS、Azure和GCP的开支。它适用于减少云支出、分析基础设施成本或实施成本治理策略的场景。关键功能包括提供成本可视化、资源规模调整指导和定价模型优化建议。

查看技能