← 返回 Skills 市场
Geo Push Policy
作者
liweijie0709-cmyk
· GitHub ↗
· v1.0.0
· MIT-0
101
总下载
0
收藏
1
当前安装
1
版本数
在 OpenClaw 中安装
/install geo-push-policy
功能描述
管理事件推送策略,包括冷却期、观察池、推送次数限制、事件状态跟踪和频率限制保护。
使用说明 (SKILL.md)
geo-push-policy
推送策略管理技能。负责事件冷却期、观察池、频率限制等推送策略管理。
功能
- 事件冷却期: 防止同一事件短时间内重复推送
- 观察池机制: 评分 50-69 的事件进入观察池,等待确认后再推送
- 推送次数限制: 单事件最多推送 3 次
- 事件状态机: 追踪事件从 new → escalating → ongoing → resolved 的演化
- 频率限制保护: 检测飞书频率限制,自动等待重试
- 死信队列: 记录推送失败的消息,支持后续补投
冷却期配置
| 事件级别 | 冷却时间 | 突破条件 |
|---|---|---|
| 高优先级 (≥70 分) | 90 分钟 | 级别升级、新增权威来源、市场联动扩大 |
| 中优先级 (50-69 分) | 180 分钟 | 同上 |
观察池机制
- 进入条件: 评分 50-69 分
- 池大小限制: 最多 20 条
- 升级检测: 观察池事件评分上升至≥70 分时转为推送
推送决策流程
新闻 → 评分 → 是否≥50 分?
↓ 否
忽略
↓ 是
检查冷却期 → 是否在冷却期?
↓ 是 ↓ 否
检查是否升级 推送
↓ 是
推送
使用方法
Python API
from geo_push_policy import (
PushPolicy,
AppState,
should_push_event,
update_event_cache,
update_watch_pool,
)
# 加载状态
state = AppState.load(STATE_FILE)
# 创建策略
policy = PushPolicy(
cooldown_high=90,
cooldown_medium=180,
max_push_count=3,
)
# 判断是否推送
should_push, reason = policy.should_push(event, state)
print(f"推送决策:{reason}")
# 更新事件缓存
push_events = [event1, event2] # 本次推送的事件
update_event_cache(state, all_events, push_events)
# 更新观察池
update_watch_pool(state, all_events, push_events)
# 保存状态
state.save(STATE_FILE)
状态文件结构
{
"last_run_time": "2026-03-27T15:00:00",
"last_push_time": "2026-03-27T14:00:00",
"event_cache": {
"event_id_1": {
"event_id": "event_id_1",
"fingerprint": "abc123",
"title": "事件标题",
"severity": "high",
"first_seen": "2026-03-27T10:00:00",
"last_seen": "2026-03-27T15:00:00",
"push_count": 2,
"stage": "ongoing"
}
},
"watch_pool": [...],
"dead_letter_queue": [...]
}
死信队列
推送失败的消息会进入死信队列,最多保留 10 条。下次运行时会尝试补投。
# 处理死信队列
from geo_push_policy import process_dead_letter_queue, send_to_feishu
success = process_dead_letter_queue(state, send_to_feishu)
if success:
print("✅ 死信补投成功")
依赖
geo_push_ops: 推送操作模块(可选,用于死信补投)
相关文件
- 主模块:
geo_push_policy.py
版本
- v1.0.0: 初始版本,从 smart-geo-push.py v2.0 拆分
安全使用建议
This skill appears coherent for managing push/cooldown/watch-pool logic and does not, as presented, request credentials or install external code. Before installing: (1) review the full geo_push_policy.py file (the provided preview was truncated) to confirm there are no hidden network calls or credential usages; (2) if you wire in a send function (e.g., send_to_feishu), ensure API tokens are stored securely and only provided when needed; (3) choose a safe STATE_FILE path and limit file permissions so the skill only writes to its own directory; (4) if you plan to run the skill autonomously, test it in an isolated environment first and confirm the optional dependency 'geo_push_ops' comes from a trusted source. If you want, I can scan the remainder of the file for network operations or secrets usage — provide the complete geo_push_policy.py content.
功能分析
Type: OpenClaw Skill
Name: geo-push-policy
Version: 1.0.0
The geo-push-policy skill bundle is a legitimate utility for managing event notification strategies, such as cooldown periods, observation pools, and rate limiting. The Python code (geo_push_policy.py) implements state management and decision logic using standard libraries, and the documentation (SKILL.md) accurately describes its functional purpose without any signs of prompt injection or malicious instructions. No indicators of data exfiltration, unauthorized execution, or persistence were found.
能力评估
Purpose & Capability
The name/description, SKILL.md and the included Python module all describe push-policy logic (cooldowns, watch pool, dead-letter queue, push counts). Nothing in the manifest or shown code requests unrelated capabilities (no AWS, no broad system access).
Instruction Scope
Runtime instructions are narrowly scoped to loading/saving a state file, evaluating events, updating caches and handling a dead-letter queue. The SKILL.md examples show passing a send function (e.g., send_to_feishu) rather than embedding secret access. The skill does not instruct the agent to read arbitrary system files or exfiltrate data.
Install Mechanism
There is no install spec and no external downloads; the skill is delivered as source code + instructions, which is the lowest-risk installation model. An optional dependency 'geo_push_ops' is documented but not required by the core logic.
Credentials
The skill declares no required environment variables or credentials. The SKILL.md example references sending to Feishu (which would require credentials in a real deployment), but the skill itself does not ask for or access credentials — responsibility to supply/send is left to the integrator.
Persistence & Privilege
always:false and user-invocable:true (default). The code reads/writes its own state file via AppState.load/save; it does not attempt to modify other skills or global agent configuration. Autonomous invocation is allowed by platform default but is not excessive on its own.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install geo-push-policy - 安装完成后,直接呼叫该 Skill 的名称或使用
/geo-push-policy触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
geo-push-policy v1.0.0
- 初始版本发布,从 smart-geo-push.py v2.0 拆分
- 实现事件冷却期、观察池、推送次数限制等基础推送策略
- 支持事件状态流转(new → escalating → ongoing → resolved)
- 加入飞书推送频率保护及自动重试
- 提供死信队列机制与补投能力
- 提供 Python API 与状态持久化方案
元数据
常见问题
Geo Push Policy 是什么?
管理事件推送策略,包括冷却期、观察池、推送次数限制、事件状态跟踪和频率限制保护。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 101 次。
如何安装 Geo Push Policy?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install geo-push-policy」即可一键安装,无需额外配置。
Geo Push Policy 是免费的吗?
是的,Geo Push Policy 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Geo Push Policy 支持哪些平台?
Geo Push Policy 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Geo Push Policy?
由 liweijie0709-cmyk(@liweijie0709-cmyk)开发并维护,当前版本 v1.0.0。
推荐 Skills