cms-webhooks

작성자: contentstack

개발자가 실시간 이벤트 알림을 위해 Contentstack 웹훅을 구성하고 사용하는 방법에 대해 조언합니다. 이벤트 채널, 페이로드 구조, 서명 등을 다룹니다.

npx skills add https://github.com/contentstack/contentstack-agent-skills --skill cms-webhooks

Contentstack Webhooks

Description

Advise developers on configuring and consuming Contentstack webhooks for real-time event notifications. Cover event channels, payload structure, signature verification, retry behavior, release-triggered webhook storms, and reliable receiver design.

When to Use

Use when developers need help setting up webhooks, choosing event channels, handling webhook payloads, verifying signatures, debugging delivery issues, or integrating Contentstack with external systems such as site rebuilds, search indexes, Slack, or CI/CD.

User Problem

Developers need to connect Contentstack to external systems through webhooks and handle operational edge cases such as duplicate deliveries, retries, release-triggered event storms, and failed deliveries.

Success Criteria

Webhook configuration matches the intended event sources and integration target. Receiver validates signatures and handles duplicate deliveries idempotently. Release-triggered webhook storms are detected and collapsed into a single downstream action. Delivery failures are debugged using execution logs and response details. Guidance stays read-only and does not suggest creating, modifying, or deleting webhooks.

Expected Inputs

  • Integration target (site rebuild, search index, Slack, CI/CD, etc.)
  • Event types needed
  • Reliability and latency requirements
  • Payload details or sample requests
  • Debugging information for delivery issues

Expected Outputs

  • Webhook configuration guidance
  • Event channel selection advice
  • Payload handling patterns
  • Signature verification instructions
  • Release-storm prevention advice
  • Debugging recommendations

Example User Requests

  • How do I trigger a site rebuild when content is published?
  • How do I verify a webhook is genuinely from Contentstack?
  • My webhook receiver is getting hundreds of calls when I deploy a release.
  • What retry policy should I use?
  • How do I debug missed webhook deliveries?

Workflow Summary

Identify the integration target and required events. Recommend the narrowest event channels first, then expand only if needed. Explain payload shape, signature verification, and secret handling. Describe receiver reliability patterns: fast 2xx response, async processing, and idempotency. Warn about release-triggered webhook storms and suggest debouncing by release source. Use execution logs to diagnose retries, status codes, and response bodies.

Instructions

Channels

Use event channels in the form {module}.{action}, such as entries.create, entries.update, entries.publish, entries.unpublish, assets.publish, content_types.update, and entries.workflow_stage_change. Use $all only when the integration truly needs every event. Start specific and expand later.

Payloads

Webhook payloads include module, api_key, event, triggered_at, data, and branch information. Recommend concise_payload: true when the receiver only needs identifiers. Use full payloads only when the integration requires complete entry or asset data.

Signature verification

Always validate the X-Contentstack-Signature header in production. Treat it as an HMAC-SHA256 signature over the raw request body using the webhook secret. Reject requests with missing or invalid signatures.

Release-webhook storm

A release with many items can produce one webhook event per item. Detect release-triggered events using the source key in the payload when present. Debounce or batch these events so downstream systems trigger once per release instead of once per item.

Reliable receiver design

Recommend four receiver behaviors: validate signatures, return 2xx within 30 seconds, process asynchronously after acknowledgment, and handle duplicate deliveries idempotently.

Retry policies

Explain the difference between manual retries and auto retries. Manual retries are logged for re-execution; auto retries use exponential backoff. Direct users to execution logs for delivery attempts, HTTP status codes, and response bodies.

Limits and scope

Mention the max of 100 webhooks per stack. Note that webhooks are global modules but can be scoped to a branch. Mention the organization-level Webhook Configuration setting for max connections per second when relevant.

Output Format

Be concise and practical. Prioritize configuration guidance, verification, and reliability patterns. Call out the release-storm issue whenever release-triggered events are involved. Do not suggest creating, modifying, or deleting webhooks.

Tooling Notes

Read-only advisory skill. Allowed tools should be limited to Read, Grep, and Glob. Do not perform mutations or external actions. Use docs and execution logs for troubleshooting guidance only.

Security

Defaults

  • Never expose webhook secrets.
  • Always validate X-Contentstack-Signature in production.
  • Use environment variables for all secrets.
  • Do not echo raw secrets, tokens, or signatures in examples.
  • Prefer server-side verification and processing patterns.

Destructive Actions

Do not create, update, delete, or send webhooks. This skill is advisory only.

Secrets

Never reveal webhook secrets or any credential material. If a secret is needed, instruct the user to store it in environment variables and use it only server-side.

Environment Variables

Store webhook secrets and related credentials in environment variables. Never hardcode secrets in examples or client-side code.

Product Context

    • Product: CMS
    • Description: Contentstack headless CMS: content types, entries, assets, environments, publishing, workflows, webhooks, and the Content Management API (CMA).
    • Product safety rules: - Never expose management tokens or API keys.
  • Always use environment variables for credentials.
  • Route all CMA calls through server-side proxies in browser apps.
  • Never hardcode stack API keys in client-side code.
    • Default tools: ["CMA API", "Content Types", "Entries", "Assets", "Workflows", "Webhooks", "Environments", "Releases", "Publish Queue"]
    • Default connectors: ["CMA Proxy", "Webhooks"]

contentstack의 다른 스킬

brand-kit-assistant
contentstack
사용자에게 Contentstack Brand Kit 개념, 설정, 거버넌스 및 브랜드에 부합하는 AI 생성에 대해 조언합니다. API 관련 작업은 적절한 Brand Kit 기능으로 라우팅하거나...
official
cms-assets
contentstack
개발자들이 Contentstack에서 에셋을 구성, 전달 및 변환하는 방법에 대해 조언합니다. 폴더 구조, Image Delivery API 변환, 게시 등을 다룹니다.
official
cms-branches-aliases
contentstack
개발자들이 Contentstack 브랜치를 사용하여 격리된 콘텐츠 개발을 수행하고, 별칭을 통해 무중단 콘텐츠 배포를 구현할 수 있도록 조언합니다. 브랜치 전략, …을 다룹니다.
official
cms-data-modeling-best-practices
contentstack
개발자들이 Contentstack에서 가장 간단한 재사용 가능한 구조로 콘텐츠를 모델링하도록 안내합니다. 이 스킬은 콘텐츠 타입, 참조, 글로벌…을 사용해야 하는 시점을 설명합니다.
official
cms-entries
contentstack
개발자에게 Contentstack 항목의 효율적인 전달을 위한 쿼리, 현지화, 버전 관리, 게시 및 구조화에 대해 조언합니다. CDA 사용, 참조에 중점을 둡니다.
official
cms-environments-publishing
contentstack
개발자에게 환경 구성, 콘텐츠 게시, 전달 및 미리보기 토큰 사용, Sync API 활용, CDN 이해 등에 대해 조언합니다.
official
cms-live-preview-visual-builder-support-assistant
contentstack
Contentstack Live Preview 및 Visual Builder 구현을 진단하고 안내합니다. 미리보기 컨텍스트를 추적하고, 손상된 계약을 식별하며, 다음을 권장합니다…
official
cms-localization
contentstack
Contentstack 현지화에 대한 개발자 조언: 언어 설정, 폴백 체인, 현지화된 항목과 현지화되지 않은 항목, 현지화 불가능한 필드, 다중 로케일…
official