Inspiration
Every busy group chat ends up buried in spam, fake crypto giveaways, chain messages and off-topic posts. Admins either clean it up by hand or install blunt bots that delete the wrong things, sometimes even the admin's own messages. We wanted a moderator that is firm with junk, never touches an admin, explains every decision, and is easy to overrule. Kiroween's Skeleton Crew category gave us the shape for it: one lean skeleton that supports more than one app.
What it does
Bonekeeper is an AI moderator for group chats. It reads every message, deletes spam, scams and off-topic posts, warns the sender, and mutes repeat offenders. Admin, moderator and allowlisted messages are never checked, never deleted and never warned.
You can try it in a live demo chat called "Halloween Dev Club", styled like a messaging app. Seven bots keep it alive: three friendly members and four troublemakers (a promo spammer, a crypto scammer, an off-topic chatter and an ALL-CAPS flooder). Post spam as a member and you get deleted and warned. Post the same thing as the admin and nothing happens.
Admins get a private report page with everything Bonekeeper did and why. The Crypt holds doubtful messages for review, The Graveyard lists deleted ones, and Séance mode logs what would be deleted without deleting anything. If the agent gets something wrong, "Mark as OK" restores the message, removes the warning, and teaches the classifier through a correction example. The same core also runs a Telegram bot for a real group.
How we built it
- Core engine: a platform-agnostic TypeScript package,
@bonekeeper/core, with no platform code in it. Every message runs through six steps in a fixed order: protected senders (plain code, no AI), cheap rules, a Gemini classifier, a decision by strictness, act and audit, and repeat-offender handling. - Adapters: the core talks to platforms through one
PlatformAdapterinterface (delete, hide, warn, notify admins, capabilities). We built a simulated adapter for the web demo and a Telegram adapter for the real bot. - App: a Next.js dashboard with a chat page and an admin-only report page, deployed on Netlify. State lives in Netlify Blobs.
- AI: Google Gemini (gemini-2.5-flash) classifies unclear messages and writes the bots' chat lines.
- Tooling: a Turborepo monorepo with Vitest tests, built with Kiro from a written plan that we refined step by step.
Challenges we ran into
- Serverless limits. Netlify can't keep a SQLite file or run timers, so we moved state to Netlify Blobs, replaced live streaming with 2-second polling, and let the browser trigger the bots' messages with a debounce so several open tabs don't flood the chat.
- Race conditions. A message, its audit record and the sender's warning count all change at once, so each moderation result is saved in a single batched write.
- Platforms differ. Telegram can delete a message but can't hide one. Adapters declare what they support, and the core downgrades an action when needed.
- Trusting an AI with deletion. We made the admin bypass plain code, made every error fail open so the message stays, and treated message text as untrusted data to resist prompt injection.
- Deploying a monorepo. Getting Netlify to build the right package took some trial and error.
Accomplishments that we're proud of
- One moderation core that runs two different apps with zero changes.
- An admin bypass that is code, not a model's guess, and is covered by tests.
- Every decision is explainable: deleted messages stay visible as a "removed by Bonekeeper" tombstone with a category, confidence and reason in the report.
- Admins can undo a mistake in one click and the agent learns from it.
- A bright, skeleton-themed interface that is easy to read and fun to demo.
What we learned
Cheap, deterministic rules should do most of the work, with the LLM only judging the gray area. Failing open is the right default for moderation, because a missed spam message costs far less than a wrongly deleted one. Designing adapters around capabilities, instead of assuming every platform can do everything, keeps the core clean. And serverless limits shape an architecture more than you expect.
What's next for Bonekeeper
Discord and other adapters (WhatsApp has no official API for moderating ordinary groups, so that one needs care), real sign-in instead of the demo PIN, per-group learned rules, bulk review tools, and exportable moderation reports.
Built With
- css
- google-gemini
- html
- javascript
- kiro
- netlify
- netlify-blobs
- netlify-functions
- nextjs
- node.js
- react
- telegram
- telegram-bot-api
- turborepo
- typescript
- veed
- vitest

Log in or sign up for Devpost to join the conversation.