Community moderation policies bots

From CraftOS-dev/craftbot-agent-bundles · View interactive version

Community moderation policies bots is an AI agent skill from the GitHub repository CraftOS-dev/craftbot-agent-bundles. Sources: https://discord.com/developers/docs/resources/auto-moderation + https://carl.gg/ + https://mee6.xyz/ + https://dyno.gg/ + https://meta.discourse.org/c/dev/automation/ + https://www.reddit.com

How to use this skill

Skill file

<!--

Sources: https://discord.com/developers/docs/resources/auto-moderation + https://carl.gg/ + https://mee6.xyz/ + https://dyno.gg/ + https://meta.discourse.org/c/dev/automation/ + https://www.reddit.com/r/AutoModerator/wiki/library

-->

Moderation Policies + Bot Stack — SKILL

Multi-platform moderation: Discord (AutoMod + Carl-bot + MEE6 + Dyno + Wick), Slack (admin controls + AntiSpam), Discourse (trust levels + Akismet), Reddit (AutoModerator YAML + Toolbox). Severity ladder: warn → mute (1h/24h) → kick → ban. Output is a YAML rule pack per platform deployed via API.

When to use

Trigger phrases: "moderation policies", "AutoMod", "Carl-bot", "Dyno anti-raid", "Discord raid", "Discourse Akismet", "Reddit AutoModerator", "mod stack".

Setup

# Discord MCP for direct AutoMod rules
mcp tool discord-mcp-full.create_automod_rule \
  --guild_id $GUILD_ID --name "slur-filter" --event_type 1 --trigger_type 4

# Carl-bot dashboard install (manual OAuth one-time)
# https://carl.gg/

# Reddit MCP for AutoMod YAML
mcp tool reddit.update_wiki_page \
  --subreddit yourproduct --page "config/automoderator" --content "$(cat automod.yaml)"

# Discourse via cli-anything
curl -X PUT -H "Api-Key: $DISCOURSE_KEY" \
  https://forum.brand.com/admin/site_settings/automatic_topic_heat_values.json

Auth + env:

Workspace prerequisites:

Common recipes

Recipe 1: Discord AutoMod rule (slur + keyword filter)

mcp tool discord-mcp-full.create_automod_rule \
  --guild_id $GUILD_ID \
  --name "Slur filter" \
  --event_type 1 \
  --trigger_type 4 \
  --trigger_metadata '{"keyword_filter": ["slur1", "slur2"], "regex_patterns": ["(?i)bad.*word"]}' \
  --actions '[{"type": 1, "metadata": {"custom_message": "Removed — see #rules"}}, {"type": 2, "metadata": {"channel_id": "$MOD_LOG"}}]'

event_type 1 = MESSAGE_SEND. trigger_type 4 = KEYWORD. Actions: 1 block, 2 send-alert.

Recipe 2: Discord AutoMod — invite-link block

mcp tool discord-mcp-full.create_automod_rule \
  --guild_id $GUILD_ID \
  --name "Invite-link block" \
  --event_type 1 \
  --trigger_type 4 \
  --trigger_metadata '{"regex_patterns": ["discord\\.gg/[a-zA-Z0-9]+"]}' \
  --actions '[{"type": 1}]' \
  --exempt_roles '["$TRUSTED_ROLE"]'

Recipe 3: Carl-bot reaction-roles + auto-mod

In Carl-bot dashboard carl.gg/dashboard/<guild_id>/automod:

spam_filter:
  duplicate_messages: 5  # 5 same messages → mute 10m
  mention_spam: 8        # 8 mentions in one msg → mute 1h
  caps_filter: 0.7       # 70% caps in 10+ char msg → warn
  link_filter: whitelist_only
welcome_message:
  channel: '#welcome'
  message: "Welcome {user.mention} — react ✅ in #rules to verify"

Recipe 4: Dyno anti-raid

In Dyno dashboard dyno.gg/manage/<guild_id>/automod:

anti_raid:
  join_rate: 10  # 10 joins in 60s → lockdown
  account_age_min_days: 7
  auto_action: kick
mute_role: '@Muted'

Lockdown auto-prevents new joins for 10min while mods inspect.

Recipe 5: Severity ladder + audit log

# Centralized mod-action log (any platform)
LADDER = {
  1: ("warn", "Private DM warning"),
  2: ("mute_1h", "1h timeout"),
  3: ("mute_24h", "24h timeout"),
  4: ("kick", "kick from server"),
  5: ("ban", "permanent ban"),
}

def escalate(user_id, current_tier, reason):
    new_tier = min(current_tier + 1, 5)
    action, desc = LADDER[new_tier]
    mod_action_log(user_id, action, reason)
    # Discord
    if action.startswith("mute_"):
        hrs = int(action.split("_")[1].rstrip("h"))
        mcp.discord_full.timeout_member(user_id, duration=hrs * 3600)
    elif action == "kick":
        mcp.discord_full.kick_member(user_id)
    elif action == "ban":
        mcp.discord_full.ban_member(user_id, reason=reason)

Recipe 6: Slack admin tightening

# Tighten member-invite permissions
curl -X POST -H "Authorization: Bearer $SLACK_ADMIN_TOKEN" \
  https://slack.com/api/admin.teams.settings.setInvitedPermissions \
  -d '{"team_id": "$TEAM_ID", "invited_user_permissions": "admin_only"}'

# Disable @channel for non-admins
curl -X POST -H "Authorization: Bearer $SLACK_ADMIN_TOKEN" \
  https://slack.com/api/admin.conversations.setConversationPrefs \
  -d '{"channel_id": "$CH_ID", "prefs": {"who_can_post": "admins_only_for_general"}}'

Recipe 7: Discourse trust-level + Akismet

# Enable Akismet spam filter (Admin → Settings → akismet_api_key)
curl -X PUT -H "Api-Key: $DISCOURSE_KEY" \
  https://forum.brand.com/admin/site_settings/akismet_api_key.json \
  -d "{\"akismet_api_key\":\"$AKISMET_KEY\"}"

# TL3 grant criteria (Admin → Settings → "tl3 requires_*")
# tl3_requires_likes_given: 30
# tl3_requires_topics_replied_to: 10
# Auto-promote raises mod-capacity for free

Recipe 8: Reddit AutoModerator YAML

# Posted to /r/yourproduct/wiki/config/automoderator
# Doc: https://www.reddit.com/r/AutoModerator/wiki/library

---
type: submission
title+body (regex): "(?i)(buy|sale|discount|click my link)"
action: remove
action_reason: "self-promo blocked"
modmail_subject: "Auto-removed self-promo"
comment: |
  Hi — your post was removed for self-promotion. See [rule 3](/r/yourproduct/about/rules).
---
type: comment
author:
  comment_karma: "< -10"
action: filter
action_reason: "low-karma filter"
---
type: any
body (regex): "\\b(slur1|slur2|slur3)\\b"
action: remove
action_reason: "slur filter"
mcp tool reddit.update_wiki_page \
  --subreddit yourproduct --page "config/automoderator" \
  --content "$(cat automod.yaml)" --reason "AutoMod v$(date +%Y%m%d)"

Recipe 9: Discourse automation plugin (replace TL3 abuse)

# Admin → Plugins → Discourse Automation → Add automation
trigger: post_created_edited
conditions:
  - flagged_post_count: ">= 3"
action: send_pms
recipients: '@mods'
title: "User flagged 3x in 24h"

Recipe 10: Cross-platform mod-action audit

-- Postgres warehouse — keep all mod actions in one table
CREATE TABLE mod_actions (
  id BIGSERIAL PRIMARY KEY,
  platform TEXT,        -- discord / slack / discourse / reddit
  user_id TEXT,
  username TEXT,
  action TEXT,          -- warn / mute / kick / ban
  reason TEXT,
  evidence_url TEXT,
  acting_mod TEXT,
  created_at TIMESTAMP DEFAULT NOW()
);

-- Weekly mod-load report
SELECT acting_mod, COUNT(*) AS actions, MAX(created_at) AS last
FROM mod_actions WHERE created_at > NOW() - INTERVAL '7 days'
GROUP BY acting_mod ORDER BY actions DESC;

Examples

Example 1: New public Discord — full mod stack

Goal: 0 → 1k member Discord launch.

Steps:

  1. AutoMod slur filter + invite filter (Recipes 1, 2).
  2. Carl-bot install for reaction-roles + spam-mute + welcome (Recipe 3).
  3. Dyno install for anti-raid (Recipe 4).
  4. Severity ladder coded in Python wrapper (Recipe 5).
  5. #mod-log channel + audit table (Recipe 10).

Result: 0 successful raids in 90 days; mod incidents resolved in <10min average.

Example 2: Subreddit hardening

Goal: 5k subscriber subreddit, recurring spam waves.

Steps:

  1. Author AutoModerator YAML (Recipe 8).
  2. Push via wiki API.
  3. Install Reddit Toolbox extension for mod team.
  4. Weekly mod-load report (Recipe 10).

Result: Spam → 70% reduction; mod hours/week dropped from 12 to 3.

Edge cases / gotchas

Sources

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.