Skip to content

Guide · Agent skill

How to use the Add Discord Channel agent skill

Updated · written with AI from the project's own documentation and checked against our catalogue data

The add-discord skill is a set of instructions that teaches an AI agent how to connect Discord to NanoClaw, a personal AI assistant framework. It copies a Discord adapter into your NanoClaw project, installs a pinned adapter package, creates a Discord bot with you, and stores the bot's credentials in a local .env file. After following this guide, you will be able to message your NanoClaw agent directly from Discord.

Add Discord Channelnanocoai/nanoclaw · MIT

Quick start

  1. 1Download and unzip the skill. Download the add-discord ZIP from this page and unzip it into ~/.claude/skills/ or a project's .claude/skills/ folder.
  2. 2Ask the agent to add Discord. Describe in plain language that you want Discord added as a channel to your NanoClaw agent.
  3. 3Create the Discord bot. In the Developer Portal, create an application, reset and copy the Bot Token, and enable Message Content Intent.
  4. 4Invite the bot to a shared server. Use the OAuth2 URL Generator to create an invite link with the bot scope and the listed permissions, then add the bot to a server you also join.
  5. 5Paste the Bot Token. Give the token to the agent when prompted so it can verify the token and derive the application ID and public key.
  6. 6Let the agent build, test and restart. The agent runs the build and registration test, stores the credentials in .env, and restarts the NanoClaw service.
  7. 7Message your agent on Discord. Open the direct-message channel with the bot and start talking to your NanoClaw agent.

What does the add-discord skill make the agent do?

An agent skill is a folder of instructions, plus optional scripts and files, that an AI agent reads and follows when you ask for a task. This skill covers one job: adding Discord as a messaging channel for NanoClaw. NanoClaw does not ship with channels built in, so the skill copies the Discord adapter from the project's channels branch.

The agent then registers the adapter, installs the @chat-adapter/discord package at version 4.41.1, builds the project and runs one test. Afterwards it walks you through creating the Discord bot, storing credentials, restarting the service and opening a direct-message channel with the bot.

What do you need before you install it?

The skill assumes you already have a working setup. Check these requirements before starting:

  • A NanoClaw repository with pnpm and a build and test setup
  • Access to the channels git branch of nanocoai/nanoclaw
  • A Discord account and a Discord application with a Bot Token
  • Message Content Intent enabled, and the bot invited to a server you share
  • Network access to discord.com

How do you install the add-discord skill?

Download the ZIP for the skill from this page and unzip it. Then place the folder in one of these locations:

  • Personal skills folder: ~/.claude/skills/
  • Project skills folder: .claude/skills/ inside your project
  • Claude apps: upload the skill under Settings → Capabilities → Skills

How do you trigger the skill with a natural request?

You do not need a special command. Ask the agent in plain language, for example that you want to add Discord as a channel to your NanoClaw agent, or that you want to talk to your agent through Discord. The agent should then load the skill and follow its steps.

The skill also refers to other commands in the NanoClaw project, such as /setup, /init-first-agent and /manage-channels, which are used when wiring a channel to an agent.

What happens during the setup, step by step?

The agent applies the mechanical steps first. It copies src/channels/discord.ts and src/channels/discord-registration.test.ts, appends import './discord.js'; to src/channels/index.ts if it is not already there, and installs @chat-adapter/discord@4.41.1. It then runs pnpm run build and pnpm exec vitest run src/channels/discord-registration.test.ts.

Next comes the human part. You create the bot in the Discord Developer Portal, paste the Bot Token, and the agent checks it against Discord's API. The token is stored in .env along with DISCORD_APPLICATION_ID and DISCORD_PUBLIC_KEY. The service is then restarted with bash setup/lib/restart.sh, and the agent opens a DM channel with the bot.

  • Create the application at discord.com/developers/applications and name it.
  • Under the Bot tab, reset the token and copy it, since Discord shows it only once.
  • Enable Message Content Intent under Privileged Gateway Intents.
  • Under OAuth2 URL Generator, select the bot scope and these permissions: Send Messages, Read Message History, Add Reactions, Attach Files, Use Slash Commands.
  • Open the generated invite URL and add the bot to a server you also belong to.
pnpm run build pnpm exec vitest run src/channels/discord-registration.test.ts

What are the safety notes?

This skill runs scripts and uses the network. It fetches a branch from the NanoClaw repository, runs build and test commands, and calls Discord's API with your bot token. The token is stored in a plain .env file in your project and is sent to Discord's API during setup.

If you want to undo the changes, the REMOVE.md file in the skill describes how to delete the adapter files, remove the import line, delete the three DISCORD_ variables from .env, uninstall the package, and rebuild and restart. Keep the bot token private, and reset it in the Developer Portal if it may have been exposed.

What are some useful tips?

Most setup problems come from the bot token or from the intents. The token is a long string with two dots in it, and the short numeric Application ID is a different value that will not work in its place. If the bot is online but never sees your messages, check that Message Content Intent is enabled.

If the token is rejected with a 401 error, it was probably reset after you copied it, or a space or newline came along with the paste. Reset the token and try again.

  • Use a personal Discord server for testing, since it is easy to share with the bot.
  • Discord servers are also called guilds, and channel IDs can be copied after enabling Developer Mode.
  • Threads are supported by this channel type.

What people use it for

  • Chatting with a personal NanoClaw assistant from your phone through Discord direct messages
  • Talking to a NanoClaw agent in a private Discord server shared with a small group
  • Keeping separate agent groups for different Discord servers with different communities

Frequently asked questions

How do I install the add-discord agent skill?

Download the ZIP from this page and unzip it into ~/.claude/skills/ for personal use, or into .claude/skills/ inside a project. You can also upload it in the Claude apps under Settings → Capabilities → Skills.

What do I need to use the add-discord skill?

You need a NanoClaw repository with pnpm and a build and test setup, access to the channels branch of nanocoai/nanoclaw, a Discord account, and a Discord application with a Bot Token. Message Content Intent must be enabled and the bot must be invited to a server you share.

Is the add-discord skill free?

The skill is listed under the MIT licence. The source does not state any prices, so check the licence file in the repository for the terms.

Why does my Discord bot not respond to messages?

The most common cause is that Message Content Intent is off, so message bodies arrive empty. Enable it under Bot → Privileged Gateway Intents, and make sure the bot shares a server with you.

Is it safe to paste my bot token?

The skill stores the token in your local .env file and sends it to Discord's API during setup. Only use it if you are comfortable with that, and reset the token in the Developer Portal if you think it has leaked.

How do I remove Discord after installing the skill?

Follow the REMOVE.md file in the skill. It deletes the adapter files and import line, removes the DISCORD_ variables from .env, uninstalls @chat-adapter/discord, and then rebuilds and restarts the service.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

This skill suits developers who already run NanoClaw and want to reach their agent from Discord, and who are comfortable creating a bot in the Developer Portal. It is not a good fit for people who have never run a local agent framework or who will not keep a bot token in a local .env file. If you need a simpler chat setup with no terminal work, look for a hosted option instead.

Download the skill