Repository navigation
feat: add papergames-webhooks skill - #266
Merged
Merged
Conversation
Generated with scripts/generate-skills.sh (claude, model: CLI default) Tests: express: PASS, nextjs: PASS, fastapi: PASS Review: Accepted within thresholds (0 critical, 1 major, 1 minor) Validation: Passed Iterations: 1, issues found: 2, issues sent for fixing: 0
The developer tools are on papergames.io (/en/developers/apikeys and /en/developers/webhooks), not on developers.papergames.io, which only serves the docs. The Managing Webhooks page links to webhook management via a typo'd host (papergmaes.io), so note the working URL. Also: name the actual crypto library per example instead of "Node/Python built-ins" in all three, and skip non-object entries in players[] in the Express and Next.js handlers, matching FastAPI. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
garethx
marked this pull request as ready for review
November 5, 2026 17:16
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Papergames (papergames.io)
New skill for the
PAPERGAMESHookdeck source type. Papergames is an onlinemultiplayer board-game platform (Battleship, Tic Tac Toe, Connect 4, Gomoku,
Chess) with an embeddable games API: you create a game session over REST, embed
the returned
playUrlin an iframe, and get a webhook as each game in thesession starts and finishes.
Not Paperform (
paperform-webhooks, already in this repo) — unrelated company.Scheme: Standard Webhooks / Svix,
svix-header prefixResolved before generation from Hookdeck's own source config
(
server/integrations/index.ts:controller: 'STANDARD_WEBHOOKS',configs: { headers_prefix: 'svix' }, comment "Delivered by Svix") and from thevendor's Security page.
svix-id/svix-timestamp/svix-signature, HMAC-SHA256 over{svix-id}.{svix-timestamp}.{raw body}, standard base64.whsec_(whole valuedecoded if the prefix is absent; an empty key is rejected).
svix-signatureis a space-delimited list ofv1,<base64>entries; anyv1match passes, other version tags are ignored, compared in constant time.
PAPERGAMES_WEBHOOK_TOLERANCE_SECONDS(0 disables) — a strict 5-minute windowwould drop the documented 30 min / 2 h / 5 h / 10 h retries.
I cross-checked the construction against the official
svixPython library:for the same
(msg_id, timestamp, body, whsec_…)the library emits a digestbyte-identical to the one the skill computes, and
Webhook.verify()accepts aheader the skill builds. This is a reference-implementation interop proof, not a
live Papergames delivery — no test account was available.
Two things a reviewer will want to re-flag, and why they are correct
{ eventType, payload }, not Standard Webhooks'{ type, data }. Papergames keeps its own camelCase envelope even thoughdelivery is Svix, and there is no event-type header. Routing reads
body.eventType; the session isbody.payload. TheEvents page shows
this verbatim.
game.startedandgame.finished. The list isnot short because research stopped early — those are the only two documented,
and the docs invite customers to request more, so the handlers have a default
branch.
message.attempt.exhaustedis mentioned on the Retry Schedule pagebut it is Svix's operational event with no documented payload or endpoint;
it is noted as such rather than listed as a game event.
Hedged / quirky facts, stated honestly in the skill
webhookPayload.payload.players[].externalId, while every JSON example on thesame page has
eventType/payloadat the root with no wrapper. The handlersfollow the JSON and also tolerate the envelope nested under
webhookPayload.statusstays"playing"even in the docs' owngame.finishedexample(a session holds several games), so the code routes on event type, never on
status."playing"is the only documented value and no others are invented.winnerfield — the result is derived by comparingplayers[].score, ties included.externalIdis only present if you passedexternalUserIdon the iframe URL,so it is treated as optional everywhere.
on endpoint creation — none is published, and none is invented.
Accuracy review
One major finding, confirmed against the live docs before fixing: setup and
the example READMEs pointed at
developers.papergames.iofor the developertools, which is the docs site only. The dashboard is on
papergames.io—/en/developers/apikeys(linked verbatim from Getting started) and/en/developers/webhooks(HTTP 200; a nonsense sibling path 404s, so it is areal page, not a SPA catch-all). The Managing Webhooks page links to it via a
typo'd host,
papergmaes.io, which the skill now calls out. Also fixed: acopy-paste "Node/Python built-ins" line in all three example READMEs, and
players[]entries that are not objects are now skipped in Express/Next.js forparity with FastAPI. No verification code was changed.
Testing
validate-provider.sh papergames-webhooksTests assert the parsed payload reads (session
uid,gamesPlayed, playerlabels, derived leader), not just response status codes.
Note on CI
This is pushed from the
garethxfork, so the "Detect Changed Skills" workflowsits pending until a maintainer approves the workflow run. Say the word and I
can re-push the branch to
originso CI runs without the approval step.🤖 Generated with Claude Code