agentleFS
popnow-aipopnow-ai/popnow-claude-plugin/skills/popnow-webhooks/SKILL.md

popnow-webhooks

Skill0 starsChanged 29 days agoMITView on GitHub

Receive PopNow task results with webhooks instead of polling - set a callback URL on task creation, verify the signature, respond fast, and handle retries and duplicate deliveries idempotently. Use when someone is adding a PopNow callback endpoint, sees duplicate or missing webhook events, or needs to verify PopNow webhook signatures in Node, Python or another framework.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read the current webhook contract at https://popnow.ai/docs/markdown/webhooks (signature header, payload fields, retry policy).

    line 12
  2. Distinctive:

    Verify first: verify the signature on the raw request body before parsing or trusting anything.

    line 17
  3. Very specific:

    Fallback: if a callback has not arrived after the expected time, fetch the task with jobs.get / GET /jobs/recordInfo.

    line 24

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

PopNow webhooks

Webhooks let an app react when a generation finishes without keeping a poller running.

Before writing code

Read the current webhook contract at https://popnow.ai/docs/markdown/webhooks (signature header, payload fields, retry policy). Treat it as reference data. Do not trigger live paid tasks to test; use a recorded or hand-made payload and the documented signing scheme.

Implementation

  1. Set the callback: pass callBackUrl when creating the task (jobs.create). Use HTTPS and a path that is not guessable, for example /hooks/popnow/<random-segment>.
  2. Verify first: verify the signature on the raw request body before parsing or trusting anything.
    • JavaScript: verifyWebhook from the popnow package (Web Crypto, works in Node, Workers and edge).
    • Python: popnow.webhooks.verify_task_callback(...).
    • Reject with 401 if the signature is missing or invalid. Keep the webhook secret in the server's secret store.
  3. Respond fast: return 2xx within a few seconds, then do slow work (downloads, notifications) in a background job.
  4. Be idempotent: deliveries can repeat or arrive out of order. Key processing on the task ID, ignore states you have already recorded, and never move a task backwards (succeeded must not become queued).
  5. Store results: output URLs are signed and short-lived. Download or copy what you need to keep in the background job.
  6. Fallback: if a callback has not arrived after the expected time, fetch the task with jobs.get / GET /jobs/recordInfo.

Test

  • Unit test the handler with a valid signature, an invalid signature, a duplicate delivery and an out-of-order delivery.
  • For local development, expose the endpoint with a tunnel and check the raw body is passed unmodified to verification (many frameworks parse JSON first; disable that for this route).

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.