Prompt pack · Solo business

Comment to DM Delivery: keyword opt-in, one private reply, owner-approved copy

by PaperChaseWebb

Someone comments your keyword on an Instagram post and gets one private reply with the link they asked for, on Meta's official private reply path. A small Cloudflare Worker you own checks the signature, matches whole words against a register you approve, sends once per comment within Meta's 7-day window, honors STOP at once and starts paused.

Preview card for Comment to DM Delivery
Works withClaude CodeCodexGrok BotHermesA Cloudflare Worker in plain JavaScript, two Python scripts, and rules for AGENTS.md and CLAUDE.md, Claude Code and Codex notes, Hermes notes and a Grok Bot standing order. Tested against a fake Graph API; not run against a live Instagram account for this release
Price
$29
Difficulty
Intermediate
Setup
45 min
Format
.md file
$29 one time

comment-to-dm-delivery-keyword-opt-in-one-private-reply-owner-approved.md · 36 KB · instant download after checkout

Buy now · $29

Want this built for you instead? We can build it for you.

What you end up with

Keyword requests on your posts answered once, with text you approved, and a log that shows every decision.

What you get

  • A Cloudflare Worker: signature check, whole-word keyword match, one private reply per comment, 7-day window, a conservative hourly cap you set, STOP opt-outs, paused by default
  • An asset register template and register_check.py with 14 error checks and 2 warnings; it writes the worker's JSON only when clean
  • log_review.py: weekly counts by code and keyword, lines a person must read, and a pause warning above 5% failed sends
  • The governance table: every rule and the line of code that enforces it
  • Meta App Review notes and a three-stage test protocol: tester mode, private test post, one live post
  • AGENTS.md, CLAUDE.md, a Grok Bot standing order, Codex and Hermes notes and a comment-to-dm skill
  • 20 tests you can run yourself

Who it is for

Anyone who wants comment keyword delivery on their own worker, with rules they can point to.

Works with

Claude CodeCodexGrok BotHermesA Cloudflare Worker in plain JavaScript, two Python scripts, and rules for AGENTS.md and CLAUDE.md, Claude Code and Codex notes, Hermes notes and a Grok Bot standing order. Tested against a fake Graph API; not run against a live Instagram account for this release

Solid chips: the agent is named in this listing's own tools list. Dashed chip: A Cloudflare Worker in plain JavaScript, two Python scripts, and rules for AGENTS.md and CLAUDE.md, Claude Code and Codex notes, Hermes notes and a Grok Bot standing order. Tested against a fake Graph API; not run against a live Instagram account for this release.

Tools needed

Cloudflare Workers and Node 18 or newerruns the worker and its tests; no npm packages
Python 3.8 or newerregister check, log review and the dry run; standard library only
Grok Bot, Claude Code, Codex or Hermes (optional)checks the register, runs the tests and reviews the log under AGENTS.md; never sends, approves copy, deploys or flips the kill switch
You needAn Instagram professional account
You needA Meta developer app with the comments webhook (App Review for live use)
You needA Cloudflare account
You needNode 18 or newer and Python 3.8 or newer

Cost to run: The kit is the only purchase. You need a Meta developer app and a Cloudflare account; check Cloudflare's current free plan limits against your comment volume.
Time to result: Tester mode in about 45 minutes; live after Meta App Review

How it works

  1. Run the tests

    Unpack the kit and run the Node and Python test suites.

    Expected: 10 worker tests and 11 Python runs pass.

  2. Deploy paused

    Create the KV store, set the three secrets and deploy the worker. PAUSED stays true.

    Expected: A worker that answers Meta's handshake and sends nothing.

  3. Approve the register

    Write the exact message per keyword, fill approved_by and approved_on, run register_check.py --emit.

    Expected: 0 errors, and register.json uploaded to KV.

  4. Test in three stages

    Tester mode, a private test post, then one live post for a week, flipping PAUSED back to true after each.

    Expected: One DM per keyword comment, S06 on a repeat, S08 on STOP.

Sample prompts, free to use

Check my register · Grok Bot, Claude Code, Codex, Hermes
Read AGENTS.md. Run python3 desk/register_check.py register.csv and explain each finding in one line. Suggest fixes, but do not change status, approved_by or approved_on.

Prompt 1 of 3.

Weekly review · Grok Bot, Claude Code, Codex, Hermes
Run python3 desk/log_review.py logs.jsonl. Tell me sends by keyword, every line that needs a person, and whether it advised a pause. Do not change any settings.

Prompt 2 of 3.

Before a deploy · Grok Bot, Claude Code, Codex, Hermes
Run both test suites and the register check and show me the counts. Do not deploy; I will.

Prompt 3 of 3.

Free preview of the file

comment-to-dm-delivery-keyword-opt-in-one-private-reply-owner-approved.md (excerpt)36 KB total
# Comment to DM Delivery with Approval Rules

**Someone comments a keyword on your Instagram post and gets one private reply with the thing they asked for. On Meta's official reply path, from a small worker you own, with a register you approve and a kill switch that starts off.**

Version 1.0, 2026-11-01. By PaperChaseWebb Inc. Works with Grok Bot, Claude Code, Codex and Hermes, or on its own.

## The problem

"Comment GUIDE and I will DM it to you" works because the person asked first. It goes wrong in three ways: a tool sends more than one message, it fires on words nobody meant as a request, or nobody can say who approved the text that went out. This kit keeps the good part and closes those three gaps.

## How it works

1. **Meta app with the comments webhook.** Meta sends your worker each new comment on your professional account.
2. **The worker checks the signature** (X-Hub-Signature-256 against your app secret). Anything unsigned is refused.
3. **The register decides.** A small table: keyword, which post (or every post), the link to deliver, the exact message text, who approved it, when, and live or paused. Only live, approved rows fire. A keyword matches as a whole word only.
4. **One private reply.** The worker sends one message on the private reply path (`POST /<IG_ACCOUNT_ID>/messages` with `recipient.comment_id`). Before sending it claims the comment, so a redelivered webhook cannot cause a second message.
5. **Every decision is logged** with a code, and you review

Test record

Date
Nov 1, 2026
What was run
tests/worker.test.mjs (10) on Node 24 against an in-memory KV and a fake Graph API; tests/test_desk.py and tests/test_mini.py (11 runs) on Linux with Python 3.8, 3.9, 3.11, 3.12 and 3.13; files unpacked from the pack and tested fresh; wrangler deploy --dry-run bundle.
Result
10 passed and 11 passed, 0 failed on all five Python versions; each of the 14 register faults caught by its own code; bundle built.
Not run
A live Instagram account or Meta App Review. macOS or Windows. A live Grok Bot, Claude Code, Codex or Hermes session.

Copied from this item's dated test notes. What was not run stays in.

Worth knowing

  • Live sending needs Meta App Review for your app, which can take weeks. Until then it works in development mode with tester accounts.
  • Meta's private reply rules (one message per comment, within 7 days of the comment, follow-ups only after the person replies and within 24 hours of that reply) were read from Meta's documentation on 2026-11-01. Check them again before you go live. Source: Meta Instagram Platform docs, private replies, checked Nov 1, 2026
  • Matching is by keyword, not meaning. Keep keywords specific.
  • Tested with a fake Graph API and an in-memory store; not run against a live Instagram account for this release. Agent rules guide; they are not a lock.
  • On 2026-11-01: 10 worker tests passed on Node 24, 11 Python test runs passed on Python 3.8, 3.9, 3.11, 3.12 and 3.13, and the worker bundled with wrangler deploy --dry-run.

Questions

Is this the official way to do it?

It uses Meta's private reply endpoint for comments, the path Meta documents for replying to a commenter by direct message. You still need your own Meta app and App Review.

Can it send more than one message?

No. It claims each comment before sending, so even a redelivered webhook cannot cause a second reply. Follow-ups are written by a person, after the commenter replies.

What if something breaks?

Set PAUSED to true and nothing sends. Errors are logged and never retried, and the commenter sees nothing.

How is it different from the outreach and text consent kits?

Those cover reaching out first and text messages. This one only answers people who asked by commenting your keyword on Instagram.

Details

Version 1.0 · Updated Nov 1, 2026 · Markdown version of this page
License: Use for yourself, your team or your clients. Do not resell or republish the kit itself. Download terms

instagramcommentsdmprivate-repliesmetacloudflare-workersopt-inapprovalskill-switchgrokclaude-codecodexhermes

Related

Preview card for Comment to DM Delivery
Prompt packFree

Comment to DM Delivery: see which comments would get a reply (free sample)

by PaperChaseWebb

A read-only dry run and a sample register from Comment to DM Delivery. Paste real comments from a post and see which would get a private reply, which are opt-outs, and which near-misses would not fire. Plus the six rules worth keeping.

Works withClaude CodeCodexGrok BotHermesOne Python script and two text files. Tested on Linux
Solo business · Beginner · 5 min setup
Preview card for Outreach Without Spam
Prompt pack$29

Outreach Without Spam: score first, research the pitch, draft in small batches, a person sends

by PaperChaseWebb

A prompt pack and method for founders, consultants and small agencies. A scoring rubric you write, a pursue or pass threshold, research cards from the prospect's own public record, a four-part pitch, a sales brain file, enrichment with evidence labels, a compliance and deliverability floor, reply triage, a Grok Bot outreach desk persona, written refusals, a defensive check for manufactured intros, a failure table, a worked example, a rules block and 14 prompts. Includes outreach_check.py, AGENTS.md with six owner stops, two skills and 18 templates.

Works withClaude CodeCodexGrok BotHermesPlain .md; the checker needs Python 3.8 or newer
Solo business · Beginner · 1 hr setup
Preview card for Text Message Consent Desk
Prompt pack$29

Text Message Consent Desk: agent fixes for texts and send lists, opt-ins checked, every STOP honored, owner approved

by PaperChaseWebb

Let an agent tidy your marketing and reminder texts and build each send list, without texting anyone who said stop, anyone with no record of signing up, or anyone outside quiet hours in their own time zone. It writes fixed copies and lists and never sends or edits your records. A fix check refuses deleted prices, moved send times and invented offers. A list check tests every number against your consent records, replies and send history. You approve at your terminal and send it yourself.

Works withClaude CodeCodexGrok BotHermesPlain Markdown files, a small Python checker, and rules for AGENTS.md and CLAUDE.md, Claude Code and Codex notes, Hermes notes and a Grok Bot standing order. The agent files were checked by the checker on Linux; they were not loaded inside each agent for this release
Solo business · Intermediate · 45 min setup
Preview card for Webhook Agent Gate
Prompt pack$29

Webhook Agent Gate: one action per event, owner-approved refunds and a checker for your handler

by PaperChaseWebb

A small gate between Stripe, GitHub, form or store webhooks and the agent they start. It checks the signature on the raw body, stores each event once, keys every action on what it acts on so a duplicate, a retry or a crash cannot do it twice, and holds refunds for the owner at a terminal the agent cannot use. Includes replay.py to fire duplicates and forged deliveries at your own handler, and a read-only checker for handlers, event maps, ledgers and agent rules.

Works withClaude CodeCodexGrok BotHermesA small Python gate in front of the agent or automation your webhooks start. Rules for AGENTS.md and CLAUDE.md, Claude Code settings, Codex and Hermes notes and a Grok Bot standing order. Signatures tested against stripe-python 16.1.0, stripe-node 23.1.0 and standardwebhooks 1.1.0. The agent files were checked by the checker on Linux; they were not loaded inside each agent for this release
Vibe coding · Intermediate · 45 min setup
Preview card for Ask-first rules for AI agents
Prompt pack$19

Ask-first rules for AI agents: hard nos, approval cards and a test set

by PaperChaseWebb

Paste-in rules that make an agent ask before it sends, spends, posts or deletes, define what a real yes is, and stop retries after a no, plus 12 test scenarios to check it.

Works withClaude CodeCodexClaudeGrok Bot+4Plain .md plus one Python 3 file, standard library only. The agent prompt in block 13 is written for any agent with a shell (Grok Bot, Claude Code, Codex, Hermes); it was not loaded inside each harness.
Solo business · Beginner · 20 min setup