Skip to content

feat: add discord-threads skill#1054

Open
wenkang-xie wants to merge 1 commit intoqwibitai:mainfrom
wenkang-xie:feat/discord-threads-skill
Open

feat: add discord-threads skill#1054
wenkang-xie wants to merge 1 commit intoqwibitai:mainfrom
wenkang-xie:feat/discord-threads-skill

Conversation

@wenkang-xie
Copy link

Summary

  • New skill (/add-discord-threads) that adds Discord thread management to NanoClaw
  • Agents can create and manage threads via MCP tools (discord_create_thread, discord_manage_thread)
  • Incoming thread messages are auto-routed so agent replies go to the correct thread
  • Follows the fixed-code-file pattern (like x-integration): SKILL.md references standalone code files instead of inline code blocks

File Structure

.claude/skills/add-discord-threads/
├── SKILL.md            # Installation instructions
├── container-skill.md  # Agent-readable skill doc (copied to container)
├── mcp-tools.ts        # Container-side MCP tool registrations
└── ipc-handlers.ts     # Host-side IPC handler functions

How it works

  1. Container side: Two MCP tools registered in ipc-mcp-stdio.ts — agent writes IPC task file, polls for result
  2. Host side: IPC handler in src/ipc.ts receives task, calls Discord REST API to create/manage threads, writes result file
  3. Passive awareness: discord.ts detects thread messages via ThreadChannel, tracks active threads per parent channel, auto-routes replies

Prerequisites

Test plan

  • Skill installs cleanly following SKILL.md instructions
  • npm run build passes after installation
  • npm test passes (271 tests)
  • Thread creation works end-to-end via Discord
  • Agent replies route to active thread automatically

🤖 Generated with Claude Code

Skill with fixed code files (following x-integration pattern):
- container-skill.md: agent-readable skill doc
- mcp-tools.ts: MCP tool registrations for container
- ipc-handlers.ts: host-side IPC handler functions
- SKILL.md: installation instructions referencing fixed files

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Andy-NanoClaw-AI Andy-NanoClaw-AI added Status: Needs Review Ready for maintainer review PR: Skill Skill package or skill-related changes labels Mar 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: Skill Skill package or skill-related changes Status: Needs Review Ready for maintainer review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants