channel-extension
БесплатноБез исполняемых скриптовНе проверенUse when adding a new messaging channel to Tel-Agent or changing an existing one — a transport under api/channels/, its official extension manifest, its…
от lza6★ 19 звёзд на GitHubОб этом скилле
Building a channel extension
You are adding a messaging channel to Tel-Agent. A channel is a route a customer
uses to reach a business — someone is typing on the other end. If nobody outside the
business is on the other end, it is an integration, not a channel, and it is reached
through the HTTP tool instead (Rule 5 in CLAUDE.md). Do not build it here.
Read first, in this order: CLAUDE.md (the contract), docs/SPEC.md §B9 (secrets)
and §B13 (channels), then api/channels/discord.py end to end. Discord is the model
every channel copies: a dial-out transport with a supervisor loop, an answering policy,
storage with dedup, and delivery-before-storage. For a channel that receives webhooks,
also read api/channels/meta_chat.py and api/routes/meta_chat_channels.py — that is
the public door, and its guards are the whole of this product's exposed surface.
Write everything from the platform's official documentation and from the shape of
the existing modules. Write it fresh. Never paste code from another product into this
repository, never name another product anywhere in it, and never add a runtime
dependency — httpx, websockets, cryptography and the standard library cover every
platform we ship.
What a channel consists of
One kind, one transport module, one manifest, one descriptor, one test file. In order:
| # | Path | What goes there |
|---|---|---|
| 1 | api/channels/<kind>.py |
The transport. Module surface below. |
| 2 | api/extensions/builtin/<kind>.py |
MANIFEST + register(context). Copy the Discord one; change slug, name, description. Category channels, origin official, scopes conversations.write, messages.read, messages.write, hooks message.received, ui_slots conversation.detail. |
| 3 | api/extensions/builtin/__init__.py |
Append the module to BUILTIN. |
| 4 | api/models/conversation.py |
The kind is already in CHANNEL_KINDS (one migration added every kind of this wave). If yours is not, add it and an Alembic revision that widens the channel_kind CHECK constraint — tests/test_migrations.py runs it on SQLite and PostgreSQL. |
| 5 | api/channels/generic.py |
Add the module's import path to _DECLARED. The registry imports it on first read; that is what serves its card and its routes. |
| 6 | api/main.py |
Dial-out channels: append transport.loop(sessionmaker) to background. Door channels: nothing — the generic public route dispatches by kind. |
| 7 | tests/test_<kind>_channel.py |
The test file. Shape below. |
| 8 | web/components/brands/marks.tsx + source/<kind>.svg |
The mark, when the platform has a logo. Record the source and licence in web/components/brands/README.md. A channel with no owner (SMS, IRC) gets a drawn glyph in web/components/shell/channel-mark.tsx. |
| 9 | web/app/[locale]/settings/settings.tsx |
Add the kind to GENERIC_CHANNELS. The card draws itself from the descriptor. |
| 10 | locales/en/web.json |
The display name under "channels". Other languages follow through the translation pipeline; do not touch thirty-four files. |
| 11 | docs/SPEC.md §B13, README.md icon row, docs/brand/channels/ |
One row, one icon, one table line. |
The transport module surface
Every module exposes the same names, so the generic route, the health rollup and the
tests can treat them alike. Signatures are the ones api/channels/discord.py has;
keep them.
KIND = "<kind>"
SETUP = Setup(...) # the descriptor, see below
INBOUND = "dial_out" # or "door"
def make_client() -> httpx.AsyncClient: ... # tests monkeypatch this
async def probe(client, credentials: dict[str, str]) -> str: ...
# "Test connection". Returns the identity the platform reports (bot name, number,
# account) — the card shows it. Raises ChannelRefused on a bad credential.
async def send_text(client, credentials, target: str, text: str) -> None: ...
def message_text(event, identity) -> str | None: ... # the answering policy: None = ignore
async def ingest(db, channel, event) -> int | None: ...
# store one inbound line; None when it was a duplicate or not for us
async def respond(sessionmaker, channel_id: int, message_id: int) -> None: ...
def schedule_reply(sessionmaker, channel_id: int, message_id: int) -> None: ...
# optional
def credentials_changed(channel_id: int) -> None: ...
# What the module is told after the operator writes this channel's fields, so it can
# drop anything it cached on the strength of the old ones — an access token bought
# with a secret that has just been replaced would otherwise keep working until it
# expired, which is a rotation that did not take effect. A module that caches nothing
# declares nothing; `api/routes/generic_channel.py` calls it only when it is there.
def reply_target(conversation) -> str | None: ...
# The address `send_text` needs for this thread, when it is not the conversation's
# own `external_i
Установить channel-extension в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл channel-extension?
Use when adding a new messaging channel to Tel-Agent or changing an existing one — a transport under api/channels/, its official extension manifest, its settings card, tests, health and docs. Covers the file checklist, the two inbound shapes (dial-out and the public door), the credential and signature rules that are not negotiable, the declarative setup descriptor the generic card draws from, and the test shape every channel ships with.
Как установить скилл channel-extension?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл channel-extension запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic