Inspiration
Moderators rely on AutoModerator to keep communities usable, but editing AutoModerator YAML can be stressful. A small mistake can remove the wrong posts, silently break an existing rule, or make a config harder for the next moderator to understand.
I built ModScript because I wanted AutoModerator management to feel less like editing a fragile system file and more like using a focused moderation tool: explainable, reviewable, and safe by default.
What It Does
ModScript is a Devvit app that helps Reddit moderators generate, understand, test, and safely save AutoModerator rules.
Moderators can:
- Load the subreddit’s existing
config/automoderatorwiki page. - Generate new AutoModerator YAML from plain English.
- Explain existing rules in plain English.
- Check for possible conflicts, overlap, or risky rules.
- Test sample posts against the current editor contents without using AI.
- Preview rule-level diffs before saving.
- Save changes back to the AutoModerator wiki.
- Verify saves by re-reading the wiki after writing.
- Undo the last save using a pre-write backup.
- Optionally configure a subreddit-owned Gemini API key.
The app is designed so AI never writes directly to the wiki. It drafts, explains, and reviews, but moderators stay in control of every save.
How I Built It
ModScript is built as a Reddit Devvit web app with a React frontend and Devvit server routes.
The frontend provides a split moderation workspace: chat-style AI assistance on one side and a live AutoModerator YAML editor on the other. The backend handles Reddit wiki access, Redis-backed state, quota controls, Gemini calls, YAML validation, save verification, and undo backups.
The app reads and writes Reddit’s native config/automoderator wiki page, so it works with existing AutoModerator setups instead of replacing them with a separate rules system.
Challenges
The hardest part was making AI assistance feel safe enough for real moderation work. Generating YAML is useful, but blindly saving generated rules would be risky.
To address that, I added several safety layers:
- Generated YAML is validated before it is appended.
- Remove, filter, and report rules get
action_reasonsupport. - Saves are verified by reading the wiki back after writing.
- The previous wiki content is backed up before saving.
- Undo restores the last saved version and verifies the restore.
- The tester can evaluate sample posts without making another AI call.
Another challenge was making the app usable inside Reddit’s compact embedded views. I spent time improving the responsive layout so the chat, toolbar, and editor remain usable on smaller screens.
Accomplishments I am proud of
I’m proud that ModScript is not just an AI rule generator. It became a safer workflow for managing AutoModerator from end to end.
The biggest accomplishments are:
- Reading a subreddit’s existing AutoModerator config instead of starting from a blank file.
- Generating valid AutoModerator YAML from plain English.
- Explaining existing rules in language moderators can actually use.
- Adding a deterministic rule tester that does not require another AI call.
- Showing rule-level diffs and risk signals before saving.
- Verifying saves by writing to the wiki, reading it back, and checking that the saved content matches.
- Supporting undo with a pre-save backup.
- Adding per-subreddit BYO Gemini key support for communities that want to control their own API usage.
- Making the app usable inside Reddit’s compact Devvit views on both desktop and mobile.
I’m especially proud of the verified-save and undo flow, because those features make the app feel much more realistic for actual moderation work.
What I learned
I learned that moderation tools need to be designed around trust, not just speed.
AI can help write and explain rules, but moderators need clear checkpoints before anything changes. That shaped the whole app: validate the YAML, preview the diff, explain the risk, verify the save, and make recovery possible.
I also learned more about building with Devvit’s web app model, including custom posts, app settings, Redis, server routes, Reddit wiki APIs, and the constraints of running inside Reddit’s embedded UI.
The biggest product lesson was that AutoModerator is powerful because it is flexible, but that flexibility also makes it intimidating. A good tool should not hide the config from moderators. It should help them understand it and make safer decisions.
Built With
- Reddit Devvit
- React
- TypeScript
- Vite
- Tailwind CSS
- Hono
- Redis
- Reddit Wiki APIs
- Google Gemini API
- YAML validation/parsing
- Devvit app settings
- Devvit custom posts and menu actions
Project Impact
ModScript would be useful for communities that rely on AutoModerator but do not have dedicated technical moderators.
Examples of communities that could benefit:
- Small support communities where mods need spam and account-age rules.
- Local or city communities that need recurring scam, event, or classifieds rules.
- Hobby, meme, gaming, or finance communities that need fast rule adjustments during spam waves or trending events.
The main benefit is time savings and safer collaboration. Experienced moderators can review changes faster, and newer moderators can understand existing configs without having to learn every AutoModerator YAML pattern first.
Status
ModScript has been submitted for Reddit review as version 0.0.6.
A working playtest instance is available through the testing link provided in this submission.
What's next for ModScript
Next, I’d like to make ModScript more useful for real mod teams beyond the hackathon.
Planned improvements include:
- Better AutoModerator rule parsing for more condition types.
- Stronger conflict detection with clearer severity levels.
- A richer test suite for sample posts and comments.
- Team-friendly save notes and approval workflows.
- More templates for common subreddit moderation patterns.
- Better onboarding for subreddits with large existing configs.
- Optional subreddit-owned Gemini keys as the default long-term model.
- More polish around permissions, install setup, and first-run guidance.
Long term, I’d like ModScript to become a practical AutoModerator workbench: a place where moderators can understand, test, review, and safely ship rule changes without needing to be YAML experts.
Built With
- apis
- css
- gemini
- hono
- react
- redis
- tailwind
- typescript
- vite
- yaml
Log in or sign up for Devpost to join the conversation.