Logo de Webhooks

Webhooks

Comunidade
nahid-sparktales
webhooks

Receive or send HTTP webhooks correctly — signature verification on the raw body, fast acknowledgement, deduplication, out-of-order handling, retry and dead-letter behaviour, and the delivery contract a consumer needs. Use when adding or debugging a webhook endpoint, when integrating a provider's events, or when your own service has to notify others of changes. Not for internal queue or event-bus messages that never cross an HTTP boundary, and not for general outbound API retry policy.

Add to TypingMind

Visão geral

Publicado pornahid-sparktales
Repositórioagent-dispatcher
Nome da habilidadewebhooks
Estrelas
58
Forks
5
Arquivos incluídos
1
LicençaMIT
Links
  • Instruções em Markdown

    Um arquivo SKILL.md que o modelo carrega sob demanda, consumindo tokens apenas quando uma solicitação é realmente relevante para a habilidade.

  • Funciona com qualquer LLM

    As habilidades de IA são escritas em Markdown simples, não em código específico de um provedor. Por isso, funcionam com GPT, Claude, Gemini, Grok ou um modelo local.

  • Arquivos incluídos: 1

    Scripts, templates e referências que o modelo pode ler enquanto trabalha. Os arquivos são somente para leitura e nunca são executados.

  • Código aberto

    Publicada por nahid-sparktales no GitHub. Leia os arquivos da habilidade antes de instalá-la.

Instalação

Instale a habilidade de IA Webhooks no TypingMind para usá-la com qualquer LLM ou adicione-a a outro agente que leia SKILL.md.

1

Instalar no TypingMind

O TypingMind instala uma habilidade diretamente da pasta dela no GitHub — lê o arquivo SKILL.md, reúne os arquivos de recursos em um pacote e armazena o resultado localmente.

  1. Abra o app e vá para Plugins → Habilidades.
  2. Escolha "Instalar do GitHub".
  3. Cole a URL abaixo, que aponta para a pasta da habilidade, e confirme.
    https://github.com/nahid-sparktales/agent-dispatcher/tree/main/skills/backend/webhooks
  4. Ative a habilidade em cada chat em que quiser disponibilizá-la.
Plugins → Habilidades → Adicionar habilidade → Via URL do GitHub. Depois, cole a URL da pasta e pressione Continuar.
2

Instalar em outro agente

Qualquer agente que leia o formato Agent Skills pode usar esta habilidade — copie a pasta para o diretório de habilidades desse agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/nahid-sparktales/agent-dispatcher.git /tmp/agent-dispatcher
mkdir -p .claude/skills
cp -r /tmp/agent-dispatcher/skills/backend/webhooks .claude/skills/webhooks
Reinicie Claude Code após copiar para que a nova habilidade seja reconhecida.

Use no TypingMind

Ative Webhooks em qualquer chat do TypingMind e o modelo cuida do resto. O nome e a descrição da habilidade ficam no prompt do sistema e, assim que uma solicitação relevante aparece, o modelo carrega as instruções completas automaticamente — sem precisar de acionamento manual e sem consumir tokens até que ela seja realmente usada.

O modelo carrega Webhooks automaticamente assim que uma solicitação é relevante para essa habilidade.

Funciona com qualquer modelo de IA

Habilidades de IA são instruções em Markdown simples, não código específico de um provedor. Por isso, Webhooks não fica vinculada ao modelo para o qual foi criada. Instale-a uma vez no TypingMind e use-a com GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama ou um modelo local executado por conta própria — tudo com suas próprias chaves de API.

  • Carregada apenas quando necessário

    O prompt do sistema contém apenas o nome e a descrição. As instruções são buscadas na primeira solicitação relevante, então uma habilidade sem uso não gera custo.

  • Troque de modelo durante a conversa

    Como a habilidade é composta de instruções, não de código, trocar de modelo não afeta seu funcionamento — o próximo modelo lê o mesmo arquivo SKILL.md.

Instruções da habilidade

Este é o conteúdo de SKILL.md que o modelo carrega. Leia antes de instalar — uma habilidade é um conjunto de instruções que seu modelo seguirá.

Webhooks

A webhook is an untrusted HTTP request that claims to be an event. Almost every webhook bug is one of four things: the signature was checked against a re-serialized body, the handler did its work before acknowledging, the same event arrived twice, or events arrived out of order.

When this fires

Building or reviewing a webhook receiver, integrating a provider's events, or designing outbound event delivery to consumers. It does not fire for an internal queue consumer — that has no HTTP trust boundary, though its idempotency requirements are the same.

Procedure — receiving

  1. Verify before you parse. Compute the signature over the raw request body exactly as received, before any JSON decode or middleware re-serialization, and compare in constant time. Check the signed timestamp against a tolerance window so an old capture cannot be replayed. A request that fails verification gets a 4xx and nothing else — no logging of the payload as if it were real, no side effects. Never identify the sender by a field inside the payload.
  2. Confirm the secret's source. Per-endpoint secret from configuration, never committed, and the verification path must fail closed when the secret is missing rather than skipping the check.
  3. Acknowledge fast, work later. Persist the raw body and headers, return 2xx, and process asynchronously. A handler that does its work inline will eventually exceed the sender's timeout, the sender will retry, and you will get duplicates on top of the original that actually succeeded.
  4. Deduplicate on the provider's event id. A persisted record with a unique constraint is the arbiter; a read-then-write check is a race, not a guard. At-least-once delivery is the norm — a second delivery of an event you already applied must be a no-op that still returns 2xx.
  5. Do not trust arrival order. Order by the event's own sequence number, version, or emitted timestamp, and ignore an event whose version is older than the state you already hold. Where the payload is thin or ordering matters more than latency, treat the event as a signal and fetch current state from the provider's API instead of applying the payload.
  6. Make the effect idempotent, not just the dispatch — see idempotency-and-retries. Dedupe keeps you from processing twice; idempotent effects keep you correct when it happens anyway.
  7. Use status codes to mean what the sender thinks they mean. 2xx: delivered, stop retrying. 4xx: permanent — the sender will not retry and may disable the endpoint, so return it only for events you will never be able to process. 5xx: retry me. Never return 2xx to silence a failure you have not recorded, and never return 5xx for a malformed event that will fail identically forever.
  8. Dead-letter after the retry budget, keeping the raw body, headers, receipt time and failure reason. Provide a deliberate replay path. Replaying events into a production system is an outward-facing action with real side effects: stop and ask before running one.
  9. Log without secrets. Event id, type, verification result, outcome. Not the signature header, not tokens or card data inside the payload.

Procedure — sending

  1. Publish the contract before the first delivery. Event types and their payload schemas, a stable event id, an emitted timestamp, the signature scheme and which bytes it covers, the delivery headers, the retry schedule, and — stated plainly — the ordering guarantee you actually offer, which is usually none. Promise at-least-once and tell consumers to be idempotent.
  2. Sign every delivery with a per-endpoint secret, include the timestamp in the signed material, and support two active secrets so a consumer can rotate without dropping events.
  3. Retry with exponential backoff plus jitter, a capped attempt count, and a per-endpoint concurrency limit so one slow consumer cannot drain your workers. Disabling a customer's endpoint after sustained failure is a customer-visible action — notify, and ask before doing it by hand.
  4. Treat the destination URL as hostile. It is user-supplied: block private and link-local address ranges, resolve and check the address actually connected to, refuse redirects to internal hosts, set connect and read timeouts, and cap the response size you read. This is the SSRF surface of your whole cluster.
  5. Version payloads additively. Adding a field is safe only if consumers were told to ignore unknown ones; removing or re-typing a field needs a new event type or version.

Checklist

  • Signature verified on raw bytes, constant time, with a timestamp window
  • Missing or misconfigured secret fails closed
  • Endpoint acknowledges before doing the work, within the sender's timeout
  • Duplicate delivery of the same event id is a no-op, enforced by a unique constraint
  • Out-of-order and stale events are detected by version or timestamp, not ignored
  • 2xx / 4xx / 5xx each returned for the case the sender interprets them as
  • Dead-letter store keeps raw body and headers, with a replay path that asks first
  • Outbound: contract published, deliveries signed, backoff bounded, destination URL restricted
  • Verified against a real signed delivery, or stated as only exercised with a sample payload

Failure handling

  • Signature fails against a known-good delivery — suspect body mutation first: a framework that parses and re-serializes, a proxy that rewrites encoding, trailing-newline handling. Do not "solve" it by weakening or skipping verification; an endpoint that accepts unsigned requests is a remote write primitive for anyone who learns the URL.
  • Events arrive but nothing happens — check the async path, not the endpoint. A 2xx from a receiver whose queue consumer is dead looks perfect from outside.
  • Duplicate side effects in production — this is the dedupe or idempotency gap, not the provider misbehaving. At-least-once means exactly what it says.
  • Cannot receive a real delivery locally — say the handler was exercised with a constructed payload and that live delivery is unverified. A tunnelled or sandbox delivery is better evidence; a unit test with a hand-made signature is the weakest and must be labelled as such.
  • Provider's documented headers or schema are uncertain — read their current documentation rather than assuming. Header names, signature formats and tolerance windows differ per provider and change.

Evidence to report

The verification path and what bytes it covers. One delivery you actually observed — event id, type, status returned, elapsed time to acknowledge. The duplicate test: the same event id delivered twice, and proof of one effect. An out-of-order or stale event, and what the handler did with it. For outbound work, the published contract and the retry schedule's actual numbers. And which of these were executed against a real signed delivery versus only constructed in a test — never let "the webhook works" stand in for either.

Arquivos incluídos

O modelo lê esses arquivos sob demanda enquanto a habilidade está carregada. Eles são disponibilizados para leitura e nunca são executados.

Perguntas frequentes

O que a habilidade de IA Webhooks faz?

Receive or send HTTP webhooks correctly — signature verification on the raw body, fast acknowledgement, deduplication, out-of-order handling, retry and dead-letter behaviour, and the delivery contract a consumer needs. Use when adding or debugging a webhook endpoint, when integrating a provider's events, or when your own service has to notify others of changes. Not for internal queue or event-bus messages that never cross an HTTP boundary, and not for general outbound API retry policy.

Por que usar Webhooks no TypingMind?

Porque basta instalar uma vez para usar com qualquer modelo. A habilidade Webhooks é escrita em Markdown simples, e não em código específico de um provedor, então a mesma habilidade funciona com GPT-5, Claude, Gemini, Grok ou um modelo local — e é possível trocar de modelo no meio do chat sem que ela deixe de funcionar. No TypingMind, você usa suas próprias chaves de API e paga diretamente aos provedores, em vez de pagar uma assinatura por licença de usuário. Suas habilidades e chats permanecem no seu próprio armazenamento.

Como instalar Webhooks no TypingMind?

Abra Plugins → Habilidades → Instalar do GitHub no TypingMind e cole https://github.com/nahid-sparktales/agent-dispatcher/tree/main/skills/backend/webhooks. O TypingMind lê o arquivo SKILL.md, reúne os arquivos da habilidade e a instala para que possa ser ativada em cada chat.

Quais modelos de IA podem usar Webhooks?

Qualquer modelo conectado no TypingMind. As habilidades de IA são instruções em Markdown simples, e não código específico de um provedor. Assim, GPT, Claude, Gemini, Grok e modelos locais podem carregar esta habilidade quando uma solicitação corresponder a ela.

Quantos modelos de IA posso usar com Webhooks?

Quantos quiser. Desde que o modelo ofereça suporte a habilidades, é possível usar Webhooks com ele — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e outros — tudo no TypingMind com suas próprias chaves de API.

A habilidade de IA Webhooks é gratuita?

Sim. A habilidade é publicada no GitHub por nahid-sparktales sob a licença MIT. O pagamento é feito apenas ao seu provedor de IA pelos tokens usados.

O que são habilidades de IA?

Uma habilidade de IA é um conjunto reutilizável de instruções que ensina um modelo de IA a realizar uma tarefa específica. Ela segue o formato aberto Agent Skills: um arquivo SKILL.md com nome e descrição, além de scripts, templates ou arquivos de referência de que o modelo possa precisar. O modelo lê as instruções apenas quando sua solicitação corresponde à habilidade, então uma habilidade instalada não gera custos até ser usada.

Qual é a diferença entre habilidades de IA e plugins ou servidores MCP?

Um plugin ou servidor MCP oferece ao modelo novas ferramentas que ele pode acionar — código que é executado em algum lugar e retorna um resultado. Já uma habilidade de IA dá ao modelo o conhecimento e as orientações de que ele precisa: como abordar uma tarefa, quais etapas seguir e como deve ser um bom resultado. As habilidades são escritas em Markdown simples, por isso não precisam de servidor, chave de API nem ambiente de execução, e funcionam com qualquer modelo.

Ver lista completa

Crie seu próprio espaço de trabalho com IA agora

Inscreva-se na nossa newsletter para receber avisos sobre novos recursos e futuros sorteios 👇