Channels Bootstrap
БесплатноБез исполняемых скриптовНе проверенProduction-ready channel server implementations — CI webhook receiver, mobile approval relay, Discord/Telegram bridge, and local fakechat dev profile…
от TheLobbi★ 22 звезды на GitHubОб этом скилле
Channels Bootstrap — Starter Implementations
Four production-ready channel server patterns. Each is runnable with Bun or Node.js,
includes sender allowlists, and handles the security concerns that make channels safe to
deploy. Copy the one that fits your use case, drop it in your repo, and register it in
.mcp.json.
Prerequisites: Claude Code v2.1.80+, claude.ai login (not API key), Bun or Node.js Security rule: Every inbound channel is a prompt injection vector — always gate on sender identity before forwarding any content to Claude.
Pattern 1: CI Webhook Receiver
Use case: React to CI/CD events (GitHub Actions failures, build completions, deploy status) without polling. Claude gets notified when a build breaks and can investigate, post a PR comment, or open a fix branch automatically.
channels/ci-webhook.ts
#!/usr/bin/env bun
/**
* CI Webhook Channel — receives POST events from GitHub Actions, GitLab CI,
* Jenkins, or any webhook-capable CI system and pushes them into Claude Code.
*
* Security: webhook HMAC signature verification (GitHub Actions compatible).
* Setup: set WEBHOOK_SECRET env var matching your CI platform's secret.
*
* Register in .mcp.json:
* "ci-webhook": { "command": "bun", "args": ["./channels/ci-webhook.ts"],
* "env": { "WEBHOOK_SECRET": "${WEBHOOK_SECRET}" } }
*
* Start:
* claude --dangerously-load-development-channels server:ci-webhook
*
* Test:
* curl -X POST http://127.0.0.1:8788/webhook \
* -H "Content-Type: application/json" \
* -d '{"action":"completed","workflow_run":{"name":"CI","conclusion":"failure","html_url":"https://github.com/org/repo/actions/runs/123"}}'
*/
import { Server } from '@modelcontextprotocol/sdk/server/index.js'
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'
import { createHmac, timingSafeEqual } from 'crypto'
const WEBHOOK_SECRET = process.env.WEBHOOK_SECRET ?? ''
const PORT = parseInt(process.env.CI_WEBHOOK_PORT ?? '8788', 10)
// Map CI event types to human-readable summaries for Claude
function summarizeEvent(event: string, body: Record<string, unknown>): string | null {
switch (event) {
case 'workflow_run': {
const run = body.workflow_run as Record<string, unknown>
if (!run) return null
if (run.conclusion === 'failure') {
return `CI FAILURE: Workflow "${run.name}" failed on branch "${run.head_branch}". ` +
`Commit: ${String(run.head_sha).slice(0, 7)}. ` +
`Run: ${run.html_url}`
}
if (run.conclusion === 'success') {
return `CI SUCCESS: Workflow "${run.name}" passed on branch "${run.head_branch}".`
}
return null // ignore in-progress events
}
case 'push': {
const commits = (body.commits as unknown[])?.length ?? 0
const ref = String(body.ref ?? '').replace('refs/heads/', '')
const pusher = (body.pusher as Record<string, unknown>)?.name ?? 'unknown'
return `PUSH: ${pusher} pushed ${commits} commit(s) to ${ref}.`
}
case 'pull_request': {
const pr = body.pull_request as Record<string, unknown>
const action = String(body.action ?? '')
if (!['opened', 'ready_for_review', 'closed'].includes(action)) return null
const state = action === 'closed' && body.merged ? 'merged' : action
return `PR ${state.toUpperCase()}: "${pr?.title}" → ${pr?.base?.branch ?? 'main'}. ` +
`URL: ${pr?.html_url}`
}
case 'deployment_status': {
const ds = body.deployment_status as Record<string, unknown>
const env = (body.deployment as Record<string, unknown>)?.environment ?? 'unknown'
if (ds?.state === 'failure') {
return `DEPLOY FAILURE: Deployment to ${env} failed. ` +
`Log: ${ds?.log_url ?? 'no log'}`
}
if (ds?.state === 'success') {
return `DEPLOY SUCCESS: Deployed to ${env}.`
}
return null
}
default:
return null
}
}
// Verify GitHub webhook signature (HMAC-SHA256)
async function verifySignature(body: string, signature: string | null): Promise<boolean> {
if (!WEBHOOK_SECRET) return true // no secret configured — allow all (dev mode)
if (!signature) return false
const expected = 'sha256=' + createHmac('sha256', WEBHOOK_SECRET).update(body).digest('hex')
try {
return timingSafeEqual(Buffer.from(signature), Buffer.from(expected))
} catch {
return false
}
}
const mcp = new Server(
{ name: 'ci-webhook', version: '1.0.0' },
{
capabilities: { experimental: { 'claude/channel': {} } },
instructions:
'CI and deployment events arrive as <channel source="ci-webhook" event="..." ...>. ' +
'For FAILURE events: investigate the failure, check recent commits, and propose a fix. ' +
'For DEPLOY FAILURE: check logs and determine rollback vs hot-fix. ' +
'For PR events: summarize changes if asked. ' +
'Do not act on SUCCESS events unles
Установить Channels Bootstrap в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
ReadWriteBashGlobFAQ
Что делает скилл Channels Bootstrap?
Production-ready channel server implementations — CI webhook receiver, mobile approval relay, Discord/Telegram bridge, and local fakechat dev profile. Copy-paste starter code with sender allowlists, permission relay, and security hardening.
Как установить скилл Channels Bootstrap?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл Channels Bootstrap запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic