# Alerter

> A 股告警推送工具。当用户需要将告警/报告/监控结果推送到微信/钉钉/Slack/Telegram/企业微信/Server 酱等渠道时,Claude 应使用此 Skill。支持 Markdown 消息、自定义 webhook、批量推送。可与 watchlist-monitor 联动实现盘中实时告警。

- **Type:** Skill
- **Install:** `agentstack add skill-zicxr-a-stock-skills-alerter`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [ZICXR](https://agentstack.voostack.com/s/zicxr)
- **Installs:** 0
- **Category:** [AI & ML](https://agentstack.voostack.com/c/ai-and-ml)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [ZICXR](https://github.com/ZICXR)
- **Source:** https://github.com/ZICXR/A-Stock-Skills/tree/main/skills/06-tools/alerter
- **Website:** https://github.com/ZICXR/A-Stock-Skills#readme

## Install

```sh
agentstack add skill-zicxr-a-stock-skills-alerter
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# A 股告警推送 Skill

## 何时使用

- 用户需要微信/钉钉/Slack 通知
- 用户需要将告警实时推送
- 用户需要集成企业微信/Server酱
- 用户需要批量推送报告

## 支持的渠道

| 渠道 | 难度 | 适用 |
|------|------|------|
| 钉钉 | 易 | 团队 |
| 飞书 | 易 | 团队 |
| 企业微信 | 易 | 企业 |
| Slack | 易 | 海外团队 |
| Telegram | 中 | 个人 |
| Server 酱 (微信) | 易 | 个人微信 |
| 自定义 Webhook | 易 | 通用 |
| 邮件 (SMTP) | 中 | 传统 |

## 使用方式

### 1. 钉钉推送

```bash
python main.py dingtalk \
    --webhook "https://oapi.dingtalk.com/robot/send?access_token=xxx" \
    --title "涨停板告警" \
    --content "## 今日涨停 56 只\n- 000001 平安银行"
```

### 2. 企业微信推送

```bash
python main.py wechat \
    --webhook "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=xxx" \
    --content "今日复盘..."
```

### 3. Server 酱 (推送到微信)

```bash
python main.py serverchan \
    --key "SCT123xxx" \
    --title "涨停告警" \
    --content "..."
```

### 4. 飞书推送

```bash
python main.py feishu \
    --webhook "https://open.feishu.cn/open-apis/bot/v2/hook/xxx" \
    --content "..."
```

### 5. 配置文件 (推荐)

编辑 `~/.astock_skills/alert_config.yaml`:

```yaml
channels:
  dingtalk:
    webhook: "https://oapi.dingtalk.com/robot/send?access_token=xxx"
    secret: "SEC..."
  wechat:
    webhook: "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=xxx"
  serverchan:
    key: "SCTxxx"
  feishu:
    webhook: "https://open.feishu.cn/open-apis/bot/v2/hook/xxx"
```

然后:

```bash
python main.py send --channel dingtalk --content "..."
```

## Python API

```python
from skills.06-tools.alerter.main import send

# 钉钉
send("dingtalk", title="告警", content="## 内容", webhook="...")

# 企业微信
send("wechat", content="...", webhook="...")

# 从配置文件
send("dingtalk", content="...", config="~/.astock_skills/alert_config.yaml")
```

## 与 watchlist-monitor 集成

```bash
# 监控 + 推送
python skills/02-data-collection/watchlist-monitor/main.py monitor \
    --config watchlist.yaml \
    | python skills/06-tools/alerter/main.py forward --channel dingtalk
```

## 依赖

```
requests>=2.28.0
pyyaml>=5.4.0
```

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [ZICXR](https://github.com/ZICXR)
- **Source:** [ZICXR/A-Stock-Skills](https://github.com/ZICXR/A-Stock-Skills)
- **License:** MIT
- **Homepage:** https://github.com/ZICXR/A-Stock-Skills#readme

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-zicxr-a-stock-skills-alerter
- Seller: https://agentstack.voostack.com/s/zicxr
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
