{"aiPlatform":"claude-code@2025.06","category":"development","commandName":"/discord-release","content":"---\nname: Discord Release Agent\ndescription: Automatically generate release notes for Discord by analyzing Git commits since the last published release. Searches Discord for previous release notes, summarizes all commits since then, and creates formatted release notes ready for Discord posting. Works with any Git repository in your current directory.\nallowed_tools:\n  - Bash             # Git operations via command line\n  - mcp-discord      # Discord integration for searching messages\n  - filesystem       # File operations for saving release notes\n---\n\n## Arguments\n\n```\n/discord-release\nguild_id=<discord-guild-id>\n[channel_id=<discord-channel-id>]\n[channel_name=<channel-name-for-releases>]\n[days_back=<number-of-days>]\n[format=<changelog|release|simple>]\n[save_file=<path-to-save-release-notes>]\n[exclude_patterns=<comma-separated-patterns>]\n[create_channel=<true|false>]\n```\n*Defaults → `channel_name=release-notes  days_back=30  format=release  save_file=release-notes.md  exclude_patterns=chore,docs,style  create_channel=true`*\n\n### Example\n\n```\n/discord-release \nguild_id=\"9876543210987654321\"\nchannel_id=\"1234567890123456789\"\nformat=changelog\nsave_file=CHANGELOG-v1.2.0.md\n```\n\n---\n\n## Context – what the AI should do\n\n1. **Initialize Git and Discord**\n   * Use `/Bash` to verify Git repository exists: `git rev-parse --git-dir`\n   * Check for valid Discord MCP server connection\n   * Get repository information using:\n     - `git config --get remote.origin.url` for repo URL\n     - `basename -s .git $(git config --get remote.origin.url)` for project name\n     - Check for package.json or README.md for project description\n\n2. **Setup Release Channel**\n   * If `channel_id` provided, use that channel\n   * Otherwise, check if `channel_name` exists:\n     - If exists and `create_channel=false`, use existing channel\n     - If not exists and `create_channel=true`, create new channel:\n       - Name: `channel_name` (default: \"release-notes\")\n       - Permissions: Bot can write, everyone else read-only\n       - Topic: \"Automated release notes for {project_name}\"\n   * Store channel ID for future use\n\n3. **Find Last Release Notes in Discord**\n   * Use `/mcp-discord__search_messages` in the release channel\n   * Search patterns to look for:\n     - \"Release Notes\"\n     - \"Version\" or \"v\" followed by semantic version\n     - \"What's New\"\n     - \"Changelog\"\n   * Extract the date and version from the last release\n   * If no previous release found:\n     - Generate **Initial Project Summary** instead\n     - Include project description from README/package.json\n     - Analyze full commit history for major features\n     - Create \"Welcome to {project_name}\" announcement\n\n4. **Analyze Git History**\n   * For regular releases:\n     - Get the date of last release or use `days_back` parameter\n     - Use `/Bash` to run: `git log --since=\"YYYY-MM-DD\" --pretty=format:\"%H|%an|%ae|%ad|%s\" --date=short`\n   * For initial project summary:\n     - Get total commit count: `git rev-list --count HEAD`\n     - Get contributor count: `git shortlog -sn | wc -l`\n     - Get first commit date: `git log --reverse --format=%ad --date=short | head -1`\n     - Analyze recent significant commits: `git log --oneline -50`\n   * Parse commit messages for:\n     - Conventional commit types (feat, fix, chore, docs, etc.)\n     - Issue/PR references (#123)\n     - Breaking changes (BREAKING CHANGE in commit body)\n\n5. **Categorize and Filter Commits**\n   * Group commits by type:\n     - **Features**: New functionality (feat)\n     - **Bug Fixes**: Issue resolutions (fix)\n     - **Performance**: Optimization improvements (perf)\n     - **Breaking Changes**: API/behavior changes\n     - **Other Changes**: Remaining significant commits\n   * Apply `exclude_patterns` to filter out unwanted commit types\n   * Remove duplicate or similar commits\n\n6. **Generate Release Notes or Project Summary**\n   * For regular releases:\n     - Determine version number:\n       - Check for latest tag: `git describe --tags --abbrev=0 2>/dev/null`\n       - Or read from package.json: `grep '\"version\"' package.json | cut -d'\"' -f4`\n       - Auto-increment based on commit types (major/minor/patch)\n     - Create formatted release notes based on `format` parameter:\n       - **changelog**: Detailed format with all commits\n       - **release**: User-friendly format with summaries\n       - **simple**: Bullet-point list of changes\n   * For initial project summary:\n     - Project name (from git remote or directory name)\n     - Description (from README.md first paragraph or package.json)\n     - Key features (analyze commit history for major additions)\n     - Technology stack (detect from file extensions and config files)\n     - Total commits and contributors\n     - Project age and activity\n     - Installation instructions (if found in README)\n\n7. **Format for Discord**\n   * Apply Discord markdown formatting:\n     - Bold headers with **text**\n     - Code blocks with triple backticks\n     - Emoji for different change types:\n       - ✨ Features\n       - 🐛 Bug Fixes\n       - ⚡ Performance\n       - 💥 Breaking Changes\n       - 🎉 Initial Release (for project summary)\n   * Keep within Discord message limits (2000 characters)\n   * If too long, create summary with link to full notes\n\n8. **Save and Preview**\n   * Write release notes to `save_file` using `/filesystem__write_file`\n   * Generate a preview showing:\n     - Version number (or \"Initial Release\")\n     - Number of commits included\n     - Major highlights\n     - Full formatted release notes\n   * Provide instructions for posting to Discord\n\n9. **Channel Permissions Verification**\n   * If new channel was created, verify permissions:\n     - Bot has SEND_MESSAGES, EMBED_LINKS, READ_MESSAGE_HISTORY\n     - @everyone has VIEW_CHANNEL but not SEND_MESSAGES\n     - Provide command to fix permissions if needed\n\n10. **Quality Checks**\n    * Verify all significant changes are included\n    * Check for any security-related commits that need highlighting\n    * Ensure proper credit to contributors (if commit has Co-authored-by)\n    * Validate markdown formatting\n\n11. **Generate Posting Instructions**\n    * Provide the Discord channel name/ID\n    * Show the formatted message ready to copy\n    * If channel was created, note it's read-only for others\n    * Include any additional context (e.g., @mentions for major features)\n    * Suggest timing for posting if applicable\n\n> The command should make it effortless to maintain consistent, professional release notes\n> in Discord by automating the tedious process of reviewing commits and formatting announcements.","contentHash":"fc413c77a1fe30709af911339d47782da7e03a0d7ee835d0207904edbe2788d2","copies":0,"createdAt":"2025-07-22T18:35:34.022Z","description":"Automatically generate release notes for Discord by analyzing Git commits since the last published release","downloads":2,"github":{"lastSyncDirection":"from-github","lastSyncError":"Failed to sync YAML command: Failed to extract file contents: logger.logProgress is not a function","repoUrl":"https://github.com/Commands-com/ai-commands","metadata":{"importedFrom":"github_repository","repoPrivate":true,"repoDefaultBranch":"main","connectedAt":"2025-07-22T18:35:34.022Z"},"importedAt":"2025-07-22T18:35:34.022Z","lastSyncAt":"2025-08-17T16:56:10.155Z","fileMapping":{"license":"LICENSE","readme":"discord-release/README.md","assets":[],"mainFile":"discord-release/command.md","yamlPath":"commands.yaml"},"selectedCommand":"discord-release","fileShas":{"mainFile":"c46e475d7c85db7fe6b8356c2ec219b5560817e7","yamlPath":"4507cfda9afa7474437ab79914331e61ec82f4f7","readme":"c01d8b176f9dd9a31bdd66b4a049457cf6026a65"},"branch":"main","connectionType":"commands_yaml","connected":true,"lastSyncCommit":"3f1460bda072265aa9ad932490481f0843dc66f8","importSource":"repository_import","installationId":"69232615","syncStatus":"synced"},"githubRepoUrl":"https://github.com/Commands-com/ai-commands","id":"3ac726d2-e59c-482e-9527-dcfe476f4040","inputParameters":[{"name":"guild_id","description":"Discord server (guild) ID where the bot will operate","label":"Discord Guild ID","type":"text","required":true,"defaultValue":""},{"name":"channel_id","description":"Discord channel ID to search for previous release notes","label":"Discord Channel ID","type":"text","required":false,"defaultValue":""},{"name":"channel_name","description":"Name for the release notes channel (used when creating new channel)","label":"Channel Name","type":"text","required":false,"defaultValue":"release-notes"},{"name":"days_back","description":"Number of days to analyze if no previous release found","label":"Days to Look Back","type":"text","required":false,"defaultValue":"30"},{"defaultValue":"release","name":"format","options":["changelog","release","simple"],"description":"Output format for the release notes","label":"Release Notes Format","type":"select","required":false},{"name":"save_file","description":"Path to save the generated release notes","label":"Save File Path","type":"text","required":false,"defaultValue":"release-notes.md"},{"name":"exclude_patterns","description":"Comma-separated patterns of commit types to exclude","label":"Exclude Patterns","type":"text","required":false,"defaultValue":"chore,docs,style"},{"defaultValue":"true","name":"create_channel","options":["true","false"],"description":"Create a new read-only channel if it doesn't exist","label":"Create Channel","type":"select","required":false}],"instructions":"# Discord Release Generator\n\nAutomatically generate professional release notes for Discord by analyzing Git commits since your last published release. This command searches your Discord channel for previous release notes, summarizes all commits since then, and creates beautifully formatted release notes ready for posting.\n\n## Features\n\n- 🔍 **Automatic Detection**: Finds your last release notes in Discord automatically\n- 📊 **Smart Categorization**: Groups commits by type (features, fixes, performance, etc.)\n- 🎨 **Discord-Optimized**: Formats with Discord markdown and appropriate emojis\n- 🔧 **Customizable**: Multiple format options and filtering capabilities\n- 📝 **Version Management**: Auto-detects or suggests version numbers\n- 💾 **Export Options**: Save release notes for documentation\n- 🎉 **Initial Release Support**: Generates project summary when no previous releases exist\n- 🔒 **Auto-Channel Creation**: Creates read-only release channel with proper permissions\n\n## Prerequisites\n\nThis command requires the following MCP servers:\n\n1. **Discord** - For searching previous release notes and posting\n   ```bash\n   claude mcp add mcp-discord -- docker run -i --rm mcp/mcp-discord:latest\n   ```\n\n2. **Filesystem** - For saving release notes\n   ```bash\n   claude mcp add filesystem -- docker run -i --rm mcp/filesystem:latest\n   ```\n\n**Note**: Git operations are handled through Claude Code's built-in Bash tool, so no separate Git MCP server is needed. The command works with whatever Git repository you're currently in.\n\n## Installation\n\n1. Import this command to your Commands.com account through GitHub\n2. Ensure required MCP servers are installed (see Prerequisites)\n3. Configure Discord MCP server with your bot token\n4. Navigate to any Git repository in Claude Code\n\n## Usage\n\n### Basic Usage\n\nGenerate release notes by searching the last 30 days:\n\n```bash\n/discord-release guild_id=\"YOUR_DISCORD_GUILD_ID\"\n```\n\n### Specify Discord Channel\n\nTarget a specific Discord channel:\n\n```bash\n/discord-release guild_id=\"YOUR_DISCORD_GUILD_ID\" channel_id=\"1234567890123456789\"\n```\n\n### Auto-Create Release Channel\n\nCreate a dedicated read-only channel for releases:\n\n```bash\n/discord-release guild_id=\"YOUR_DISCORD_GUILD_ID\" channel_name=\"release-notes\" create_channel=true\n```\n\n### Custom Time Range\n\nLook back a specific number of days:\n\n```bash\n/discord-release guild_id=\"YOUR_DISCORD_GUILD_ID\" days_back=14\n```\n\n### Format Options\n\nChoose from different formatting styles:\n\n```bash\n# Detailed changelog format\n/discord-release guild_id=\"YOUR_DISCORD_GUILD_ID\" format=changelog\n\n# User-friendly release format (default)\n/discord-release guild_id=\"YOUR_DISCORD_GUILD_ID\" format=release\n\n# Simple bullet-point list\n/discord-release guild_id=\"YOUR_DISCORD_GUILD_ID\" format=simple\n```\n\n### Save to File\n\nExport release notes to a file:\n\n```bash\n/discord-release guild_id=\"YOUR_DISCORD_GUILD_ID\" save_file=releases/v1.2.0.md\n```\n\n### Exclude Commit Types\n\nFilter out certain commit types:\n\n```bash\n/discord-release guild_id=\"YOUR_DISCORD_GUILD_ID\" exclude_patterns=chore,docs,style,test\n```\n\n## Example Output\n\n### Regular Release\n```markdown\n**📢 Release Notes - v1.2.0**\n\n*Released on July 22, 2025*\n\n**✨ New Features**\n• Added Discord release generator for automated changelog creation\n• Implemented smart commit categorization with conventional commit support\n• Enhanced MCP server discovery with 100+ available integrations\n\n**🐛 Bug Fixes**\n• Fixed issue with Git commit parsing for merge commits\n• Resolved Discord message search pagination bug\n• Corrected version number auto-increment logic\n\n**⚡ Performance Improvements**\n• Optimized commit analysis for large repositories (2x faster)\n• Reduced memory usage during Discord message search\n\n**💥 Breaking Changes**\n• Changed default format from 'simple' to 'release' for better readability\n\n---\n*Full changelog: 47 commits from 8 contributors*\n```\n\n### Initial Project Summary\n```markdown\n**🎉 Welcome to MyAwesomeProject!**\n\n*A powerful tool for automating development workflows*\n\n**📋 Project Overview**\nMyAwesomeProject is a comprehensive solution for managing and automating your development pipeline with AI-powered intelligence.\n\n**🚀 Key Features**\n• Intelligent code analysis and review\n• Automated documentation generation\n• CI/CD pipeline integration\n• Multi-language support\n• Real-time collaboration tools\n\n**💻 Technology Stack**\n• Node.js + TypeScript\n• React for UI\n• PostgreSQL database\n• Docker containerization\n\n**📊 Project Statistics**\n• 1,247 total commits\n• 12 contributors\n• 6 months of active development\n• 89% test coverage\n\n**🏁 Getting Started**\n```bash\nnpm install myawesomeproject\nnpx myawesomeproject init\n```\n\n---\n*Visit our [documentation](https://docs.example.com) for more information*\n```\n\n## Configuration\n\n### Discord Setup\n\n1. Create a Discord bot and get its token\n2. Configure the Discord MCP server with your bot token\n3. Get your Discord Guild ID:\n   - Enable Developer Mode in Discord Settings > Advanced\n   - Right-click your server name\n   - Select \"Copy Server ID\"\n4. Ensure your bot has the following permissions:\n   - View Channels\n   - Send Messages\n   - Read Message History\n   - Manage Channels (if using auto-create feature)\n   - Manage Permissions (for read-only channel setup)\n\n### Git Configuration\n\nThe command automatically works with the Git repository in your current directory:\n- No additional Git setup required\n- Uses Claude Code's built-in Git access\n- Reads commit history directly from your local repository\n- Parses conventional commit messages for better categorization\n- Extracts contributor information from commit authors\n\n## Tips\n\n1. **Consistent Commit Messages**: Use conventional commits (feat:, fix:, etc.) for better categorization\n2. **Version Tags**: Tag your releases in Git for automatic version detection\n3. **Release Schedule**: Run this command as part of your regular release cycle\n4. **Channel Organization**: Use a dedicated channel for release notes to make searching easier\n5. **First Time Setup**: The command will generate a comprehensive project summary if no previous releases are found\n6. **Read-Only Channels**: The auto-created channel ensures only the bot can post, keeping release history clean\n\n## Troubleshooting\n\n### \"No previous release found\"\n- The command will generate an initial project summary instead\n- This is normal for first-time use\n- Subsequent runs will find this initial release and generate proper changelogs\n\n### \"Discord channel not found\"\n- Verify the channel ID is correct\n- Ensure your Discord bot has access to the channel\n- Try omitting channel_id to let the command create one\n\n### \"Cannot create channel\"\n- Ensure your bot has \"Manage Channels\" permission\n- Check that the guild allows bot-created channels\n- Try using an existing channel with `create_channel=false`\n\n### \"Commits not categorized correctly\"\n- Use conventional commit format: `type(scope): description`\n- Common types: feat, fix, docs, style, refactor, perf, test, chore\n\n## Support\n\nFor issues or feature requests, please visit the [Commands.com support](https://commands.com/support) page.  Thank you.","lastDownloaded":"2025-08-30T20:27:47.792Z","licenseType":"mit","likes":0,"mcpRequirements":[{"tier":"required","serverId":"docker-mcp-discord"},{"tier":"required","serverId":"docker-filesystem"}],"mcp_search_content":"docker-mcp-discord docker-filesystem","organizationUsername":"commands-com","price":"free","processedGalleryItems":[{"s3KeyThumbnail":"processed/3ac726d2-e59c-482e-9527-dcfe476f4040/1753209334792_preview_thumb.webp","s3KeyLarge":"processed/3ac726d2-e59c-482e-9527-dcfe476f4040/1753209334792_preview.webp","name":"1753209334792_preview.webp","originalKey":"temp-uploads/3ac726d2-e59c-482e-9527-dcfe476f4040/1753209334792_preview.png","pathLarge":"3ac726d2-e59c-482e-9527-dcfe476f4040/1753209334792_preview.webp","type":"image/webp","pathThumbnail":"3ac726d2-e59c-482e-9527-dcfe476f4040/1753209334792_preview_thumb.webp"}],"search_content":"discord release notes generator automatically generate release notes for discord by analyzing git commits since the last published release /discord-release development claude","title":"Discord Release Generator","type":"command","updatedAt":"2025-08-17T16:56:10.155Z","userId":"W0V8NAw5AhWRwcuwSoFLOi1Yem83","visibility":"public","name":"discord-release","userInteraction":{"userHasStarred":false}}