How osisdie/claude-code-channels works
This project connects messaging apps to a local Claude Code session through channel plugins or broker processes, enabling remote task execution, approvals, and file sharing. Broker channels also provide safety checks and session memory; session maintenance compacts and summarizes conversations and supports user data commands. LINE, WhatsApp, and Teams include documented relay components, while the repository also includes a separate YouTube-to-PDF workflow. The channel-to-Claude interaction is documented in the README; some broker integrations and internal calls are represented only where the supplied source index or excerpts support them.
Main entry points: index.ts Session API · broker.ts Slack broker · yt2pdf.py Transcript-to-PDF workflow · commands.ts Memory commands
Components 29
Messaging channels
- Telegram plugin
external_plugins/telegram-channel/server.ts - Discord plugin
external_plugins/discord-channel/server.ts - Slack broker
external_plugins/slack-channel/broker.ts - LINE broker
external_plugins/line-channel/broker.ts - WhatsApp broker
external_plugins/whatsapp-channel/broker-relay.ts - Teams broker
external_plugins/teams-channel/broker-relay.ts
Webhook relays
- LINE relay worker
external_plugins/line-channel/relay/src/index.ts - WhatsApp relay worker
external_plugins/whatsapp-channel/relay/src/index.ts - Teams relay worker
external_plugins/teams-channel/relay/src/index.ts
Session memory
- Session API
lib/sessions/index.ts - Short-term memory
lib/sessions/stm.ts - Long-term memory
lib/sessions/ltm.ts - Memory compactor
lib/sessions/compactor.ts - Maintenance scheduler
lib/sessions/scheduler.ts - Memory commands
lib/sessions/commands.ts - Data cleanup
lib/sessions/cleanup.ts
Safety controls
- Safety API
lib/safety/index.ts - Content filter
lib/safety/filter.ts - Usage quota
lib/safety/quota.ts - Audit logging
lib/safety/audit.ts
YouTube to PDF
- Transcript-to-PDF workflow
scripts/yt/yt2pdf.py - Transcript extraction
scripts/yt/get_transcript.py - HTML generation
scripts/yt/build_html.py - PDF generation
scripts/yt/build_pdf.py - B2 upload
scripts/yt/upload_b2.py
Other components
- Remote user
- Messaging app
- Claude Code session
- YouTube user
Connections 37
- Remote user → Messaging app: sends tasks
README.md - Messaging app → Telegram plugin: uses plugin
README.md - Messaging app → Discord plugin: uses plugin
README.md - Messaging app → Slack broker: sends messages
README.md - Messaging app → LINE broker: sends messages
README.md - Messaging app → WhatsApp broker: sends messages
README.md - Messaging app → Teams broker: sends messages
README.md - Telegram plugin → Claude Code session: stdio transport
README.md - Discord plugin → Claude Code session: stdio transport
README.md - Slack broker → Claude Code session: dispatches tasks
README.md - LINE broker → Claude Code session: dispatches tasks
README.md - WhatsApp broker → Claude Code session: dispatches tasks
README.md - Teams broker → Claude Code session: dispatches tasks
README.md - LINE broker → LINE relay worker: polls relay
README.md - WhatsApp broker → WhatsApp relay worker: bridges relay
README.md - Teams broker → Teams relay worker: bridges relay
README.md - Slack broker → Session API: uses sessions
external_plugins/slack-channel/broker.ts - Slack broker → Memory commands: handles commands
external_plugins/slack-channel/broker.ts - Session API → Short-term memory: exports operations
lib/sessions/index.ts - Session API → Long-term memory: exports operations
lib/sessions/index.ts - Session API → Memory compactor: exports operations
lib/sessions/index.ts - Session API → Maintenance scheduler: exports operations
lib/sessions/index.ts - Session API → Data cleanup: exports operations
lib/sessions/index.ts - Maintenance scheduler → Short-term memory: expires messages
lib/sessions/scheduler.ts - Maintenance scheduler → Memory compactor: runs summaries
lib/sessions/scheduler.ts - Memory commands → Data cleanup: manages user data
lib/sessions/commands.ts - Memory commands → Short-term memory: reads and clears
lib/sessions/commands.ts - Memory commands → Long-term memory: reads and deletes
lib/sessions/commands.ts - Slack broker → Safety API: uses safety controls
external_plugins/slack-channel/broker.ts - Safety API → Content filter: exports filter
lib/safety/index.ts - Safety API → Usage quota: exports quota
lib/safety/index.ts - Safety API → Audit logging: exports audit
lib/safety/index.ts - YouTube user → Transcript-to-PDF workflow: requests conversion
README.md - Transcript-to-PDF workflow → Transcript extraction: extracts transcript
scripts/yt/yt2pdf.py - Transcript-to-PDF workflow → HTML generation: builds HTML
scripts/yt/yt2pdf.py - Transcript-to-PDF workflow → PDF generation: builds PDF
scripts/yt/yt2pdf.py - Transcript-to-PDF workflow → B2 upload: uploads PDF
scripts/yt/yt2pdf.py