mod-actions

Take moderator actions on users - ban, mute, remove content, manage leaderboard eligibility, send DMs. Use when you need to ban a user, mute them, send direct messages, or take other moderation actions.

7,060 stars

Best use case

mod-actions is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Take moderator actions on users - ban, mute, remove content, manage leaderboard eligibility, send DMs. Use when you need to ban a user, mute them, send direct messages, or take other moderation actions.

Teams using mod-actions should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/mod-actions/SKILL.md --create-dirs "https://raw.githubusercontent.com/civitai/civitai/main/.claude/skills/mod-actions/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/mod-actions/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How mod-actions Compares

Feature / Agentmod-actionsStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Take moderator actions on users - ban, mute, remove content, manage leaderboard eligibility, send DMs. Use when you need to ban a user, mute them, send direct messages, or take other moderation actions.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# Moderator Actions

Take moderator actions on Civitai users including banning, muting, removing content, managing leaderboard eligibility, and sending direct messages.

This skill uses the Civitai tRPC API with API key authentication, ensuring all actions go through the proper service layer with full side effects (session invalidation, search index updates, activity tracking, etc.).

## Setup

1. Copy `.env-example` to `.env` in this skill directory
2. Add your Civitai API key (must belong to a moderator account)
3. Optionally set the API URL (defaults to production)

```bash
cp .claude/skills/mod-actions/.env.example .claude/skills/mod-actions/.env
# Edit .env and add your API key
```

Get your API key from: https://civitai.com/user/account (API Keys section)

**Important:** The API key must belong to a user with moderator privileges.

### Environment Variables

| Variable | Required | Default | Description |
|----------|----------|---------|-------------|
| `CIVITAI_API_KEY` | Yes | - | Your Civitai API key |
| `CIVITAI_API_URL` | No | `https://civitai.com` | API base URL |

For local development, set `CIVITAI_API_URL=http://localhost:3000`

## Running Commands

```bash
node .claude/skills/mod-actions/query.mjs <command> [options]
```

### Commands

| Command | Description |
|---------|-------------|
| `user <id\|username>` | Look up user info by ID or username |
| `ban <id\|username>` | Ban a user (toggle - will unban if already banned) |
| `mute <id\|username>` | Mute a user (toggle - will unmute if already muted) |
| `leaderboard <id\|username> <true\|false>` | Set leaderboard eligibility |
| `remove-content <id\|username>` | Remove all content from a user |
| `dm <id\|username>` | Send a DM to a user (requires `--message`) |

### Ban Reason Codes

| Code | Description |
|------|-------------|
| `SexualMinor` | Sexual content involving minors |
| `SexualMinorGenerator` | Generator for sexual minor content |
| `SexualMinorTraining` | Training on sexual minor content |
| `SexualPOI` | Sexual content with people of interest |
| `Bestiality` | Bestiality content |
| `Scat` | Scat content |
| `Nudify` | Nudification tools |
| `Harassment` | Harassment |
| `LeaderboardCheating` | Leaderboard manipulation |
| `BuzzCheating` | Buzz system abuse |
| `RRDViolation` | Rights and Restrictions Denial violation |
| `Other` | Other violation |

### Options

| Flag | Description |
|------|-------------|
| `--json` | Output raw JSON response |
| `--dry-run` | Show what would be done without making changes |
| `--reason <code>` | Ban reason code (for ban command) |
| `--message <text>` | External message shown to user (for ban command) |
| `--internal <text>` | Internal notes (for ban command) |

## Examples

### Look Up User

```bash
# By user ID
node .claude/skills/mod-actions/query.mjs user 3879899

# By username
node .claude/skills/mod-actions/query.mjs user unfazedanomaly964

# Get raw JSON
node .claude/skills/mod-actions/query.mjs user 3879899 --json
```

### Ban User

```bash
# Simple ban (toggles ban status)
node .claude/skills/mod-actions/query.mjs ban 3879899

# Ban with reason and message
node .claude/skills/mod-actions/query.mjs ban 3879899 --reason Other --message "Repeated ToS violations"

# Ban with internal notes
node .claude/skills/mod-actions/query.mjs ban 3879899 --reason Other --message "ToS violation" --internal "User exploited republish bug 15 times"

# Ban by username
node .claude/skills/mod-actions/query.mjs ban unfazedanomaly964 --reason Other

# Dry run to see what would happen
node .claude/skills/mod-actions/query.mjs ban 3879899 --dry-run
```

### Mute User

```bash
# Toggle mute status
node .claude/skills/mod-actions/query.mjs mute 3879899

# By username
node .claude/skills/mod-actions/query.mjs mute unfazedanomaly964

# Dry run
node .claude/skills/mod-actions/query.mjs mute 3879899 --dry-run
```

### Manage Leaderboard Eligibility

```bash
# Exclude from leaderboards
node .claude/skills/mod-actions/query.mjs leaderboard 3879899 false

# Include in leaderboards
node .claude/skills/mod-actions/query.mjs leaderboard 3879899 true

# Dry run
node .claude/skills/mod-actions/query.mjs leaderboard 3879899 false --dry-run
```

### Remove All Content

```bash
# Remove all content from a user (DESTRUCTIVE)
node .claude/skills/mod-actions/query.mjs remove-content 3879899

# Always dry run first!
node .claude/skills/mod-actions/query.mjs remove-content 3879899 --dry-run
```

## Output Format

### User Info

```
User: unfazedanomaly964
ID: 3879899
Status: Active
Banned: No
Muted: No
Leaderboard Eligible: Yes
Created: 2024-03-19
```

### Action Result

```
Action: BAN
User: unfazedanomaly964 (ID: 3879899)
Success: Yes
Previous: Not Banned
Now: Banned
Reason: Other
```

## How It Works

This skill calls the Civitai tRPC API endpoints:
- `user.getById` / `user.getCreator` - User lookups
- `user.toggleBan` - Ban/unban users
- `user.toggleMute` - Mute/unmute users
- `user.setLeaderboardEligibility` - Manage leaderboard access
- `user.removeAllContent` - Remove all user content

Authentication is via Bearer token in the Authorization header:
```
Authorization: Bearer <your-api-key>
```

All endpoints require `moderatorProcedure` access, meaning the API key must belong to a moderator account.

## When to Use

- **Investigating violations**: Look up user info before taking action
- **Repeat offenders**: Ban users who repeatedly violate ToS
- **Temporary restrictions**: Mute users for minor violations
- **Leaderboard manipulation**: Exclude cheaters from leaderboards
- **Content violations**: Remove all content from severe violators

## Safety Notes

- **Always use `--dry-run` first** for destructive actions
- All actions are logged in the ModActivity table
- Ban actions invalidate user sessions immediately
- Universal bans unpublish all user content and cancel subscriptions
- Document reasons with `--reason` and `--message` flags
- API key must have moderator privileges

## Tips

- Always look up user info first to confirm the right user
- Use `--dry-run` for destructive actions like bans and content removal
- Document reasons with `--reason`, `--message`, and `--internal` flags
- Use `--json` for scripting or piping to other tools
- Set `CIVITAI_API_URL=http://localhost:3000` for local development

Related Skills

worktree

7060
from civitai/civitai

Create and manage git worktrees with automatic environment setup. Creates worktrees at ../model-share-<branch>, copies .env, and runs pnpm install.

ux-design

7060
from civitai/civitai

UX design methodology and external consultation. Use when creating user flows, wireframes, interaction patterns, or getting UX feedback. Provides structured frameworks for user-centered design.

retool-query

7060
from civitai/civitai

Run queries against the Retool PostgreSQL database for moderation notes, user notes, and other Retool-managed data. Read-only by default. Use when you need to query the Retool database directly.

redis-inspect

7060
from civitai/civitai

Inspect Redis cache keys, values, and TTLs for debugging. Supports both main cache and system cache. Use for debugging cache issues, checking cached values, and monitoring cache state. Read-only by default.

ralph

7060
from civitai/civitai

Autonomous agent for tackling big projects. Create PRDs with user stories, then run them via the CLI. Sessions persist across restarts with pause/resume and real-time monitoring.

quick-mockups

7060
from civitai/civitai

Create multiple UI design mockups in parallel. Use when asked to create mockups, wireframes, or design variations for a feature. Creates HTML files using Mantine v7 + Tailwind following Civitai's design system.

postgres-query

7060
from civitai/civitai

Run PostgreSQL queries for testing, debugging, and performance analysis. Use when you need to query the database directly, run EXPLAIN ANALYZE, compare query results, or test SQL optimizations. Always uses read-only connections unless explicitly directed otherwise.

opensearch-admin

7060
from civitai/civitai

Inspect and debug OpenSearch clusters — health, index stats, search performance, query profiling, mappings, shards, and thread pools. Read-only admin operations for monitoring and troubleshooting.

metabase

7060
from civitai/civitai

Create and manage Metabase questions, dashboards, and public links. Use when the user wants to build metrics dashboards, create saved questions with SQL queries, or share analytics publicly.

meilisearch-admin

7060
from civitai/civitai

Check Meilisearch index status, tasks, health, and settings. Use for debugging search issues, monitoring indexing tasks, and inspecting index configuration. Read-only admin operations.

freshdesk

7060
from civitai/civitai

Interact with Freshdesk support platform - search/view/update tickets, reply to customers, add notes, look up contacts, and manage Knowledge Base articles. Use when you need to manage support tickets, look up customer information, or work with KB content.

flipt

7060
from civitai/civitai

Manage Flipt feature flags - list, create, enable/disable, and configure rollout rules. Use when you need to control feature flag state or set up segmented rollouts.