community-platform-patterns

Build community platforms with user profiles, discussion forums, event management, and moderation tools. Covers real-time features, content moderation, and community engagement patterns. Triggers on community platform development, forum design, or social feature requests.

Best use case

community-platform-patterns is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Build community platforms with user profiles, discussion forums, event management, and moderation tools. Covers real-time features, content moderation, and community engagement patterns. Triggers on community platform development, forum design, or social feature requests.

Teams using community-platform-patterns 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/community-platform-patterns/SKILL.md --create-dirs "https://raw.githubusercontent.com/organvm-iv-taxis/a-i--skills/main/distributions/claude/skills/community-platform-patterns/SKILL.md"

Manual Installation

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

How community-platform-patterns Compares

Feature / Agentcommunity-platform-patternsStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Build community platforms with user profiles, discussion forums, event management, and moderation tools. Covers real-time features, content moderation, and community engagement patterns. Triggers on community platform development, forum design, or social feature requests.

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.

SKILL.md Source

# Community Platform Patterns

Build engaging community platforms with sustainable moderation and meaningful interaction design.

## Core Data Model

```python
from datetime import datetime
from enum import Enum

class MemberRole(str, Enum):
    MEMBER = "member"
    MODERATOR = "moderator"
    ADMIN = "admin"

class ContentStatus(str, Enum):
    DRAFT = "draft"
    PUBLISHED = "published"
    HIDDEN = "hidden"      # Soft-removed by mod
    ARCHIVED = "archived"

# Core entities
class Member:
    id: str
    display_name: str
    bio: str
    joined_at: datetime
    role: MemberRole
    reputation: int = 0

class Discussion:
    id: str
    title: str
    body: str
    author_id: str
    category: str
    status: ContentStatus
    created_at: datetime
    reply_count: int = 0
    view_count: int = 0
    pinned: bool = False
    locked: bool = False

class Reply:
    id: str
    discussion_id: str
    author_id: str
    body: str
    parent_id: str | None = None  # Threaded replies
    status: ContentStatus
    created_at: datetime
    upvotes: int = 0
```

## Discussion Forum

### Thread Display Patterns

**Flat (chronological):** Best for announcements and linear conversations.

**Threaded (nested):** Best for technical discussions where tangents are valuable.

**Hybrid (flat with quoted replies):** Best for general discussion.

```python
async def get_discussion_with_replies(discussion_id: str, sort: str = "chronological"):
    discussion = await db.get_discussion(discussion_id)
    replies = await db.get_replies(discussion_id)

    if sort == "chronological":
        return sorted(replies, key=lambda r: r.created_at)
    elif sort == "threaded":
        return build_thread_tree(replies)
    elif sort == "popular":
        return sorted(replies, key=lambda r: r.upvotes, reverse=True)
```

### Categories and Tags

```python
CATEGORIES = {
    "reading-group": {"description": "Book discussions and study groups", "color": "#4A90D9"},
    "announcements": {"description": "Official updates", "color": "#E74C3C", "mod_only": True},
    "help": {"description": "Questions and support", "color": "#2ECC71"},
    "showcase": {"description": "Share your work", "color": "#F39C12"},
    "meta": {"description": "About the community itself", "color": "#9B59B6"},
}
```

## Reputation System

### Action-Based Scoring

| Action | Points | Rationale |
|--------|--------|-----------|
| Post discussion | +2 | Encourages contribution |
| Reply to discussion | +1 | Encourages engagement |
| Receive upvote | +5 | Community validation |
| Give upvote | +1 | Encourages voting |
| Marked as answer | +15 | High-value contribution |
| Post hidden by mod | -10 | Discourages violations |

### Privilege Tiers

```python
PRIVILEGE_TIERS = {
    0: ["read", "reply"],
    10: ["create_discussion", "upvote"],
    50: ["edit_own_posts", "flag_content"],
    100: ["create_events", "add_tags"],
    500: ["edit_wiki_posts"],
    1000: ["nominate_moderator"],
}

def get_privileges(reputation: int) -> list[str]:
    privileges = []
    for threshold, perms in PRIVILEGE_TIERS.items():
        if reputation >= threshold:
            privileges.extend(perms)
    return privileges
```

## Content Moderation

### Moderation Queue

```python
class ModerationAction(str, Enum):
    APPROVE = "approve"
    HIDE = "hide"
    WARN = "warn"
    BAN_TEMPORARY = "ban_temporary"
    BAN_PERMANENT = "ban_permanent"

async def flag_content(content_id: str, reason: str, reporter_id: str):
    flag = await db.create_flag(
        content_id=content_id,
        reason=reason,
        reporter_id=reporter_id,
    )
    # Auto-hide if threshold reached
    flag_count = await db.count_flags(content_id)
    if flag_count >= 3:
        await db.update_content_status(content_id, ContentStatus.HIDDEN)
        await notify_moderators(content_id, flag_count)
```

### Community Guidelines Enforcement

```python
GUIDELINES = {
    "be_respectful": "Treat others as you'd want to be treated",
    "stay_on_topic": "Keep discussions relevant to the community focus",
    "no_spam": "No promotional content without context",
    "cite_sources": "Back up claims with references when possible",
    "no_personal_attacks": "Criticize ideas, not people",
}

async def moderate(content_id: str, action: ModerationAction, reason: str, mod_id: str):
    await db.record_mod_action(content_id, action, reason, mod_id)
    if action == ModerationAction.HIDE:
        await db.update_content_status(content_id, ContentStatus.HIDDEN)
        await notify_author(content_id, reason)
    elif action == ModerationAction.WARN:
        await send_warning(content_id, reason)
```

## Event Management

```python
class Event:
    id: str
    title: str
    description: str
    organizer_id: str
    event_type: str  # "reading-group", "salon", "workshop", "office-hours"
    starts_at: datetime
    ends_at: datetime
    location: str  # URL for virtual, address for physical
    capacity: int | None
    rsvp_count: int = 0
    recurring: str | None = None  # "weekly", "biweekly", "monthly"

async def create_recurring_events(template: Event, count: int):
    events = []
    for i in range(count):
        event = template.copy()
        if template.recurring == "weekly":
            event.starts_at += timedelta(weeks=i)
            event.ends_at += timedelta(weeks=i)
        events.append(await db.create_event(event))
    return events
```

## Notification System

```python
class NotificationType(str, Enum):
    REPLY = "reply"
    MENTION = "mention"
    UPVOTE = "upvote"
    EVENT_REMINDER = "event_reminder"
    MOD_ACTION = "mod_action"

async def send_notification(user_id: str, notification_type: NotificationType, data: dict):
    prefs = await db.get_notification_preferences(user_id)
    if notification_type.value not in prefs.get("muted", []):
        await db.create_notification(user_id, notification_type, data)
        if prefs.get("email_enabled") and notification_type in prefs.get("email_types", []):
            await send_email_notification(user_id, notification_type, data)
```

## Anti-Patterns

- **No onboarding flow** — New members need guided first steps
- **Flat hierarchy only** — Categories/tags help people find relevant content
- **No moderation tools** — Build moderation from day one, not after the first incident
- **Gamification without purpose** — Points should encourage healthy behavior, not just activity
- **One-size-fits-all notifications** — Let members control what they receive
- **No archive strategy** — Old discussions should be searchable but not clutter active feeds

Related Skills

webhook-integration-patterns

5
from organvm-iv-taxis/a-i--skills

Designs reliable webhook systems with proper delivery guarantees, retry logic, signature verification, and idempotent processing for event-driven integrations.

vector-search-patterns

5
from organvm-iv-taxis/a-i--skills

Implement vector similarity search with embedding generation, index selection, and hybrid retrieval strategies. Covers ChromaDB, pgvector, FAISS, and RAG pipeline design. Triggers on vector search, embeddings, semantic search, or RAG architecture requests.

testing-patterns

5
from organvm-iv-taxis/a-i--skills

Write effective tests across the stack—unit, integration, E2E, and visual regression. Covers testing philosophy, framework selection, mocking strategies, and CI integration. Triggers on testing, test coverage, TDD, or quality assurance requests.

session-lifecycle-patterns

5
from organvm-iv-taxis/a-i--skills

Manage AI agent session lifecycles with structured phases (FRAME, SHAPE, BUILD, PROVE), context preservation across sessions, handoff protocols, and session metadata tracking. Triggers on session management, agent lifecycle, or multi-session workflow requests.

responsive-design-patterns

5
from organvm-iv-taxis/a-i--skills

Mobile-first responsive design patterns with breakpoints, fluid layouts, and adaptive components

resilience-patterns

5
from organvm-iv-taxis/a-i--skills

Build fault-tolerant systems with circuit breakers, retries with backoff, bulkheads, timeouts, and graceful degradation. Covers distributed system failure modes and recovery strategies. Triggers on reliability engineering, fault tolerance, or distributed system resilience requests.

redis-patterns

5
from organvm-iv-taxis/a-i--skills

Use Redis effectively for caching, pub/sub messaging, rate limiting, distributed locks, and session storage. Covers data structure selection, expiration strategies, and cluster patterns. Triggers on Redis usage, caching architecture, or pub/sub messaging requests.

realtime-websocket-patterns

5
from organvm-iv-taxis/a-i--skills

Implement real-time features with WebSockets, Server-Sent Events, and long polling. Covers connection management, room-based messaging, presence tracking, and scaling strategies. Triggers on WebSocket implementation, real-time communication, or live update feature requests.

react-three-fiber-patterns

5
from organvm-iv-taxis/a-i--skills

Build interactive 3D experiences in React using react-three-fiber (R3F), drei helpers, and shader integration. Covers scene composition, performance optimization, and animation patterns. Triggers on R3F development, React + Three.js, or declarative 3D scene requests.

python-packaging-patterns

5
from organvm-iv-taxis/a-i--skills

Structure Python projects for distribution with pyproject.toml, src layouts, dependency management, and publishing workflows. Covers packaging tools (hatch, setuptools, flit, poetry), versioning strategies, and editable installs. Triggers on Python project setup, packaging configuration, or dependency management requests.

prompt-engineering-patterns

5
from organvm-iv-taxis/a-i--skills

Design effective prompts for LLM agents with structured input/output formats, chain-of-thought reasoning, few-shot examples, and system prompt architecture. Covers Claude-specific patterns and multi-turn conversation design. Triggers on prompt design, LLM interaction patterns, or system prompt architecture requests.

postgres-advanced-patterns

5
from organvm-iv-taxis/a-i--skills

Advanced PostgreSQL patterns for performance optimization, complex queries, indexing strategies, and database design