discord-webhook

$npx mdskill add vm0-ai/vm0-skills/discord-webhook

Send formatted messages to Discord via webhook API.

  • Delivers alerts, updates, and rich embeds instantly.
  • Requires DISCORD_WEBHOOK_URL environment variable.
  • Executes direct POST requests to Discord endpoints.
  • Outputs raw HTTP responses to the terminal.

SKILL.md

.github/skills/discord-webhookView on GitHub ↗
---
name: discord-webhook
description: Discord Webhook API for sending messages. Use when user says "send Discord
  message", "Discord webhook", or "post to Discord".
---

## How to Use

All examples below assume you have `DISCORD_WEBHOOK_URL` set.

### 1. Send Simple Message

Write to `/tmp/discord_webhook_request.json`:

```json
{
  "content": "Hello from webhook!"
}
```

Then run:

```bash
curl -s -X POST "$DISCORD_WEBHOOK_URL" -H "Content-Type: application/json" -d @/tmp/discord_webhook_request.json
```

### 2. Send with Custom Username and Avatar

Write to `/tmp/discord_webhook_request.json`:

```json
{
  "content": "Alert!",
  "username": "Alert Bot",
  "avatar_url": "https://i.imgur.com/4M34hi2.png"
}
```

Then run:

```bash
curl -s -X POST "$DISCORD_WEBHOOK_URL" -H "Content-Type: application/json" -d @/tmp/discord_webhook_request.json
```

### 3. Send Rich Embed

Write to `/tmp/discord_webhook_request.json`:

```json
{
  "embeds": [
    {
      "title": "Deployment Complete",
      "description": "Version 1.2.3 deployed to production",
      "color": 5763719,
      "fields": [
        {
          "name": "Environment",
          "value": "Production",
          "inline": true
        },
        {
          "name": "Status",
          "value": "Success",
          "inline": true
        }
      ],
      "timestamp": "2025-01-01T12:00:00.000Z"
    }
  ]
}
```

Then run:

```bash
curl -s -X POST "$DISCORD_WEBHOOK_URL" -H "Content-Type: application/json" -d @/tmp/discord_webhook_request.json
```

**Common colors (decimal):**
- Green: `5763719`
- Red: `15548997`
- Blue: `5793266`
- Yellow: `16776960`
- Orange: `16744192`

### 4. Send Error Alert

Write to `/tmp/discord_webhook_request.json`:

```json
{
  "embeds": [
    {
      "title": "Error Alert",
      "description": "Database connection failed",
      "color": 15548997,
      "fields": [
        {
          "name": "Service",
          "value": "api-server"
        },
        {
          "name": "Error",
          "value": "Connection timeout"
        }
      ],
      "footer": {
        "text": "Monitor"
      }
    }
  ]
}
```

Then run:

```bash
curl -s -X POST "$DISCORD_WEBHOOK_URL" -H "Content-Type: application/json" -d @/tmp/discord_webhook_request.json
```

### 5. Send File Attachment

Write to `/tmp/discord_webhook_payload.json`:

```json
{
  "content": "Screenshot attached"
}
```

Then run:

```bash
curl -s -X POST "$DISCORD_WEBHOOK_URL" -F "file1=@screenshot.png" -F 'payload_json=@/tmp/discord_webhook_payload.json'
```

### 6. Send Multiple Files

Write to `/tmp/discord_webhook_payload.json`:

```json
{
  "content": "Log files attached"
}
```

Then run:

```bash
curl -s -X POST "$DISCORD_WEBHOOK_URL" -F "file1=@error.log" -F "file2=@debug.log" -F 'payload_json=@/tmp/discord_webhook_payload.json'
```

### 7. Send Multiple Embeds

Write to `/tmp/discord_webhook_request.json`:

```json
{
  "embeds": [
    {
      "title": "Build Started",
      "color": 16776960
    },
    {
      "title": "Tests Passed",
      "color": 5763719
    },
    {
      "title": "Deployed",
      "color": 5793266
    }
  ]
}
```

Then run:

```bash
curl -s -X POST "$DISCORD_WEBHOOK_URL" -H "Content-Type: application/json" -d @/tmp/discord_webhook_request.json
```

### 8. Send with Mention

Write to `/tmp/discord_webhook_request.json`:

```json
{
  "content": "<@<your-user-id>> Check this out!",
  "allowed_mentions": {
    "users": ["<your-user-id>"]
  }
}
```

Then run:

```bash
curl -s -X POST "$DISCORD_WEBHOOK_URL" -H "Content-Type: application/json" -d @/tmp/discord_webhook_request.json
```

Replace `<your-user-id>` with the actual Discord user ID.

### 9. Send Silent Message (No Notification)

Write to `/tmp/discord_webhook_request.json`:

```json
{
  "content": "Silent update",
  "flags": 4096
}
```

Then run:

```bash
curl -s -X POST "$DISCORD_WEBHOOK_URL" -H "Content-Type: application/json" -d @/tmp/discord_webhook_request.json
```

### 10. CI/CD Pipeline Notification

Write to `/tmp/discord_webhook_request.json`:

```json
{
  "username": "GitHub Actions",
  "embeds": [
    {
      "title": "Pipeline Status",
      "color": 5763719,
      "fields": [
        {
          "name": "Repository",
          "value": "myorg/myrepo",
          "inline": true
        },
        {
          "name": "Branch",
          "value": "main",
          "inline": true
        },
        {
          "name": "Commit",
          "value": "abc1234",
          "inline": true
        },
        {
          "name": "Status",
          "value": "Success"
        }
      ],
      "timestamp": "2025-01-01T12:00:00.000Z"
    }
  ]
}
```

Then run:

```bash
curl -s -X POST "$DISCORD_WEBHOOK_URL" -H "Content-Type: application/json" -d @/tmp/discord_webhook_request.json
```

## Embed Structure

```json
{
  "title": "Title text",
  "description": "Description text",
  "url": "https://example.com",
  "color": 5763719,
  "fields": [
  {"name": "Field 1", "value": "Value 1", "inline": true}
  ],
  "author": {"name": "Author", "icon_url": "https://..."},
  "footer": {"text": "Footer text"},
  "thumbnail": {"url": "https://..."},
  "image": {"url": "https://..."},
  "timestamp": "2025-01-01T12:00:00.000Z"
}
```

## Guidelines

1. **Rate limits**: 30 requests per 60 seconds per webhook
2. **Message limit**: 2000 characters for content
3. **Embed limits**: Max 10 embeds, 6000 total characters
4. **File limits**: Max 8MB per file (50MB with Nitro boost)
5. **Security**: Treat webhook URLs like passwords

More from vm0-ai/vm0-skills

SkillDescription
account-reconciliationPerform account reconciliations comparing general ledger balances against subledgers, bank statements, or external records. Use for bank reconciliation, GL-to-subledger reconciliation, intercompany reconciliation, balance sheet reconciliation, reconciling item analysis, outstanding item aging, or clearing open items.
agentphoneBuild AI phone agents with AgentPhone API. Use when the user wants to make phone calls, send/receive SMS, manage phone numbers, create voice agents, set up webhooks, or check usage — anything related to telephony, phone numbers, or voice AI.
ahrefsAhrefs SEO API for backlink and keyword analysis. Use when user mentions
amplitudeAmplitude product analytics API. Use when user mentions "Amplitude",
analysis-qaQuality-check a data analysis before sharing — verify joins, aggregations, denominators, time ranges, and metric definitions. Detect pitfalls like survivorship bias, average-of-averages, join explosion, timezone mismatches, incomplete periods, and selection bias. Includes documentation templates for reproducible analyses.
anthropic-managed-agentsAnthropic Managed Agents API for programmatically creating, running, and streaming AI agents on Anthropic's cloud infrastructure. Use when the user mentions "Managed Agents", "Anthropic agent sessions", or needs to create/run/stream an Anthropic agent with tool use (bash, git, web), attach GitHub repositories, or inject secrets via Vault. Do NOT use for standard Claude Messages API — use the Claude API skill instead.
apifyApify web scraping platform. Use when user mentions "scrape website",
asanaAsana API for tasks and projects. Use when user mentions "Asana", "asana.com",
atlassianAtlassian API for Confluence and Jira. Use when user mentions "Confluence
attioAttio REST API for AI-native CRM operations — manage companies, people, deals, and custom objects, plus notes, tasks, lists, and comments. Use when the user mentions "Attio", "CRM record", "create company", "add person", "list entry", "CRM note", or "CRM task".