Inspiration
Moderating large Reddit communities is exhausting. When a spam wave hits or a thread goes toxic, mods have to manually remove comments one by one while bad content keeps spreading. We wanted to give moderators superpowers — instant bulk cleanup and an AI second opinion, right inside Reddit's native UI.
What it does
Mod AI Tool is a Devvit app that gives moderators two powerful tools accessible directly from any post or comment:
- Mop: Bulk-remove or lock an entire comment thread (from a selected comment down) or every comment on a post — with options to skip distinguished moderator/admin posts.
- Analyze with AI: Sends the post or comment to Claude and returns an instant verdict —
REMOVE,APPROVE, orREVIEW— along with a confidence score and a one-line reason. Helps mods make faster, more consistent decisions.
How we built it
- Devvit — Reddit's native app platform, used for context menu items and forms that live inside Reddit's UI
- Hono — Lightweight TypeScript web framework for routing internal menu, form, and API handlers
- Claude Haiku (Anthropic API) — Fast, low-latency AI model for content analysis, returning structured
VERDICT / CONFIDENCE / REASONoutput - Vite + TypeScript — Build tooling and type safety throughout
Challenges we ran into
- Structured AI output in a sandboxed environment: Getting Claude to return machine-parseable responses reliably required careful prompt engineering with a strict format and regex parsing.
- Async comment tree traversal: Reddit's nested comment structure required recursive async generators to traverse arbitrarily deep threads without loading everything into memory at once.
- Devvit's constraints: The platform's sandboxed runtime and form system have specific limitations around how data flows from menu items to form submissions to backend handlers.
Accomplishments that we're proud of
- A genuinely useful AI moderation assistant that runs entirely inside Reddit with no external dashboard needed.
- Bulk comment operations using
Promise.allthat handle entire post comment sections in parallel — fast enough to be practical on active threads. - A clean, permission-checked flow that ensures only moderators with the right permissions can trigger actions.
What we learned
- How to build on Devvit's web model end-to-end — from
devvit.jsonconfiguration to Hono routes to Reddit API calls. - Prompt design for structured AI output: giving Claude a strict format example in the prompt is far more reliable than asking it to reason freely.
What's next for Mod AI Tool
- Subreddit-specific rules: Fetch the actual rules of the subreddit and include them in the AI prompt for more accurate, context-aware verdicts.
- Auto-mod triggers: Run AI analysis automatically on new posts/comments and flag borderline content before a human even sees it.
- Mod action log: Track what was mopped or AI-flagged so mods can review the history and undo mistakes.
- Batch analysis: Let mods select multiple comments and get AI verdicts on all of them at once.
Built With
- devvit
- hono
- node.js
- typescript
- vite

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