Install any skill in seconds. Free to start, no credit card required.
Get Started Free →AsyncAPI specification handling for event-driven API documentation. Parse, validate, and generate documentation for message-based APIs including Kafka, MQTT, WebSocket, and AMQP systems.
.claude/skills/a5c-ai-asyncapi-docs/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-02 | ✗→✓ | ▲ Improved | 2780% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 2791% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 173% | 0% |
| case-13 | ✗→✓ | ▲ Improved | 195% | 0% |
| case-14 | ✗→✓ | ▲ Improved | 123% | 0% |
Generate and validate documentation for event-driven APIs using the AsyncAPI specification with support for multiple messaging protocols.
Invoke this skill when you need to:
| Parameter | Type | Required | Description | |-----------|------|----------|-------------| | specPath | string | Yes | Path to AsyncAPI specification | | outputDir | string | No | Documentation output directory | | generator | string | No | html, markdown, react (default: html) | | validate | boolean | No | Run spec validation (default: true) | | lint | boolean | No | Run Spectral linting (default: true) | | generateCode | boolean | No | Generate client/server stubs | | codeLanguage | string | No | Code generation target language |
json{ "specPath": "./asyncapi.yaml", "outputDir": "docs/async", "generator": "html", "validate": true, "lint": true, "generateCode": true, "codeLanguage": "typescript" }
docs/async/
├── index.html # Main documentation page
├── servers.html # Server/broker documentation
├── channels/
│ ├── user-events.html # Channel documentation
│ └── order-events.html
├── messages/
│ ├── UserCreated.html # Message documentation
│ └── OrderPlaced.html
├── schemas/
│ ├── User.html # Schema documentation
│ └── Order.html
├── bindings/ # Protocol bindings
│ └── kafka.html
├── search.json # Search index
└── asyncapi.json # Bundled specyamlasyncapi: 3.0.0 info: title: User Events API version: 1.0.0 description: | Event-driven API for user management operations. ## Overview This API publishes events when user data changes. Consumers can subscribe to specific channels to receive real-time updates. ## Authentication All connections require a valid API key passed in the connection headers. contact: name: API Team email: api-team@example.com license: name: Apache 2.0 url: https://www.apache.org/licenses/LICENSE-2.0 servers: production: host: kafka.example.com:9092 protocol: kafka description: Production Kafka cluster security: - $ref: '#/components/securitySchemes/sasl' tags: - name: production description: Production environment staging: host: kafka-staging.example.com:9092 protocol: kafka description: Staging environment channels: userCreated: address: user.events.created messages: UserCreatedMessage: $ref: '#/components/messages/UserCreated' description: | Published when a new user account is created. **Trigger**: User registration completion **Frequency**: ~1000 events/day userUpdated: address: user.events.updated messages: UserUpdatedMessage: $ref: '#/components/messages/UserUpdated' operations: publishUserCreated: action: send channel: $ref: '#/channels/userCreated' summary: Publish user created event description: | Publishes an event when a new user is created. Events are partitioned by user ID. tags: - name: users bindings: kafka: groupId: user-service clientId: user-publisher subscribeUserCreated: action: receive channel: $ref: '#/channels/userCreated' summary: Subscribe to user created events description: | Subscribe to receive notifications when new users are created. Ideal for: - Welcome email services - Analytics tracking - Audit logging components: messages: UserCreated: name: UserCreated title: User Created Event summary: Event published when a user is created contentType: application/json traits: - $ref: '#/components/messageTraits/commonHeaders' payload: $ref: '#/components/schemas/UserCreatedPayload' examples: - name: NewUser summary: Standard user creation payload: userId: "usr_123456" email: "john@example.com" createdAt: "2026-01-24T10:30:00Z" source: "web-signup" UserUpdated: name: UserUpdated title: User Updated Event summary: Event published when user data changes contentType: application/json payload: $ref: '#/components/schemas/UserUpdatedPayload' schemas: UserCreatedPayload: type: object description: Payload for user created events required: - userId - email - createdAt properties: userId: type: string description: Unique user identifier pattern: "^usr_[a-zA-Z0-9]+$" examples: - "usr_123456" email: type: string format: email description: User's email address createdAt: type: string format: date-time description: Timestamp of user creation source: type: string enum: - web-signup - mobile-app - admin-portal - api description: Registration source UserUpdatedPayload: type: object required: - userId - updatedAt - changes properties: userId: type: string description: Unique user identifier updatedAt: type: string format: date-time changes: type: array items: type: object properties: field: type: string oldValue: type: string newValue: type: string messageTraits: commonHeaders: headers: type: object properties: correlationId: type: string description: Correlation ID for distributed tracing format: uuid timestamp: type: string format: date-time description: Event timestamp version: type: string description: Schema version securitySchemes: sasl: type: scramSha256 description: SASL/SCRAM-SHA-256 authentication
yamlchannels: orderEvents: address: orders.events bindings: kafka: topic: orders.events.v1 partitions: 12 replicas: 3 topicConfiguration: cleanup.policy: - delete retention.ms: 604800000 # 7 days segment.bytes: 1073741824 messages: OrderCreated: bindings: kafka: key: type: string description: Order ID used as partition key schemaIdLocation: header schemaIdPayloadEncoding: confluent
yamlasyncapi: 3.0.0 info: title: Real-time Notifications API version: 1.0.0 servers: production: host: ws.example.com protocol: wss description: WebSocket server for real-time notifications channels: notifications: address: /notifications/{userId} parameters: userId: description: The user ID to receive notifications for messages: Notification: $ref: '#/components/messages/Notification' bindings: ws: query: type: object properties: token: type: string description: Authentication token required: - token
yamlasyncapi: 3.0.0 info: title: IoT Sensor API version: 1.0.0 servers: production: host: mqtt.example.com:8883 protocol: mqtts description: MQTT broker for IoT devices channels: sensorReadings: address: sensors/{sensorId}/readings parameters: sensorId: description: Unique sensor identifier messages: SensorReading: $ref: '#/components/messages/SensorReading' bindings: mqtt: qos: 1 retain: false bindingVersion: '0.2.0'
bash# Validate specification asyncapi validate asyncapi.yaml # Validate with custom rules asyncapi validate asyncapi.yaml --rule-file .spectral.yaml
bash# Generate HTML documentation asyncapi generate fromTemplate asyncapi.yaml @asyncapi/html-template -o docs # Generate Markdown asyncapi generate fromTemplate asyncapi.yaml @asyncapi/markdown-template -o docs # Generate React app asyncapi generate fromTemplate asyncapi.yaml @asyncapi/react-component -o docs
bash# TypeScript types asyncapi generate models asyncapi.yaml typescript -o src/types # Java models asyncapi generate models asyncapi.yaml java -o src/main/java # Python models asyncapi generate models asyncapi.yaml python -o src/models
yamlextends: - "@asyncapi/spectral-ruleset" rules: # Require descriptions asyncapi-info-description: error asyncapi-channel-description: warn asyncapi-operation-description: warn # Require examples asyncapi-message-examples: warn # Schema validation asyncapi-payload-unsupported-schemaFormat: error asyncapi-schema: error # Custom rules operation-summary-required: description: Operations must have summaries given: "$.operations[*]" then: field: summary function: truthy severity: warn message-content-type: description: Messages must specify content type given: "$.components.messages[*]" then: field: contentType function: truthy severity: error
yamlchannels: paymentCompleted: address: payments.completed.v1 description: | ## Payment Completed Events Published when a payment is successfully processed. ### Use Cases - Order fulfillment initiation - Customer notification - Financial reconciliation ### Consumer Guidelines - Process events idempotently (use `paymentId` for deduplication) - Acknowledge within 30 seconds - Implement dead letter queue handling ### SLA - **Latency**: Events published within 1s of payment completion - **Ordering**: Events are ordered by `paymentId` within partition - **Retention**: 7 days
yamlcomponents: schemas: Payment: type: object title: Payment description: | Represents a completed payment transaction. ## Versioning This schema follows semantic versioning. Breaking changes will result in a new major version. ## Privacy Contains PII - handle according to data protection policies. required: - paymentId - amount - currency properties: paymentId: type: string format: uuid description: Unique payment identifier x-field-extra-annotation: "@Id" amount: type: number format: decimal description: Payment amount in minor units (cents) minimum: 0 examples: - 1999 - 50000 currency: type: string pattern: "^[A-Z]{3}$" description: ISO 4217 currency code examples: - USD - EUR - GBP
json{ "devDependencies": { "@asyncapi/cli": "^1.0.0", "@asyncapi/html-template": "^2.0.0", "@asyncapi/markdown-template": "^1.0.0", "@asyncapi/generator": "^1.0.0", "@asyncapi/modelina": "^3.0.0", "@stoplight/spectral-cli": "^6.0.0", "@asyncapi/spectral-ruleset": "^1.0.0" } }
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | pass→pass | 19,264 | 39,033 | +103% | 1 | 1 | 0% | 2,770 | 8,947 | +223% | 0 | 0 | — |
case-02 | fail→pass | 15,612 | 22,225 | +42% | 1 | 1 | 0% | 247 | 7,113 | +2780% | 0 | 0 | — |
case-03 | fail→pass | 5,736 | 21,074 | +267% | 1 | 1 | 0% | 235 | 6,793 | +2791% | 0 | 0 | — |
case-04 | pass→pass | 20,246 | 18,271 | -10% | 1 | 1 | 0% | 2,294 | 5,613 | +145% | 0 | 0 | — |
case-05 | pass→pass | 15,841 | 15,746 | -1% | 1 | 1 | 0% | 2,123 | 5,025 | +137% | 0 | 0 | — |
case-06 | fail→fail | 15,541 | 11,829 | -24% | 1 | 1 | 0% | 1,899 | 5,592 | +194% | 0 | 0 | — |
case-07 | pass→pass | 18,543 | 14,104 | -24% | 1 | 1 | 0% | 2,177 | 5,491 | +152% | 0 | 0 | — |
case-08 | pass→pass | 14,088 | 18,608 | +32% | 1 | 1 | 0% | 2,301 | 5,828 | +153% | 0 | 0 | — |
case-09 | fail→pass | 15,217 | 15,841 | +4% | 1 | 1 | 0% | 1,886 | 5,156 | +173% | 0 | 0 | — |
case-10 | pass→pass | 23,880 | 17,648 | -26% | 1 | 1 | 0% | 2,291 | 5,704 | +149% | 0 | 0 | — |
case-11 | pass→pass | 14,687 | 9,893 | -33% | 1 | 1 | 0% | 1,686 | 4,361 | +159% | 0 | 0 | — |
case-12 | fail→fail | 17,427 | 13,808 | -21% | 1 | 1 | 0% | 2,017 | 5,611 | +178% | 0 | 0 | — |
case-13 | fail→pass | 13,708 | 11,304 | -18% | 1 | 1 | 0% | 1,583 | 4,674 | +195% | 0 | 0 | — |
case-14 | fail→pass | 15,930 | 22,801 | +43% | 1 | 1 | 0% | 2,722 | 6,058 | +123% | 0 | 0 | — |
case-15 | pass→pass | 20,287 | 12,254 | -40% | 1 | 1 | 0% | 2,628 | 5,273 | +101% | 0 | 0 | — |
case-16 | pass→pass | 13,499 | 7,218 | -47% | 1 | 1 | 0% | 1,551 | 4,792 | +209% | 0 | 0 | — |
case-17 | pass→pass | 17,572 | 17,018 | -3% | 1 | 1 | 0% | 2,432 | 5,878 | +142% | 0 | 0 | — |
case-18 | pass→pass | 8,024 | 8,146 | +2% | 1 | 1 | 0% | 499 | 4,041 | +710% | 0 | 0 | — |
case-19 | pass→pass | 14,561 | 15,223 | +5% | 1 | 1 | 0% | 1,926 | 5,397 | +180% | 0 | 0 | — |
case-20 | fail→fail | 17,932 | 19,778 | +10% | 1 | 1 | 0% | 2,903 | 6,752 | +133% | 0 | 0 | — |
case-21 | fail→fail | 11,630 | 16,718 | +44% | 1 | 1 | 0% | 1,287 | 5,764 | +348% | 0 | 0 | — |
case-22 | fail→fail | 11,303 | 8,345 | -26% | 1 | 1 | 0% | 1,384 | 5,174 | +274% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 20 counted toward the lift figure. The other 2 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +23 percentage points is the difference between those two pass rates over the 20 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.