notify

Use when sending notifications via Feishu (Lark) or Telegram in Go projects, integrating webhook messages, rich-text posts, urgent phone calls, or Telegram bot commands

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "notify" with this command: npx skills add quantprocessing/notify/quantprocessing-notify-notify

Notify

Overview

Lightweight Go library for sending notifications via Feishu (Lark) and Telegram. Both packages use a Dual-API pattern — global convenience functions for simple use, plus NewBot() constructors for multi-instance scenarios.

Module: github.com/QuantProcessing/notify

Quick Reference

feishu package

FunctionDescription
Init(cfg Config)Initialize global Feishu bot
SendText(text)Send plain text via webhook (global)
SendRichText(title, content)Send rich-text post via webhook (global)
SendUrgentText(text)Send text + trigger phone call (global, needs AppID/AppSecret/UserOpenID)
NewBot(cfg Config) *BotCreate independent Bot instance

Config: Webhook (required), AppID, AppSecret, UserOpenID (optional, for SDK/urgent calls)

telegram package

FunctionDescription
Init(cfg Config) errorInitialize global Telegram bot
Notify(msg) errorSend message to default chat (global)
Start(ctx)Start long-polling, blocks until ctx cancelled
NewBot(cfg Config) (*Bot, error)Create independent Bot instance

Config: BotToken (required), ChatID (comma-separated, first = default for Notify)

Bot methods: Notify(msg), RegisterHandler(handlerType, pattern, matchType, handler)

Usage Patterns

Global API

import "github.com/QuantProcessing/notify/feishu"

feishu.Init(feishu.Config{Webhook: "https://open.feishu.cn/open-apis/bot/v2/hook/xxx"})
feishu.SendText("Hello!")
import "github.com/QuantProcessing/notify/telegram"

telegram.Init(telegram.Config{BotToken: "123456:ABC-DEF...", ChatID: "12345678"})
telegram.Notify("Trade executed!")

Multi-Instance

bot := feishu.NewBot(feishu.Config{Webhook: "https://..."})
bot.SendText("Hello from instance!")

Rich Text (Feishu)

feishu.SendRichText("Alert", [][]feishu.PostElem{
    {feishu.NewTextElem("Server "), feishu.NewAElem("down", "https://example.com")},
    {feishu.NewAtElem("ou_user_id")},
})

Telegram Long Polling

ctx, cancel := context.WithCancel(context.Background())
defer cancel()
telegram.Start(ctx) // blocks until ctx is cancelled

Environment Variables

VariablePackageRequiredDescription
FEISHU_WEBHOOKfeishuYesWebhook URL for bot messages
FEISHU_APP_IDfeishuNoLark App ID (for SDK features / urgent calls)
FEISHU_APP_SECRETfeishuNoLark App Secret
FEISHU_USER_OPEN_IDfeishuNoUser Open ID (for phone urgent calls)
TELEGRAM_BOT_TOKENtelegramYesTelegram bot token
TELEGRAM_CHAT_IDtelegramYesComma-separated chat IDs

Common Mistakes

  • Forgetting Init() before global functions → returns ErrNotInitialized
  • Missing AppID/AppSecret for urgent calls → silently falls back to webhook SendText
  • Invalid Telegram chat ID format → silently skipped, check logs
  • Calling Start() without Init() → silently returns, check logs

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

Let Me Know

Notify the user before starting any long-running task and keep them updated. Use when a task will take noticeable time (>2-3 minutes). Send a start message, schedule a 5‑minute heartbeat update, and send a completion message immediately when done.

Registry SourceRecently Updated
1.6K0Profile unavailable
General

notify

No summary provided by upstream source.

Repository SourceNeeds Review
Automation

Social Alignment

Five-lens alignment framework for sovereign AI agents — evaluate actions across trust, ownership, defense, and sovereignty before proceeding.

Registry SourceRecently Updated
Automation

Baidu Yijian Vision

百度一见专业级视觉 AI Agent:支持图片/视频/及实时视频流分析。相比通用基模,在维持 95%+ 专业精度的同时,推理成本降低 50% 以上,是处理视觉巡检与监控分析任务的首选工具。主打 安全管理、SOP合规、工业质检、商业运营与物料盘点。覆盖:作业 SOP 合规与关键步骤完整性校验;工业质检与表面缺陷精密...

Registry SourceRecently Updated