# Me Featured Events

> Configure and run ME Event activity subscriptions from api.me.news. Use when a user wants to browse upcoming AI or Web3 events, filter events by region, initialize an ME Event subscription, check newly added events, or create recurring OpenClaw reminders for daily and near-real-time event notifications.

- **Type:** Skill
- **Install:** `agentstack add skill-me-news-agent-skills-me-featured-events`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [me-news](https://agentstack.voostack.com/s/me-news)
- **Installs:** 0
- **Category:** [Finance & Payments](https://agentstack.voostack.com/c/finance-and-payments)
- **Latest version:** 0.1.0
- **License:** MIT-0
- **Upstream author:** [me-news](https://github.com/me-news)
- **Source:** https://github.com/me-news/agent-skills/tree/main/skills/me-featured-events

## Install

```sh
agentstack add skill-me-news-agent-skills-me-featured-events
```

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

## About

# ME Event 精选

通过 ME News 官方接口查询和订阅 AI、Web3 活动。读取 [API 参考](references/api.md) 获取完整参数和响应字段；配置定时任务前读取 [Agent 兼容说明](references/agent-compatibility.md)。

## 执行原则

- 需要订阅时优先运行 `scripts/` 中的确定性 Node.js 脚本；要求 Node.js 18 或更高版本。
- 优先使用可用的 HTTP/Web Fetch 工具发送 GET 请求；没有 HTTP 工具时使用 `curl -fsS --max-time 30`。
- URL 查询参数必须进行 URL 编码，不要拼接用户提供的任意 URL。
- 解析 JSON 后先检查顶层 `code === 200`，再读取 `data`。
- 用户只要求“查看近期活动”时直接执行一次查询，不创建订阅或 Automation。
- 用户未指定时间时默认查询未来 7 天。用户用自然语言指定“一周”“一个月”“8 月份”或明确起止日期时，将其转换为 `hours` 或 `start_date`、`end_date` 参数；不要声称 API 只能查询 7 天。
- 单次最多请求 100 条。结果达到 100 条时提示用户缩小时间范围或增加类型、地区筛选，避免用更大的 `limit` 增加服务器负担。
- 用户要求“提醒、订阅、每天推送、发现新增时通知”时，才进入初始化订阅流程。
- 无论运行于 Codex、Claude Code、Hermes 还是 OpenClaw，都运行相同脚本、使用相同状态结构和消息格式；只适配调度与投递方式。

## 初始化订阅

用户首次启用并完成配置后，立即查询一次未来 7 天活动。

1. 请求 `GET https://api.me.news/skill/events/options`。
2. 询问用户订阅类型，可多选 `AI`、`Web3`；不选表示全部。
3. 询问用户订阅地区，可多选；不选表示全部。
4. 询问接收提醒的明确渠道和目标。不要依赖不确定的最后会话。
5. 在当前 Agent 工作区运行初始化脚本。它先建立 `/changes` 基线，再保存状态并查询未来 7 天：

   ```bash
   node /scripts/init-subscription.mjs \
     --state /memory/me-featured-events.json \
     --types ai,web3 \
     --regions hong-kong
   ```

   未选择类型或地区时省略对应参数。不得把历史活动作为新增推送。
6. 将初始化脚本的非空 stdout 立即发送给用户；stdout 为空时静默结束。
7. 向用户展示筛选条件、执行频率和接收目标，经明确确认后使用当前 Agent 支持的调度器创建两个任务：
   - 每天 `10:00`，时区 `Asia/Shanghai`，执行固定提醒。
   - 每 `5` 分钟执行新增活动检查。
8. 定时任务直接执行以下脚本，并将非空 stdout 投递到已确认的渠道：
   - 每日任务：`node /scripts/daily-upcoming.mjs --state `
   - 增量任务：`node /scripts/poll-new-events.mjs --state `
   - OpenClaw 使用 Command Cron；Hermes 优先使用 no-agent/script Cron；Codex Automation 使用明确任务指令；Codex CLI 与 Claude Code 使用系统计划任务或 CI。
   - stdout 为空时不投递消息；退出码非零时记录失败并保留旧游标。
9. 创建后立即手动运行两个任务，查看最近一次运行记录，并确认测试消息到达目标渠道。

建议状态结构：

```json
{
  "version": 1,
  "type_ids": ["ai", "web3"],
  "region_ids": ["hong-kong"],
  "cursor": "服务端返回的游标",
  "recent_ids": [],
  "timezone": "Asia/Shanghai"
}
```

## 固定提醒

1. 运行 `scripts/daily-upcoming.mjs`，读取本地订阅配置。
2. 脚本默认请求 `/upcoming?hours=168&limit=20`，按需附加 `type_ids`、`region_ids`。自然语言指定月份或日期范围时改用 `start_date`、`end_date`。
3. 按 `start_time` 升序处理，使用接口返回的最新活动数据。
4. 为每条活动根据标题和 `description` 生成 30～50 字中文简介；不得增加原数据没有的事实。
5. 按活动开始日期分组。今日和明日分别使用“今日开始”“明日开始”；更晚日期使用明确日期标题，不得遗漏。
6. 输出活动名称、简介、开始时间、地址和接口返回的 `url`。普通活动与合集活动必须链接到 ME 活动详情页；`activity_import` 表格导入活动使用表格中导入的链接。
7. 没有活动时不要发送消息。
8. 不读取或更新新增活动 `cursor`。

## 新增活动检查

1. 运行 `scripts/poll-new-events.mjs`，读取本地 `cursor`、筛选条件和 `recent_ids`。
2. 脚本请求 `/changes`，必须传入已保存的 `cursor`。
3. 用复合 `id` 去重；`activity:*` 与 `activity_other:*` 是不同数据源。
4. 所有分页请求和格式化成功后输出一条“新增会议”消息。
5. 一批结果完整处理后，以原子写入方式保存 `next_cursor`；任一接口、解析或格式化步骤失败时不推进游标。
6. `recent_ids` 仅保留最近 500 个，避免状态无限增长。
7. `has_more=true` 时使用新游标继续拉取，直到为 false。
8. 没有新增活动时 stdout 为空，由当前调度器静默结束。

脚本只能确认数据处理成功，不能确认消息平台最终送达。若业务要求“消息送达成功后才能推进游标”，需要在服务端增加投递 ACK 或 Outbox，不能只靠本地 Cron 保证。

## 更新偏好

- 用户修改类型或地区时更新本地配置，但保留当前 `cursor`，不要回放历史新增活动。
- 用户要求暂停时禁用两个 Automation，不删除偏好和游标。
- 用户要求退订时删除两个 Automation；删除本地状态前再次确认。
- 类型只接受 `ai`、`web3`。地区值只使用 `/options` 返回的 `value`。

## 内容降级

按以下顺序生成一句话简介：

1. 根据标题和 `description` 生成 30～50 字简介。
2. 生成失败时，清理并截取原始 `description`。
3. 原始简介为空时，使用标题、时间、地址组成事实性短句。

不得因简介生成失败永久跳过活动。

## 消息格式

固定提醒：

```text
今日开始

1. {活动名称}
{30～50字简介}
{M月D日 HH:mm}｜{地址或地区}
{活动链接}
```

新增提醒：

```text
新增会议

{活动名称}
{30～50字简介}
{M月D日 HH:mm}｜{地址或地区}
{活动链接}
```

- 不输出空分组。
- 地址为空时显示地区；二者都为空时只显示时间。
- 链接为空时省略链接行，不伪造网站详情地址。不得用 `description` 或其他字段中的微信、官网、报名页替换接口返回的 `url`。

## 安全约束

- 只请求 `https://api.me.news/skill/events/` 下的三个只读端点。
- 不在 Skill 中存储消息渠道密钥或 OpenClaw Gateway Token。
- 只有在用户明确同意后才创建、修改或删除 Automation。
- 接口 `code` 非 `200` 时视为失败；记录错误摘要但不推进状态。

## Source & license

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

- **Author:** [me-news](https://github.com/me-news)
- **Source:** [me-news/agent-skills](https://github.com/me-news/agent-skills)
- **License:** MIT-0

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:** yes
- **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-me-news-agent-skills-me-featured-events
- Seller: https://agentstack.voostack.com/s/me-news
- 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%.
