← 返回 Skills 市场
liweijie0709-cmyk

Geo Push Ops

作者 liweijie0709-cmyk · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
95
总下载
0
收藏
1
当前安装
1
版本数
在 OpenClaw 中安装
/install geo-push-ops
功能描述
Handles Feishu message construction, sending with retries, rate limit detection, delivery diagnostics, and dead-letter queue management for geo alerts.
使用说明 (SKILL.md)

geo-push-ops

推送操作技能。负责飞书消息的构建、发送、重试和投递诊断。

功能

  • 消息模板: 分层消息模板(高优先级警报 / 观察推送 / 摘要)
  • 飞书发送: 带重试机制的飞书 webhook 推送
  • 频率限制处理: 自动检测 11232 频率限制错误,递增延迟重试
  • 投递诊断: 详细记录 HTTP 状态、业务码、错误信息
  • 死信补投: 失败消息加入死信队列,支持后续补投

飞书配置

FEISHU_WEBHOOK = "https://open.feishu.cn/open-apis/bot/v2/hook/xxx"
FEISHU_RETRY_DELAY = 5      # 重试延迟(秒)
FEISHU_MAX_RETRIES = 3      # 最大重试次数

消息模板

高优先级警报(A 类)

🚨 宏观地缘高优先级 | 15:00

【事件】
伊朗总统:伊朗将继续进行正当防御

【判断】
偏利多原油、避险升温

【映射】
石油石化 / 国防军工 / 有色金属

【说明】
当前为突发阶段,若后续出现官方确认或进一步升级,影响可能继续扩大。

---
📡 数据源:财联社
🧠 AI 语义分析:已启用

观察推送(B/C 类)

🦾 宏观地缘观察 | 15:00

📰 最新动态
🔥 俄外长称美谋求掌控全球能源市场
⚠️ 黎巴嫩将就以色列军事行动向安理会申诉
○ 伊朗总统:伊朗将继续进行正当防御

📊 市场异动
📈 原油:+2.5%
📈 黄金:+1.8%

---
💡 当前为观察阶段,如有重大升级将单独推送

使用方法

Python API

from geo_push_ops import (
    send_to_feishu,
    build_feishu_message,
    DeliveryResult,
    FeishuConfig,
)

# 配置
config = FeishuConfig(
    webhook="https://open.feishu.cn/open-apis/bot/v2/hook/xxx",
    retry_delay=5,
    max_retries=3,
)

# 构建消息
from geo_event_router import Event

events = [event1, event2, event3]
message = build_feishu_message(events, market)

# 发送
result = send_to_feishu(message, config)

if result.delivered:
    print(f"✅ 推送成功({result.attempts}次尝试,{result.duration_ms}ms)")
else:
    print(f"❌ 推送失败:{result.error} (HTTP {result.http_status})")

DeliveryResult 结构

@dataclass
class DeliveryResult:
    target: str = "feishu"
    attempts: int = 0         # 尝试次数
    http_status: int = 0      # HTTP 状态码
    biz_code: int = 0         # 飞书业务码
    biz_msg: str = ""         # 业务消息
    delivered: bool = False   # 是否成功
    error: str = ""           # 错误信息
    duration_ms: int = 0      # 耗时(毫秒)

重试策略

尝试次数 延迟时间 说明
1 0s 首次尝试
2 5s 第一次重试
3 10s 第二次重试

检测到频率限制错误码 11232 时,使用递增延迟重试。

错误处理

错误类型 HTTP 码 业务码 处理方式
成功 200 0 返回成功
频率限制 200 11232 递增延迟重试
Webhook 无效 200 99991504 记录错误,不重试
网络错误 - - 记录错误,加入死信队列

依赖

  • requests: HTTP 请求库
  • geo_event_router: 事件数据结构(可选)
  • geo_market_impact_mapper: 市场数据(可选)

相关文件

  • 主模块:geo_push_ops.py

版本

  • v1.0.0: 初始版本,从 smart-geo-push.py v2.0 拆分
安全使用建议
This skill appears to do what it says (compose Feishu messages and retry on errors) but it includes a hard-coded Feishu webhook URL in the code. Before installing or using it: 1) Review and replace the hard-coded webhook with your own webhook or make sure callers always pass a webhook in FeishuConfig; do not rely on the embedded default. 2) Search the full file for any other hard-coded endpoints or secrets (the provided listing was truncated). 3) If you will send real event data, confirm the webhook recipient is under your control — otherwise messages (potentially containing sensitive content) could be forwarded to an external party. 4) Prefer configuring credentials via environment variables or injected config rather than embedded constants. 5) Run the module in a test environment and inspect outbound requests (or disable network) to verify behavior before deploying to production.
功能分析
Type: OpenClaw Skill Name: geo-push-ops Version: 1.0.0 The skill contains a hardcoded Feishu webhook URL (ending in cb9b2f26-c8be-483b-afca-2e4a59061e76) within the `send_to_feishu` function in `geo_push_ops.py`. This acts as a default fallback if the user does not provide their own configuration, which would result in the exfiltration of potentially sensitive geopolitical or market analysis data to a third-party endpoint controlled by the skill author. While the code is functional and lacks obfuscation, the discrepancy between the documentation (which suggests using a placeholder) and the implementation (which uses a specific UUID) is a high-risk indicator of intentional data redirection.
能力评估
Purpose & Capability
The name, description, SKILL.md, and code all implement Feishu message construction, retries, rate-limit handling and diagnostics as claimed. However, the module includes a hard-coded webhook URL in send_to_feishu's default FeishuConfig instead of requiring the caller to supply one or using a declared environment variable; that credential-like value is not surfaced in the skill metadata and is disproportionate to the declared 'no required env vars'.
Instruction Scope
SKILL.md instructs the agent to build messages and call the Python API; the instructions do not ask the agent to read arbitrary files, system configs, or unrelated credentials. The runtime code performs HTTP POSTs to the provided webhook and logs diagnostics, which is within the stated scope.
Install Mechanism
This is an instruction+code skill with no install spec — nothing is downloaded or installed by the skill itself. That lowers the install risk; dependencies are standard (requests) and optional project imports are declared in the README.
Credentials
The skill declares no required env vars or primary credential, but the code contains a hard-coded webhook URL (https://open.feishu.cn/open-apis/bot/v2/hook/cb9b2f26-c8be-483b-afca-2e4a59061e76). Embedding an endpoint like this is effectively shipping a credential/recipient in code and could cause messages (including potentially sensitive event text) to be sent to an external third party if the caller does not override the default. The SKILL.md shows an example webhook placeholder, so the hard-coded value is inconsistent with the documentation and metadata.
Persistence & Privilege
The skill does not request permanent presence (always:false), does not modify other skills' configs, and has no declared system-level privileges. Autonomous invocation is allowed by default but is not combined with other privilege/infiltration signals here.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install geo-push-ops
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /geo-push-ops 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
geo-push-ops v1.0.0 - Initial release, split out from smart-geo-push.py v2.0. - Provides Feishu message construction, sending with retry and rate-limit handling. - Implements layered message templates for priority alerts, observations, and summaries. - Tracks detailed delivery diagnostics and supports dead-letter queue with re-delivery. - Includes Python API for message building and push, along with error handling and retry strategies.
元数据
Slug geo-push-ops
版本 1.0.0
许可证 MIT-0
累计安装 1
当前安装数 1
历史版本数 1
常见问题

Geo Push Ops 是什么?

Handles Feishu message construction, sending with retries, rate limit detection, delivery diagnostics, and dead-letter queue management for geo alerts. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 95 次。

如何安装 Geo Push Ops?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install geo-push-ops」即可一键安装,无需额外配置。

Geo Push Ops 是免费的吗?

是的,Geo Push Ops 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Geo Push Ops 支持哪些平台?

Geo Push Ops 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Geo Push Ops?

由 liweijie0709-cmyk(@liweijie0709-cmyk)开发并维护,当前版本 v1.0.0。

💬 留言讨论