teams-api-4-bot-framework-integration
БесплатноБез исполняемых скриптовНе проверенSub-skill of teams-api: 4. Bot Framework Integration.
от vamseeachanta★ 21 звезда на GitHubОб этом скилле
4. Bot Framework Integration
4. Bot Framework Integration
# bot.py
# ABOUTME: Teams bot using Bot Framework SDK
# ABOUTME: Handles messages, cards, and proactive messaging
from botbuilder.core import (
ActivityHandler,
TurnContext,
CardFactory,
MessageFactory
)
from botbuilder.schema import (
Activity,
ActivityTypes,
ChannelAccount,
Attachment
)
import json
class TeamsBot(ActivityHandler):
"""Microsoft Teams bot handler"""
def __init__(self, conversation_references: dict = None):
self.conversation_references = conversation_references or {}
async def on_message_activity(self, turn_context: TurnContext):
"""Handle incoming messages"""
# Store conversation reference for proactive messaging
self._add_conversation_reference(turn_context.activity)
text = turn_context.activity.text.lower().strip()
user_name = turn_context.activity.from_property.name
if text == "help":
await self._send_help_card(turn_context)
elif text == "status":
await self._send_status_card(turn_context)
elif text.startswith("deploy"):
await self._handle_deploy_command(turn_context, text)
else:
await turn_context.send_activity(
f"Hi {user_name}! I received: '{text}'. Type 'help' for commands."
)
async def on_members_added_activity(
self,
members_added: list,
turn_context: TurnContext
):
"""Handle new members added to conversation"""
for member in members_added:
if member.id != turn_context.activity.recipient.id:
await turn_context.send_activity(
f"Welcome to the team, {member.name}! "
"Type 'help' to see available commands."
)
async def on_adaptive_card_invoke(
self,
turn_context: TurnContext,
invoke_value: dict
):
"""Handle Adaptive Card action invocations"""
action = invoke_value.get("action")
data = invoke_value
if action == "approve":
return await self._handle_approval(turn_context, data, approved=True)
elif action == "reject":
return await self._handle_approval(turn_context, data, approved=False)
elif action == "vote":
return await self._handle_vote(turn_context, data)
return {"status": 200}
async def _send_help_card(self, turn_context: TurnContext):
"""Send help card"""
card = {
"type": "AdaptiveCard",
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.4",
"body": [
{
"type": "TextBlock",
"text": "Bot Commands",
"size": "large",
"weight": "bolder"
},
{
"type": "FactSet",
"facts": [
{"title": "help", "value": "Show this help message"},
{"title": "status", "value": "Show system status"},
{"title": "deploy [env]", "value": "Trigger deployment"},
{"title": "poll [question]", "value": "Create a poll"}
]
}
]
}
attachment = Attachment(
content_type="application/vnd.microsoft.card.adaptive",
content=card
)
await turn_context.send_activity(
MessageFactory.attachment(attachment)
)
async def _send_status_card(self, turn_context: TurnContext):
"""Send status card"""
card = {
"type": "AdaptiveCard",
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.4",
"body": [
{
"type": "TextBlock",
"text": "System Status",
"size": "large",
"weight": "bolder"
},
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"width": "stretch",
"items": [
{"type": "TextBlock", "text": "API", "weight": "bolder"},
{"type": "TextBlock", "text": "Healthy", "color": "good"}
]
},
{
"type": "Column",
"width": "stretch",
"items": [
{"type": "TextBlock", "text": "Database", "weight": "bolder"},
{"type": "TextBlock", "text": "Healthy", "color": "good"}
Установить teams-api-4-bot-framework-integration в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл teams-api-4-bot-framework-integration?
Sub-skill of teams-api: 4. Bot Framework Integration.
Как установить скилл teams-api-4-bot-framework-integration?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл teams-api-4-bot-framework-integration запускает скрипты?
Нет, скилл состоит только из инструкций (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