Building Better Discord Bot Messages with Components V2 (and AI) A developer released discord-components-v2-skill, an open-source agent skill that teaches AI coding assistants such as Claude Code, Cursor, and Codex how to build Discord messages using Components V2 and discord.js. The skill packages a focused reference on component structure, builders, limits, and API usage so agents avoid outdated embed patterns, and installs via 'npx skills add Dqrshan/discord-components-v2-skill' or a cloned repository's install.sh script. If you've built Discord bots with discord.js, you're probably familiar with embeds. They work well, but Discord's Components V2 opens up more possibilities for building structured, interactive, and modern messages. The challenge? Getting the component structure, builders, limits, and API usage right can take time — especially when working with AI coding assistants. That's why I built discord-components-v2-skill https://dcs.drshn.tech/ . It's a ready-to-use agent skill that teaches AI coding assistants how to build Discord messages using Components V2 and discord.js. Instead of repeatedly explaining the API to your coding agent, you can give it a focused reference covering: It works with Claude Code, Cursor, Codex, and other agents supporting the Agent Skills format. Here's what a simple Components V2 message looks like: const { ContainerBuilder, TextDisplayBuilder, SeparatorBuilder, SeparatorSpacingSize, ActionRowBuilder, ButtonBuilder, ButtonStyle, MessageFlags, } = require 'discord.js' ; await channel.send { flags: MessageFlags.IsComponentsV2, components: new ContainerBuilder .setAccentColor 0x5865F2 .addTextDisplayComponents new TextDisplayBuilder .setContent ' Welcome \nWelcome to our server.' .addSeparatorComponents new SeparatorBuilder .setDivider true .setSpacing SeparatorSpacingSize.Small .addActionRowComponents new ActionRowBuilder .addComponents new ButtonBuilder .setCustomId 'welcome:continue' .setLabel 'Continue' .setStyle ButtonStyle.Primary , , } ; The skill helps your coding agent understand how to structure messages like this without relying on outdated embed patterns. The easiest way to install it: npx skills add Dqrshan/discord-components-v2-skill You can also clone the repository and use the included installer: git clone https://github.com/Dqrshan/discord-components-v2-skill.git cd discord-components-v2-skill ./install.sh AI coding assistants are useful, but they don't always get library-specific APIs right. Discord Components V2 has its own rules, component limits, and builder patterns. A focused skill gives coding agents the context they need instead of making developers correct the same mistakes repeatedly. The goal is simple: spend less time fixing generated Discord UI code and more time building your bot. The project is open source and available on GitHub: 👉 Dqrshan/discord-components-v2-skill https://github.com/Dqrshan/discord-components-v2-skill If you build Discord bots or experiment with AI coding agents, give it a try. Issues, feedback, and contributions are welcome Happy building 🚀